This is my ebuild for SimGear which is a set of open-source libraries designed to be used as building blocks for quickly assembling 3d simulations, games, and visualization applications. It is part of the FlightGear project and required for the FlightGear-0.7.10.ebuild. It depends on the not yet released ebuild of metakit (by Julien Herfurth), thus SimGear-0.0.18.ebuild and FlightGear-0.7.10.ebuild should not be released unless http://bugs.gentoo.org/show_bug.cgi?id=1315 has been released too. It passes lintool and has been successfully tested with CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-tbird -O3 -mmmx -m3dnow -pipe CXXFLAGS=${CFLAGS} on Gentoo 1.3b (using GCC 3.1 and ccache) Attached is a tarball of media-libs/SimGear ready to be extracted to /usr/portage rgds dan
Created attachment 2585 [details] SimGear-0.0.18_gentoo.tgz
see http://bugs.gentoo.org/show_bug.cgi?id=5578 for the FlightGear ebuild and installation hints
Even with metakit 2.4.7.37 (gcc 3.2) I keep getting errors about plib (1.4.2-r1) which is compiled/installed ok(I hope ;) see error below)...Anybody had the same experience ? Rigo checking for plib/pu.h... no You *must* have the plib library installed on your system to build the FGFS simulator! Please see README.plib for more details. configure aborted. make: *** No targets specified and no makefile found. Stop. !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 9, Exitcode 2 !!! emake of SimGear failed
Yes, i have problems with plib too, i open a bug #6750
thanks for the reports. i have unmerged FlightGear SimGear metakit plib and remerged FlightGear. plib (btw. there already is a >=media-libs/plib-1.4.0 dependency in the SimGear ebuild, thus plib gets emerged if it is not present already) and metakit compile fine, but now SimGear doesn't anymore. this however does not astonish me too much as i have a pretty fatal mixture of gcc 3.1/3.1.1/3.2_pre currently and i never experienced any SimGear or FlightGear compilation problems before (using clean 3.1). i will first need to get a clean gcc 3.2 system to check this. i guess your plib compilation issues are either related to such a gcc mixture too or perhaps related to gcc 3.2 only (which would not be nice of course ;)
lappy root # emerge plib prune media-libs/plib selected: none protected: 1.4.2-r1 omitted: none Using plib-1.4.2-r1 by the way.... Gtz, Rigo
--- /usr/include/plib/ >>> /usr/include/plib/js.h >>> /usr/include/plib/pu.h >>> /usr/include/plib/sg.h So it does install pu.h (& cannot find it with configure in SimGear)....
I think it's because of this: http://bugs.gentoo.org/show_bug.cgi?id=6782
I'm using a gcc3.2 clean system but plib dont build for me
fyi: media-libs/plib-1.4.2-r1 and dev-db/metakit-2.4.7.37 compiled fine on my box (gcc 3.2) but media-libs/SimGear-0.0.18-r1 does not compile anymore. it looks like at least one dependency was missing in the simgear ebuild (>=dev-libs/libdnet-1.4). i've probably forgot to add it as my previous system already had it due to some other dependencies. sorry for that. however, it's not finished yet. perhaps other dependencies are missing too and eventually tweaking configure for gcc 3.2 will be required. and currently there is a thread on flightgear-devel about some possible issues with backward incompatibilities between autoconf 2.53 and 2.13.
it turned out that simgear/flightgear not liking parallel make was the reason for the build problems. thanks a lot to bernie bright from flightgear-devel for this hint! i will now attach corrected versions of the simgear and flightgear ebuilds (same version numbers, thus take care to use the *latest* attachments for testing). these ebuild tarballs are also available at http://www.icu.unizh.ch/~mettlerd/gentoo/, including a '2in1' tarball for testing convenience. changes: simgear * added missing dependency (>=dev-libs/libdnet-1.4) * logging disabled by default now * changed emake to make changes: flightgear * logging disabled by default now * changed emake to make now these work fine on my box (gentoo 1.4, gcc 3.2). please test, thanks.
Created attachment 3432 [details] SimGear-0.0.18_gentoo.tgz this obsoletes the previous attachment (2585)!
Sim complains about plib http://seneca.me.umn.edu/pipermail/flightgear-users/2001-November/000185.html Tells me it isn't possible yet to build with gcc 3.x ?!? Rigo
rigo, you are using gcc 3.2, right (where does c++ link to)? is it the same error as described in the url? cause on my box (single cpu), plib-1.4.2-r1 builds fine now using gcc-3.2 automake 1.4-p5 autoconf 2.13 unfortunately i have no clue why it still does not work for you. btw. i've just noticed that plib uses parallel make too. although this is not related to the error described in the url it might be an idea to test it with -j1 (as parallel make seems to be responsible for many non-deterministic strange build problems). adding src_compile() { make || die "make failed" } to plib-1.4.2-r1.ebuild should do it. another idea (still not related to the error described) is to test it with as conservative gcc options as possible. i think more testers are required to see whether this is a general issue or an issue related to your particular setup.
C++ ? ccache ;-) Reading specs from ./../lib/gcc-lib/i686-pc-linux-gnu/3.2/specs Configured with: /var/tmp/portage/gcc-3.2/work/gcc-3.2/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/include/g++-v32 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext Thread model: posix gcc version 3.2 # autoconf --version Autoconf version 2.13 # automake --version automake (GNU automake) 1.4-p5 Output SimGear 0.18: <SNIP> Checking for plib/pu.h... no You *must* have the plib library installed on your system to build the FGFS simulator! Please see README.plib for more details. configure aborted. make: *** No targets specified and no makefile found. Stop. !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 11, Exitcode 2 !!! make of SimGear failed </SNIP> cat /var/tmp/portage/SimGear-0.0.18/work/SimGear-0.0.18/config.log <SNIP> configure:3644: gcc -E -I/usr/local/include -I/usr/X11R6/include conftest.c >/dev/null 2>conftest.out cpp0: warning: changing search order for system directory "/usr/local/include" cpp0: warning: as it has already been specified as a non-system directory configure: failed program was: #line 3639 "configure" #include "confdefs.h" #include <plib/pu.h> </SNIP> ix86, gcc 3.2, uni proc very ;) updated, even tried (See included ebuild ;) updating plib to 1.5.1... More Ideas, besides reading README.plib (that's nowhere to be found ;) ? Rigo * dev-db/metakit Latest version Available: 2.4.7.37 Latest version Installed: 2.4.7.37 Homepage: http://www.equi4.com/metakit/ Description: Embedded database library * media-libs/plib Latest version Available: 1.5.1 ;) Latest version Installed: 1.4.2-r1 Homepage: http://plib.sourceforge.net Description: plib: a multimedia library used by many games Oh, and after deleling all tests out of configure.in (rebuilding it with autoconf) Is this my Summary: Configure Summary ================= Prefix: /usr Debug messages: yes Electric fence: no Automake version: (14) automake (GNU automake) 1.4-p5 Without JPEG Factory support Threads: no threads (pthread lib not found.) And gives make this output: <SNIP> timestamp.cxx: In member function `void SGTimeStamp::stamp()': timestamp.cxx:78: aggregate `timeval current' has incomplete type and cannot be defined timestamp.cxx:79: aggregate `timezone tz' has incomplete type and cannot be defined timestamp.cxx:81: `gettimeofday' undeclared (first use this function) timestamp.cxx:81: (Each undeclared identifier is reported only once for each function it appears in.) make[3]: *** [timestamp.o] Error 1 make[3]: Leaving directory `/var/tmp/portage/SimGear-0.0.18/work/SimGear-0.0.18/simgear/timing' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/SimGear-0.0.18/work/SimGear-0.0.18/simgear' make[1]: *** [all-recursive-am] Error 2 make[1]: Leaving directory `/var/tmp/portage/SimGear-0.0.18/work/SimGear-0.0.18/simgear' make: *** [all-recursive] Error 1 </SNIP> Config.log: <SNIP> configure:4114: checking for ftime configure:4114: checking for gettimeofday configure:4114: checking for timegm configure:4114: checking for memcpy configure:4114: checking for bcopy configure:4114: checking for mktime configure:4114: checking for strstr configure:4114: checking for rand configure:4114: checking for random configure:4114: checking for setitimer configure:4114: checking for getitimer configure:4114: checking for signal configure:4114: checking for GetLocalTime configure:4114: checking for rint configure:4114: checking for getrusage </SNIP>
Created attachment 3435 [details] plib-1.5.1.ebuild.tar.gz
I'm getting the same errors as Rigo.. Checking for plib/pu.h... no I also have gcc 3.2 automake-1.4-p5 autoconf-2.13.
thanks for the reports. i finally succeeded in reproducing this error on my box! it sounds weird but this makes me happy as this is what i always tried and could not get done :) now i think i have found the answer for your problem: the problem lies in the search order as my config.log says the following when checking for plib/pu.h: configure:3644: gcc -E -I/usr/X11R6/include conftest.c >/dev/null 2>conftest.out compared to rigo's: configure:3644: gcc -E -I/usr/local/include -I/usr/X11R6/include conftest.c >/dev/null 2>conftest.out cpp0: warning: changing search order for system directory "/usr/local/include" cpp0: warning: as it has already been specified as a non-system directory configure: failed program was: #line 3639 "configure" #include "confdefs.h" #include <plib/pu.h> rigo's urls posted on http://bugs.gentoo.org/show_bug.cgi?id=6782: http://gcc.gnu.org/ml/gcc/2002-06/msg00746.html http://mail.python.org/pipermail/python-dev/2002-June/025990.html say that these new cpp0 warnings (caused by search order changes, see above) can brake configure scripts even if the headers are existing and should be found actually. as the search order was changed due to /usr/local/include included in the search path we basically "just" need to get rid of that "-I/usr/local/include" on your boxes. it gets included as you probably have a /usr/local/include directory whereas i do not have any such directory. now for "clean" gentoo we do not have any /usr/local/include as /usr/include serves for that purpose (at least in the most current baselayout). thus you having this directory is probably caused by some broken old ebuilds not removed/updated properly or - more likely -by manually, locally installed non-gentoo-things. thus for testing, could you please try the following: `mv /usr/local/include /usr/local/include.brokenstuff && emerge FlightGear` this solves my reproduced error here and it should solve yours too :) regarding the fix i think i should fix the configure script from within the ebuild as having /usr/local/include is perfectly okay according to the fhs: http://www.pathname.com/fhs/2.2/fhs-4.9.html regarding fixing the mess: the only workaround (not a solution) i found is an ugly hack for skipping all the "plib/pu.h not found" tests: http://www.mail-archive.com/flightgear-users@flightgear.org/msg00953.html hmm... i think i will check it with the flightgear-devs to see what has to be done.
Moving /usr/local/include seems to be working to solve the plib problem for me.
You were right about local/include ...Not much in there anyway, so I dumped it right away ;) Checking for gluLookAt in -lGLU... yes checking for glutGetModifiers in -lglut... yes checking for glutGameModeString in -lglut... yes checking for plib/pu.h... yes checking for mk4.h... yes checking for zlib.h... yes checking for ANSI C header files.. YaY ! :-D ! I'll guess the rest goes as expected, Prima Bug-catching, Chapeau ! Rigo
well, thanks a lot to all of you (and bernie brights from fg-devel) for helpful hints and testing! :) i will now upload new SimGear-0.0.18_gentoo.tgz and FlightGear-0.7.10_gentoo.tgz ebuild tarballs which include a configure fix as a workaround for this problem. thus with these ebuilds, building sg and fg should be also possible for people having e.g. a /usr/local/include directory. btw. http://www.icu.unizh.ch/~mettlerd/gentoo/files/FlightGear-0.7.10_gentoo_2in1.tgz has been updated too.
Created attachment 3540 [details] SimGear-0.0.18_gentoo.tgz includes a fix for configure, replaces all previous SimGear-0.0.18_gentoo.tgz (2585, 3432)
Created attachment 3760 [details] SimGear-0.2.0.ebuild Needs plib-1.6.0 (Bug #7683 )
Created attachment 3762 [details] SimGear-0.2.0.ebuild Commented out the ./configure hack (Doesn't seem to be needed anymore)...Can get it to compile, but not with jpeg-factory support..Can anybody verify this ? Rigo
rehi, jpeg-factory doesn't work for me either Making all in screen make[3]: Entering directory `/var/tmp/portage/SimGear-0.2.0/work/SimGear-0.2.0/simgear/screen' source='GLBitmaps.cxx' object='GLBitmaps.o' libtool=no \ depfile='.deps/GLBitmaps.Po' tmpdepfile='.deps/GLBitmaps.TPo' \ depmode=gcc3 /bin/sh ../../depcomp \ g++ -DHAVE_CONFIG_H -I. -I. -I../../simgear -I../.. -I/usr/X11R6/include -march=athlon-tbird -O3 -pipe -D_REENTRANT -c -o GLBitmaps.o `test -f GLBitmaps.cxx || echo './'`GLBitmaps.cxx make[3]: *** No rule to make target `jpgfactory.cxx', needed by `jpgfactory.o'. Stop. make[3]: Leaving directory `/var/tmp/portage/SimGear-0.2.0/work/SimGear-0.2.0/simgear/screen' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/SimGear-0.2.0/work/SimGear-0.2.0/simgear' make[1]: *** [all] Error 2 make[1]: Leaving directory `/var/tmp/portage/SimGear-0.2.0/work/SimGear-0.2.0/simgear' make: *** [all-recursive] Error 1 !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 53, Exitcode 2 !!! make of SimGear failed do not know why and unfortunately i lack the time to take a look at it as i am pretty busy with studies atm. however, it compiles without it. perhaps somebody could post it on flightgear-devel (i had to unsubscribe from most dev lists recently for not getting too much distracted from my "duties" ;)
Did you change --with-jpeg in --without ? (or -jpeg in USE/make.conf) Without it - 4 me - it compiles (and so on...FlightGear-0.8.0 ;-D)
btw. problem solved ;) just had to manually unmerge the old plib, simgear and flightgear ebuilds before emerging the new ones (a bit amazing though, needs some more observations). still using export USE="-jpeg". see bug #5578 too.
working in flightgear-0.9.1 and simgear-0.3.1