gcc -O2 -O3 -mcpu=athlon-xp -march=athlon-xp -pipe -fomit-frame-pointer -mmmx -msse -m3dnow -mfpmath=sse -D_REENTRANT -static -o player_example player_example.o -Wl,-rpath -Wl,/usr/lib ../lib/.libs/libtheora.a -L/usr/lib /usr/lib/libSDL.a /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libstdc++.a -L/usr/i686-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -L/usr/lib/gcc-lib/i686-pc-linux-gnu/../../../i686-pc-linux-gnu/lib -lgcc_s -lc -L/usr/X11R6/lib /usr/lib/libasound.so -ldl -lXext -lvga /usr/lib/libaa.a -lslang -lX11 /usr/lib/libvorbis.a -lm /usr/lib/libogg.a -lpthread /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status make[1]: *** [player_example] Error 1 make[1]: Leaving directory `/var/tmp/portage/libtheora-1.0_alpha2/work/libtheora-1.0alpha2/examples' make: *** [all-recursive] Error 1 !!! ERROR: media-libs/libtheora-1.0_alpha2 failed. !!! Function src_compile, Line 22, Exitcode 2 !!! (no error message) Interestingly enough, libgcc_s.so exists on my system: # find / -xdev -name "*gcc_s*" /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libgcc_s.so.1 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libgcc_s.so
The Problem seems to be the '-static' flag, beat me if i'm wrong...
You are correct. If I remove -all-static from LDFLAGS in ./examples/Makefile it compiles correctly. Is this a valid fix or just a workaround?
*** Bug 43272 has been marked as a duplicate of this bug. ***
Since the programs in examples are registred as with "noinst_" prefix in Makefile.am they won't be installed. It's useless to build them since portage will erase the build dir. So changing to subdir lib before building and installing seems to be a correct workaround : --- libtheora-1.0_alpha2.ebuild.old 2004-02-29 19:52:26.000000000 +0100 +++ libtheora-1.0_alpha2.ebuild 2004-02-29 19:51:41.000000000 +0100 @@ -19,11 +19,14 @@ src_compile() { econf --enable-shared || die + cd ${S}/lib emake || die } src_install() { + cd ${S}/lib make DESTDIR=${D} install || die + cd ${S} dodoc README }
You have to install headers, too: src_install() { cd ${S}/lib make DESTDIR=${D} install || die cd ${S}/include make DESTDIR=${D} install || die cd ${S} dodoc README }
I tried editing the ebuild with these changes, but I still get the same error.
Scratch that, left the major change out. Changes work great.
Created attachment 27059 [details] libtheora-1.0_alpha2-r1.ebuild Just in case this bug isn't getting fixed because the media-video herd is overworked (or just lazy), here's a working ebuild with the above fixes applied.
Created attachment 27695 [details] libtheora-1.0_alpha3.ebuild Version bumped. Added sed in src_unpack for this bugs. Removed media-libs/libsdl from DEPEND. SDL is needed by ${S}/examples/player_example, but the ebuild does not install it. Added docdir in src_install.
Matsuu, yeah, that's a smarter way to do it. Matsuu's ebuild Works For Me(TM).
sorry for delay, in cvs