On 27/08/2010 14:40, Jon TURNEY wrote:
On 20/08/2010 15:34, Kevin H. Hobbs wrote:
When Mesa is built with :

./autogen.sh \
--prefix=/home/kevin/mesa_xlib/ \
--with-driver=xlib \
--disable-gallium \
--disable-gl-osmesa

The libGL.so that is produced has undefined symbols from talloc but
talloc is not linked.

... and this breaks the cygwin build (see tinderbox [1]), as PE/COFF requires
all symbols to be defined at link time.

I think the attached patch is the way to fix this.

[1] http://tinderbox.freedesktop.org/builds/2010-08-27-0016/logs/libGL/#build

... and building with --with-driver=xlib --enable-gl-osmesa also has undefined symbols in libOSMesa from talloc

Patch attached.
>From 637a2300f48129af40b7971ec60ca9a07d96d501 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.tur...@dronecode.org.uk>
Date: Fri, 27 Aug 2010 13:34:08 +0100
Subject: [PATCH] Add talloc to osmesa library dependencies

also link osmesa with C++ standard libraries, as it now contains C++ code

Signed-off-by: Jon TURNEY <jon.tur...@dronecode.org.uk>
---
 configure.ac                     |    4 ++--
 src/mesa/drivers/osmesa/Makefile |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 757571a..4518854 100644
--- a/configure.ac
+++ b/configure.ac
@@ -935,12 +935,12 @@ case "$DRIVER_DIRS" in
 *osmesa*)
     # only link libraries with osmesa if shared
     if test "$enable_static" = no; then
-        OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
+        OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS $TALLOC_LIBS"
     else
         OSMESA_LIB_DEPS=""
     fi
     OSMESA_MESA_DEPS=""
-    OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
+    OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS $TALLOC_LIBS"
     ;;
 esac
 AC_SUBST([OSMESA_LIB_DEPS])
diff --git a/src/mesa/drivers/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile
index 091e6f6..fb70790 100644
--- a/src/mesa/drivers/osmesa/Makefile
+++ b/src/mesa/drivers/osmesa/Makefile
@@ -38,7 +38,7 @@ default: $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
 $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS) $(CORE_MESA)
        $(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
                -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-               -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+               -install $(TOP)/$(LIB_DIR) -cplusplus $(MKLIB_OPTIONS) \
                -id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \
                $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA)
 
-- 
1.7.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to