After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 340016 - does not build on opensolaris, must always include config.h first
does not build on opensolaris, must always include config.h first
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other opensolaris
: Normal normal
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 321826 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-28 11:59 UTC by James Andrewartha
Modified: 2006-06-12 16:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
grossest patch ever, makes sure config.h gets included first (843 bytes, patch)
2006-04-28 16:53 UTC, Tim-Philipp Müller
none Details | Review
patch to parser source (413 bytes, patch)
2006-04-28 17:54 UTC, Arwed v. Merkatz
none Details | Review
updated patch (808 bytes, patch)
2006-04-29 15:00 UTC, Tim-Philipp Müller
none Details | Review
patch to fix some compilation errors related to _FILE_OFFSET_BITS (3.58 KB, patch)
2006-04-30 06:30 UTC, James Andrewartha
none Details | Review
patch to fix all compilation errors related to _FILE_OFFSET_BITS (9.62 KB, patch)
2006-04-30 08:37 UTC, James Andrewartha
none Details | Review
patch to fix all compilation errors related to _FILE_OFFEST_BITS, make -j safe (9.65 KB, patch)
2006-04-30 14:09 UTC, James Andrewartha
committed Details | Review

Description James Andrewartha 2006-04-28 11:59:26 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 */
Comment 1 Tim-Philipp Müller 2006-04-28 16:53:34 UTC
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.
Comment 2 Arwed v. Merkatz 2006-04-28 17:47:02 UTC
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.
Comment 3 Arwed v. Merkatz 2006-04-28 17:54:44 UTC
Created attachment 64482 [details] [review]
patch to parser source

Try this patch.
Comment 4 Tim-Philipp Müller 2006-04-28 19:37:08 UTC
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.

Comment 5 Tim-Philipp Müller 2006-04-29 15:00:02 UTC
Created attachment 64522 [details] [review]
updated patch

This one actually works instead of leading to linking errors later on.
Comment 6 James Andrewartha 2006-04-30 06:30:23 UTC
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.
Comment 7 James Andrewartha 2006-04-30 08:37:59 UTC
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.
Comment 8 Tim-Philipp Müller 2006-04-30 11:46:32 UTC
*** Bug 321826 has been marked as a duplicate of this bug. ***
Comment 9 James Andrewartha 2006-04-30 14:09:27 UTC
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.
Comment 10 Tim-Philipp Müller 2006-05-04 15:22:57 UTC
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).


Comment 11 James Andrewartha 2006-05-05 06:33:26 UTC
You're right, it should have ;\ after those lines as well.
Comment 12 James Andrewartha 2006-05-20 12:14:27 UTC
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
Comment 13 Tim-Philipp Müller 2006-06-12 16:50:49 UTC
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).