On 11/01/2012 23:37, Matt Turner wrote: > No one on IRC knows why an unshared glapi is useful.
It looks like this change stops OSMesa from builing on cygwin (See [1]) I think this is because we never tried building it with shared glapi on cygwin before, and if we had, we would have noticed that libOSMesa is underlinked, which is not permitted for PE/COFF shared libraries. Patch attached which fixes this by explicitly linking libOSMesa with the shared glapi library. [1] http://tinderbox.freedesktop.org/builds/2012-01-21-0017/logs/libGL/#build
>From 30752cea7b296aaef3824320026554fbfa4a95ff Mon Sep 17 00:00:00 2001 From: Jon TURNEY <jon.tur...@dronecode.org.uk> Date: Sun, 22 Jan 2012 13:23:26 +0000 Subject: [PATCH] Fix underlinking in libOSMesa since commit adefee5 "Always build shared glapi" Since we now always build shared glapi, this exposes the fact that libOSMesa was underlinked when glapi was built shared. Fix this by doing the same thing as drivers/X11/Makefile already does, ensuring that the library is linked with the shared glapi library. (I'm not clear why we link with both glapi.a and glapi.so, so this may be all wrong) Signed-off-by: Jon TURNEY <jon.tur...@dronecode.org.uk> --- src/mesa/drivers/osmesa/Makefile | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile index 39ab09a..005f4d5 100644 --- a/src/mesa/drivers/osmesa/Makefile +++ b/src/mesa/drivers/osmesa/Makefile @@ -25,6 +25,8 @@ CORE_MESA = \ $(TOP)/src/mapi/glapi/libglapi.a \ $(TOP)/src/glsl/libglsl.a +OSMESA_LIB_DEPS := -L$(TOP)/$(LIB_DIR) -l$(GLAPI_LIB) $(OSMESA_LIB_DEPS) + .c.o: $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ -- 1.7.5.1
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev