[Mesa-dev] [PATCH 9/9] Don't explicitly link libOsmesa with libmesa's dependency libglsl

Jon TURNEY jon.turney at dronecode.org.uk
Tue Jul 10 07:08:43 PDT 2012


The libmesa convenience library is linked with the libglsl convenience
library.  libOsmesa is linked with libmesa, and also directly with libglsl.
This gives rise to duplicate symbol errors.

We must either:
(i) Not link libmesa with libglsl, and link anything that uses libmesa with
libglsl as well, or
(ii) Link libmesa with libglsl, and not link anything that uses libmesa with
libglsl

I choose (ii) just because it's least change, but I'm not sure it's right.

Note that drivers/X11 makes libGL by linking with libmesa, but not libglsl,
so it's a bit unclear to me how this was working correctly before in both cases
(It might be some sort of accidental side-effect of what mklib's expand_archives()
function does that this ever worked before?)
---
 src/mesa/drivers/osmesa/Makefile.am |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/osmesa/Makefile.am b/src/mesa/drivers/osmesa/Makefile.am
index 9989c92..7c151bf 100644
--- a/src/mesa/drivers/osmesa/Makefile.am
+++ b/src/mesa/drivers/osmesa/Makefile.am
@@ -40,8 +40,7 @@ lib at OSMESA_LIB@_la_SOURCES = osmesa.c
 lib at OSMESA_LIB@_la_LDFLAGS = -module -version-number @OSMESA_VERSION@ -shared
 lib at OSMESA_LIB@_la_LIBADD = \
 	$(top_builddir)/src/mesa/libmesa.la \
-	$(top_builddir)/src/mapi/glapi/libglapi.la \
-	$(top_builddir)/src/glsl/libglsl.la
+	$(top_builddir)/src/mapi/glapi/libglapi.la
 
 # 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.
-- 
1.7.9



More information about the mesa-dev mailing list