Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42807 - media-libs/libtheora-1.0_alpha2 fails to build; complains about -lgcc_s
Summary: media-libs/libtheora-1.0_alpha2 fails to build; complains about -lgcc_s
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 43272 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-24 14:28 UTC by Keith Constable
Modified: 2004-03-21 13:57 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libtheora-1.0_alpha2-r1.ebuild (libtheora-1.0_alpha2-r1.ebuild,751 bytes, text/plain)
2004-03-08 16:07 UTC, Keith Constable
Details
libtheora-1.0_alpha3.ebuild (libtheora-1.0_alpha3.ebuild,880 bytes, text/plain)
2004-03-20 09:49 UTC, MATSUU Takuto (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Constable 2004-02-24 14:28:25 UTC
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
Comment 1 Heiko Helmle 2004-02-24 15:34:42 UTC
The Problem seems to be the '-static' flag, beat me if i'm wrong...
Comment 2 Keith Constable 2004-02-24 17:21:09 UTC
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?
Comment 3 Martin Holzer (RETIRED) gentoo-dev 2004-02-29 04:47:57 UTC
*** Bug 43272 has been marked as a duplicate of this bug. ***
Comment 4 Olivier Castan 2004-02-29 10:56:14 UTC
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
 }

Comment 5 Vaclav Slavik 2004-03-06 12:59:27 UTC
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
}
Comment 6 Curt Parker (dirtboy) 2004-03-08 13:14:04 UTC
I tried editing the ebuild with these changes, but I still get the same error.
Comment 7 Curt Parker (dirtboy) 2004-03-08 13:21:00 UTC
Scratch that, left the major change out.  Changes work great.
Comment 8 Keith Constable 2004-03-08 16:07:27 UTC
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.
Comment 9 MATSUU Takuto (RETIRED) gentoo-dev 2004-03-20 09:49:02 UTC
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.
Comment 10 Keith Constable 2004-03-20 11:08:44 UTC
Matsuu, yeah, that's a smarter way to do it.

Matsuu's ebuild Works For Me(TM).
Comment 11 Martin Holzer (RETIRED) gentoo-dev 2004-03-21 13:57:44 UTC
sorry for delay, in cvs