Since commit 8a6bdf3979c2dda0efc6771308bf9e5c32bbdab4 "egl: Minor changes to the _EGLConfig interface.", I have a failure building egl_glx.so (see [1])

Here is the failure with a bit more verbosity:

make[4]: Entering directory `/opt/wip/jhbuild/git/mesa/mesa/src/egl/drivers/glx'
/bin/sh ../../../../bin/mklib -o egl_glx.so -noprefix \
                -linker 'ccache gcc' -ldflags '-L/opt/wip/jhbuild/install/lib ' 
\
                 \
egl_glx.o -L/opt/wip/jhbuild/install/lib -lX11 -lxcb -lXau -lXdmcp -lGL -lEGL \
                -L../../../../lib
mklib: Making CYGWIN shared library:  egl_glx.so
ccache gcc -shared -Wl,--enable-auto-image-base -L/opt/wip/jhbuild/install/lib -o egl_glx.so egl_glx.o -L/opt/wip/jhbuild/install/lib -lX11 -lxcb -lXau -lXdmcp -lGL -lEGL -L../../../../lib
egl_glx.o: In function `create_configs':
/opt/wip/jhbuild/git/mesa/mesa/src/egl/drivers/glx/egl_glx.c:455: undefined reference to `__eglLinkConfig'
egl_glx.o: In function `_eglPutSurface':
/opt/wip/jhbuild/git/mesa/mesa/src/egl/drivers/glx/../../../../src/egl/main/eglsurface.h:88: undefined reference to `__eglPutResource'
egl_glx.o: In function `_eglPutContext':
/opt/wip/jhbuild/git/mesa/mesa/src/egl/drivers/glx/../../../../src/egl/main/eglcontext.h:65: undefined reference to `__eglPutResource'
collect2: ld returned 1 exit status
make[4]: *** [egl_glx.so] Error 1
make[4]: Leaving directory `/opt/wip/jhbuild/git/mesa/mesa/src/egl/drivers/glx'

As you can see, the link line contains a -L for the install directory (coming from LDFLAGS set by jhbuild) which precedes the -L for the lib staging directory, so we are attempting to link with an older, installed version of libEGL from a previous build, which does not have these interface changes.

Attached is a small patch to arrange -L options in the correct order.

I haven't (yet) checked other uses of mklib for this pattern.

[1] http://tinderbox.freedesktop.org/builds/2010-10-23-0015/logs/libGL/#build
>From cf372e20c608ee635a3de8cae252b8b4c57d87db Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.tur...@dronecode.org.uk>
Date: Sun, 24 Oct 2010 14:06:50 +0100
Subject: [PATCH] Ensure -L$(TOP)/$(LIB_DIR) appears in link line before any -L 
in $LDFLAGS

Ensure -L$(TOP)/$(LIB_DIR) (the staging dir for build products), appears
in the link line before any -L in $LDFLAGS, so that we link driver we are
building with libEGL we have just built, and not an installed version

Signed-off-by: Jon TURNEY <jon.tur...@dronecode.org.uk>
---
 src/egl/drivers/Makefile.template |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/egl/drivers/Makefile.template 
b/src/egl/drivers/Makefile.template
index 08e82c6..47709e3 100644
--- a/src/egl/drivers/Makefile.template
+++ b/src/egl/drivers/Makefile.template
@@ -24,8 +24,8 @@ $(EGL_DRIVER_PATH): $(EGL_DRIVER)
 
 $(EGL_DRIVER): $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
        @$(MKLIB) -o $(EGL_DRIVER) -noprefix \
-               -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-               -L$(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+               -linker '$(CC)' -ldflags '-L$(TOP)/$(LIB_DIR) $(LDFLAGS)' \
+               $(MKLIB_OPTIONS) \
                $(EGL_OBJECTS) $(EGL_LIBS) -l$(EGL_LIB)
 
 .c.o:
-- 
1.7.2.3

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

Reply via email to