GNOME Bugzilla – Bug 340016
does not build on opensolaris, must always include config.h first
Last modified: 2006-06-12 16:50:49 UTC
http://jhbuild.bxlug.be/builds/2006-04-28-0004/logs/gstreamer/#build _FILE_OFFSET_BITS is redefined. The relevant part of /usr/include/sys/feature_tests.h is: /* * Large file compilation environment control: * * The setting of _FILE_OFFSET_BITS controls the size of various file-related * types and governs the mapping between file-related source function symbol * names and the corresponding binary entry points. * * In the 32-bit environment, the default value is 32; if not set, set it to * the default here, to simplify tests in other headers. * * In the 64-bit compilation environment, the only value allowed is 64. */ #if defined(_LP64) #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #endif #if _FILE_OFFSET_BITS - 0 != 64 #error "invalid _FILE_OFFSET_BITS value specified" #endif #else /* _LP64 */ #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 32 #endif #if _FILE_OFFSET_BITS - 0 != 32 && _FILE_OFFSET_BITS - 0 != 64 #error "invalid _FILE_OFFSET_BITS value specified" #endif #endif /* _LP64 */
Created attachment 64479 [details] [review] grossest patch ever, makes sure config.h gets included first Not sure if there's a way to make flex generate .c files that include our config.h as first header (which should fix this problem if I understand it correctly). Attached patch hacks Makefile.am to achieve the same.
You can just add the include to the top of the parse.l file, right after the first '{', all of that will be copied to the output file literally by flex. I don't have a current cvs tree here right now, so I can't do a patch.
Created attachment 64482 [details] [review] patch to parser source Try this patch.
The first line in parse.l becomes line 838 in my lex._gst_parse_yy.c file - after a whole bunch of system headers/stdio etc. have been included, I'd be surprised if that worked correctly.
Created attachment 64522 [details] [review] updated patch This one actually works instead of leading to linking errors later on.
Created attachment 64548 [details] [review] patch to fix some compilation errors related to _FILE_OFFSET_BITS grammar.tab.c needs a similar treatment to build. The build then breaks on gst.c, gstbus.c, gstclock.c, gstevent.c, gstformat.c and basically anything that includes a system header file before gst_private.h. The attatched patch fixes the above files, but I got bored and haven't fixed any more.
Created attachment 64550 [details] [review] patch to fix all compilation errors related to _FILE_OFFSET_BITS This patch fixes all the places _FILE_OFFSET_BITS could be be redefined, and with it gstreamer compiles cleanly.
*** Bug 321826 has been marked as a duplicate of this bug. ***
Created attachment 64563 [details] [review] patch to fix all compilation errors related to _FILE_OFFEST_BITS, make -j safe added '; \' to the end of all the shell lines, to stop make trying to execute them in parallel when make -j8 is run, otherwise http://jhbuild.bxlug.be/builds/2006-04-30-0003/logs/gstreamer/#build happens.
James - what about the shell lines with $(FLEX_PATH) and $(BISON_PATH) - don't we have to add '; \' after those as well? Committed your patch (without the win32/config.h bit though), thanks! 2006-05-04 Tim-Philipp Müller <tim at centricular dot net> Patch by: James Andrewartha <trs80 at tartarus uwa edu au> * gst/gst.c: * gst/gstbus.c: * gst/gstclock.c: * gst/gstevent.c: * gst/gstformat.c: * gst/gstmessage.c: * gst/gstparse.c: * gst/gstquery.c: * gst/gstutils.c: * gst/parse/Makefile.am: * libs/gst/base/gstadapter.c: * libs/gst/base/gstbasesrc.c: * libs/gst/base/gstpushsrc.c: * libs/gst/base/gsttypefindhelper.c: * plugins/elements/gstfakesrc.c: * plugins/elements/gstidentity.c: Make sure gstprivate.h and/or config.h are always included first, otherwise some of our defines (like _FILE_OFFSET_BITS) might be redefined in the system headers. Fixes build on opensolaris (#340016).
You're right, it should have ;\ after those lines as well.
I've also added .NOTPARALLEL: to the bottom of Makefile.am as otherwise make -j8 sees grammar.tab.h grammar.tab.c: grammar.y and executes the target twice, once for .c and once for .h, which causes this failure: http://jhbuild.bxlug.be/builds/2006-05-19-0005/logs/gstreamer/#build
Thanks, fixed as well: 2006-06-12 Tim-Philipp Müller <tim at centricular dot net> * gst/parse/Makefile.am: Fix build with 'make -j N' even more (#340016).