[Mesa-dev] [PATCH] dri drivers: Link dricommon before dynamic libraries

Jordan Justen jordan.l.justen at intel.com
Mon Oct 1 13:38:04 PDT 2012


On Mon, 2012-10-01 at 13:06 -0700, Matt Turner wrote:
> I think libtool should be handling this for us, but the build fails for
> Jordan because libdricommon (a static library, which uses expat) appears
> before -lexpat on the linker command.

You are missing Signed-off-by...

It fixes the make check build issue for me. Thanks for helping
debug this on my build.

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Tested-by: Jordan Justen <jordan.l.justen at intel.com>

> ---
> *This* is why there can never be enough build system testing.
> 
> Related: now that we have libdricore, why isn't libdricommon in it?
> 
>  src/mesa/drivers/dri/i915/Makefile.am    |    4 ++--
>  src/mesa/drivers/dri/i965/Makefile.am    |    4 ++--
>  src/mesa/drivers/dri/nouveau/Makefile.am |    4 ++--
>  src/mesa/drivers/dri/r200/Makefile.am    |    4 ++--
>  src/mesa/drivers/dri/radeon/Makefile.am  |    4 ++--
>  5 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i915/Makefile.am b/src/mesa/drivers/dri/i915/Makefile.am
> index 7ec4c22..cbdcf84 100644
> --- a/src/mesa/drivers/dri/i915/Makefile.am
> +++ b/src/mesa/drivers/dri/i915/Makefile.am
> @@ -51,9 +51,9 @@ i915_dri_la_SOURCES = \
>  
>  i915_dri_la_LDFLAGS = -module -avoid-version -shared
>  i915_dri_la_LIBADD = \
> +	../common/libdricommon.la \
>  	$(DRI_LIB_DEPS) \
> -	$(INTEL_LIBS) \
> -	../common/libdricommon.la
> +	$(INTEL_LIBS)
>  
>  # Provide compatibility with scripts for the old Mesa build system for
>  # a while by putting a link to the driver into /lib of the build tree.
> diff --git a/src/mesa/drivers/dri/i965/Makefile.am b/src/mesa/drivers/dri/i965/Makefile.am
> index 574a499..2cdfb51 100644
> --- a/src/mesa/drivers/dri/i965/Makefile.am
> +++ b/src/mesa/drivers/dri/i965/Makefile.am
> @@ -55,9 +55,9 @@ libi965_dri_la_SOURCES = \
>  # list of libs to be linked against by i965_dri.so and i965 test programs.
>  COMMON_LIBS = \
>  	libi965_dri.la \
> +	../common/libdricommon.la \
>  	$(DRI_LIB_DEPS) \
> -	$(INTEL_LIBS) \
> -	../common/libdricommon.la
> +	$(INTEL_LIBS)
>  
>  TEST_LIBS = \
>  	$(COMMON_LIBS) \
> diff --git a/src/mesa/drivers/dri/nouveau/Makefile.am b/src/mesa/drivers/dri/nouveau/Makefile.am
> index 82d3804..4589b05 100644
> --- a/src/mesa/drivers/dri/nouveau/Makefile.am
> +++ b/src/mesa/drivers/dri/nouveau/Makefile.am
> @@ -47,9 +47,9 @@ nouveau_vieux_dri_la_SOURCES = \
>  
>  nouveau_vieux_dri_la_LDFLAGS = -module -avoid-version -shared
>  nouveau_vieux_dri_la_LIBADD = \
> +	../common/libdricommon.la \
>  	$(DRI_LIB_DEPS) \
> -	$(NOUVEAU_LIBS) \
> -	../common/libdricommon.la
> +	$(NOUVEAU_LIBS)
>  
>  # Provide compatibility with scripts for the old Mesa build system for
>  # a while by putting a link to the driver into /lib of the build tree.
> diff --git a/src/mesa/drivers/dri/r200/Makefile.am b/src/mesa/drivers/dri/r200/Makefile.am
> index 5ec53de..8920ab0 100644
> --- a/src/mesa/drivers/dri/r200/Makefile.am
> +++ b/src/mesa/drivers/dri/r200/Makefile.am
> @@ -49,9 +49,9 @@ r200_dri_la_SOURCES = \
>  
>  r200_dri_la_LDFLAGS = -module -avoid-version -shared
>  r200_dri_la_LIBADD = \
> +	../common/libdricommon.la \
>  	$(DRI_LIB_DEPS) \
> -	$(RADEON_LIBS) \
> -	../common/libdricommon.la
> +	$(RADEON_LIBS)
>  
>  # Provide compatibility with scripts for the old Mesa build system for
>  # a while by putting a link to the driver into /lib of the build tree.
> diff --git a/src/mesa/drivers/dri/radeon/Makefile.am b/src/mesa/drivers/dri/radeon/Makefile.am
> index ec2d42e..36b852e 100644
> --- a/src/mesa/drivers/dri/radeon/Makefile.am
> +++ b/src/mesa/drivers/dri/radeon/Makefile.am
> @@ -49,9 +49,9 @@ radeon_dri_la_SOURCES = \
>  
>  radeon_dri_la_LDFLAGS = -module -avoid-version -shared
>  radeon_dri_la_LIBADD = \
> +	../common/libdricommon.la \
>  	$(DRI_LIB_DEPS) \
> -	$(RADEON_LIBS) \
> -	../common/libdricommon.la
> +	$(RADEON_LIBS)
>  
>  # Provide compatibility with scripts for the old Mesa build system for
>  # a while by putting a link to the driver into /lib of the build tree.




More information about the mesa-dev mailing list