[Mesa-dev] Build failure since May 6

Dan Nicholson dbn.lists at gmail.com
Wed May 12 11:21:26 PDT 2010


On Wed, May 12, 2010 at 12:16:55PM -0400, Kevin H. Hobbs wrote:
> On 05/12/2010 11:45 AM, tom fogal wrote:
> > That said, I think Dan's idea of linking directly to libmesa is an
> > easier way to solve your problem.
> > 
> 
> Would that be done in :
> 
>   src/mesa/drivers/osmesa/Makefile
> 
> by changing line 31 from
> 
>   CORE_MESA =
> 
> to
> 
>   CORE_MESA = $(TOP)/src/mesa/libmesa.a
> 
> ?

Yeah, but you also have to stop it from being linked to libGL. Here's
what I'd try on master, although I have tested it. You'll have to rerun
autogen.sh.

Dan

diff --git a/configure.ac b/configure.ac
index c40c842..34615e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -968,8 +968,8 @@ x16|x32)
 esac
 AC_SUBST([OSMESA_LIB])
 
-case "$mesa_driver" in
-osmesa)
+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"
@@ -979,19 +979,7 @@ osmesa)
     OSMESA_MESA_DEPS=""
     OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS"
     ;;
-*)
-    # Link OSMesa to libGL otherwise
-    OSMESA_LIB_DEPS=""
-    # only link libraries with osmesa if shared
-    if test "$enable_static" = no; then
-        OSMESA_MESA_DEPS='-l$(GL_LIB)'
-    else
-        OSMESA_MESA_DEPS=""
-    fi
-    OSMESA_PC_REQ="gl"
-    ;;
 esac
-OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV"
 AC_SUBST([OSMESA_LIB_DEPS])
 AC_SUBST([OSMESA_MESA_DEPS])
 AC_SUBST([OSMESA_PC_REQ])
diff --git a/src/mesa/drivers/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile
index ea49a89..c6b4a04 100644
--- a/src/mesa/drivers/osmesa/Makefile
+++ b/src/mesa/drivers/osmesa/Makefile
@@ -20,17 +20,11 @@ INCLUDE_DIRS = \
 	-I$(TOP)/src/mesa \
 	-I$(TOP)/src/mesa/main
 
-# Standalone osmesa needs to be linked with core Mesa APIs
-ifeq ($(DRIVER_DIRS), osmesa)
 CORE_MESA = \
 	$(TOP)/src/mesa/libmesa.a \
 	$(TOP)/src/mapi/glapi/libglapi.a \
 	$(TOP)/src/glsl/cl/libglslcl.a \
 	$(TOP)/src/glsl/pp/libglslpp.a
-else
-CORE_MESA =
-endif
-
 
 .c.o:
 	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@


More information about the mesa-dev mailing list