On Thu, Jan 7, 2010 at 4:30 PM, Sedat Dilek <[email protected]> wrote: > Yeah, I had a deeper look into the build-log: > > /bin/bash ../../bin/mklib -o glapi -static main/dispatch.o > glapi/glapi.o glapi/glapi_getproc.o glapi/glthread.o x86/glapi_x86.o > mklib: Making Linux static library: libglapi.a > ar: creating libglapi.a > mklib: Making Linux static library: libmesa.a > ar: creating libmesa.a > mklib: Making Linux static library: libmesagallium.a > ar: creating libmesagallium.a > ar: sl_pp_context.o: No such file or directory > ranlib: 'libmesagallium.a': No such file > > NOTE: ar: sl_pp_context.o: No such file or directory > > $ grep sl_pp_context.o -r mesa/ | egrep 'libmesa|libglsl' > Binary file mesa/src/glsl/pp/libglslpp.a matches > Binary file mesa/src/mesa/libmesa.a matches > Binary file mesa/src/mesa/libmesagallium.a matches > > Seems to me something wrong with GLSL_LIBS.
OK, now I think I know what's going on. mklib will extract all the
object files from dependent .a archives. libmesa.a and
libmesagallium.a will both extract sl_pp_context.o to the current
directory, repack them into their own archives, and then delete the
extracted objects. Since libmesa.a and libmesagallium.a are building
in parallel, there is a race where they're both extracting then
deleting the objects. Something like this:
libmesa.a: extract objects
libmesagallium.a: extract same objects
libmesa.a: insert objects
libmesa.a: remove objects
libmesagallium.a: insert now removed objects
The failure is on the last step because libmesa.a has just removed
sl_pp_context.o. Here's the hacky fix (you'll have to edit manually
since gmail will break formatting):
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index f845d93..4425000 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -33,7 +33,7 @@ libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS)
@ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS)
# Make archive of subset of core mesa object files for gallium
-libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS)
+libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) libmesa.a
@ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS)
# Make archive of gl* API dispatcher functions only
The more correct fix is to have mklib extract in a temporary
directory. Something like this totally untested attached patch.
--
Dan
mklib-smarter-extract.patch
Description: Binary data
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
