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 575695 - build fails on OpenSolaris due to incorrect header file inclusion order
build fails on OpenSolaris due to incorrect header file inclusion order
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-17 13:41 UTC by David Adam
Modified: 2009-03-18 07:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix include order in gst.c (320 bytes, patch)
2009-03-17 13:52 UTC, David Adam
committed Details | Review

Description David Adam 2009-03-17 13:41:51 UTC
Please describe the problem:
While building gstreamer HEAD on OpenSolaris Nevada build 101, the following build error occurs:

Steps to reproduce:


Actual results:
Making all in parse
  CC    gst.o
In file included from gst_private.h:28,
                 from gst.c:108:
../config.h:306:1: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/stdio.h:40,
                 from /space/buildbot/prefix/include/libxml2/libxml/tree.h:15,
                 from /space/buildbot/prefix/include/libxml2/libxml/parser.h:16,
                 from gstconfig.h:171,
                 from gst.c:106:
/usr/include/sys/feature_tests.h:209:1: this is the location of the previous definition
(build stops here)

Expected results:


Does this happen every time?


Other information:
This is because config.h defines _FILE_OFFSET_BITS, which the Solaris headers also define. This can be fixed by reordering the includes - see bug 71704 for an example.

See also: http://www.redhat.com/archives/libvir-list/2008-December/msg00454.html

Full uname: SunOS manduba 5.11 snv_101 sun4u sparc SUNW,Ultra-Enterprise

GCC version:
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.11/3.4.3/specs
Configured with: /gates/sfwnv/builds/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)
Comment 1 David Adam 2009-03-17 13:52:46 UTC
Created attachment 130828 [details] [review]
patch to fix include order in gst.c

This patch allows the build to complete successfully. An alternative solution might be including config.h as the first include.
Comment 2 Tim-Philipp Müller 2009-03-17 20:55:03 UTC
Committed, thanks for the patch:

commit 7d7fceced5c40fbfafd1a2c32c95f82d86d84bbd
Author: David Adam <zanchey@ucc.gu.uwa.edu.au>
Date:   Tue Mar 17 20:41:44 2009 +0000

    config.h needs to be included first, either directly or via gst_private.h
    
    Fixes build with -Werror caused by '_FILE_OFFSET_BITS redefined' warning on
    OpenSolaris where _FILE_OFFSET_BITS may be defined both in our config.h
    and via stdio.h (#575695).

Comment 3 David Adam 2009-03-18 07:33:34 UTC
Confirming fixed with 7d7fceced5c40fbfafd1a2c32c95f82d86d84bbd