Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140248 - dev-libs/libsigc++-1.0.4-r3 fails with --as-needed
Summary: dev-libs/libsigc++-1.0.4-r3 fails with --as-needed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: GNOME C++ Bindings Maintainers (OBSOLETE)
Depends on:
Blocks: as-needed
  Show dependency tree
Reported: 2006-07-13 08:44 UTC by Matthias Schwarzott
Modified: 2008-07-10 13:49 UTC (History)
3 users (show)

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

libsigc++-1.0.4-r3.ebuild patch (libsigc++-1.0.4-r3.ebuild.patch,1.29 KB, patch)
2006-11-08 07:07 UTC, Timothy Redaelli (RETIRED)
Details | Diff
spam removed (spam removed,87 bytes, patch)
2008-01-14 21:56 UTC, Derek Hval (DISABLED FOR SPAM)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Schwarzott gentoo-dev 2006-07-13 08:44:13 UTC
libsigc++-1.0.4-r3 fails to compile with LDFLAGS="-Wl,--as-needed".

/bin/sh ../libtool --mode=link c++  -O2 -march=athlon-xp -fomit-frame-pointer -pipe -Wl,--as-needed -o -rpath /usr/lib -version-info 0:0:0                      -release 1.0 -no-undefined object.lo scope.lo marshal.lo slot.lo basic_signal.lo adaptor.lo thread.lo
rm -fr .libs/ .libs/libsigc.* .libs/libsigc-1.0.*
gcc -shared  object.lo scope.lo marshal.lo slot.lo basic_signal.lo adaptor.lo thread.lo  -lc  -Wl,-soname -Wl, -o .libs/
(cd .libs && rm -f && ln -s
(cd .libs && rm -f && ln -s
ar cru .libs/libsigc.a  object.o scope.o marshal.o slot.o basic_signal.o adaptor.o thread.o
ranlib .libs/libsigc.a
(cd .libs && rm -f && ln -s ../
make[2]: Leaving directory `/var/tmp/portage/libsigc++-1.0.4-r3/work/libsigc++-1.0.4/sigc++'
make[1]: Leaving directory `/var/tmp/portage/libsigc++-1.0.4-r3/work/libsigc++-1.0.4/sigc++'
Making all in tests
make[1]: Entering directory `/var/tmp/portage/libsigc++-1.0.4-r3/work/libsigc++-1.0.4/tests'
Making all in handles
make[2]: Entering directory `/var/tmp/portage/libsigc++-1.0.4-r3/work/libsigc++-1.0.4/tests/handles'
c++ -DHAVE_CONFIG_H -I. -I. -I../../sigc++/config -I../..    -O2 -march=athlon-xp -fomit-frame-pointer -pipe -c
/bin/sh ../../libtool --mode=link c++  -O2 -march=athlon-xp -fomit-frame-pointer -pipe -Wl,--as-needed -o ctor  ctor.o ../../sigc++/ -lpthread
mkdir .libs
c++ -O2 -march=athlon-xp -fomit-frame-pointer -pipe -Wl,--as-needed -o .libs/ctor ctor.o ../../sigc++/.libs/ -lpthread
../../sigc++/.libs/ undefined reference to `pthread_create'
../../sigc++/.libs/ undefined reference to `pthread_getspecific'
../../sigc++/.libs/ undefined reference to `pthread_key_delete'
../../sigc++/.libs/ undefined reference to `pthread_detach'
../../sigc++/.libs/ undefined reference to `pthread_key_create'
../../sigc++/.libs/ undefined reference to `pthread_mutex_trylock'
../../sigc++/.libs/ undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make[2]: *** [ctor] Fehler 1
make[2]: Leaving directory `/var/tmp/portage/libsigc++-1.0.4-r3/work/libsigc++-1.0.4/tests/handles'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/libsigc++-1.0.4-r3/work/libsigc++-1.0.4/tests'
make: *** [all-recursive] Fehler 1

!!! ERROR: dev-libs/libsigc++-1.0.4-r3 failed.
Call stack:, line 1545:   Called dyn_compile, line 940:   Called src_compile
  libsigc++-1.0.4-r3.ebuild, line 26:   Called die

!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if relevant.
Comment 1 Matthias Schwarzott gentoo-dev 2006-07-13 08:45:08 UTC
# emerge --info
Portage 2.1.1_pre2-r8 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17-gentoo-r1 i686)
                       System Settings
System uname: 2.6.17-gentoo-r1 i686 AMD Athlon(tm) XP 3000+
Gentoo Base System version 1.12.1
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  [Not Present]
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
FEATURES="autoaddcvs autoconfig ccache collision-detect cvs distlocks metadata-transfer parallel-fetch sandbox sfperms sign strict"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTDIR_OVERLAY="/home/matze/gentoo/overlays/sci /home/matze/gentoo/overlays/de /home/matze/gentoo/overlays/zzam"
USE="x86 3dnow 3dnowext X a52 aac acl alsa apache2 apm artswrappersuid audacious avi berkdb bitmap-fonts bluetooth bzip2 cap caps cddb cdparanoia cli crypt cups dbus dlloader doc dri dts dvb dvd dvdr eds emboss encode fbcon ffmpeg font-server foomaticdb fortran fuse gcj gdbm gif gimpprint glut gpm gstreamer gtk gtk2 hal imap imlib ipv6 isdnlog java jpeg jpeg2k kde kdexdeltas libg++ libwww lirc logitech-mouse mad mikmod mmx mmxext mng motif mp3 mpeg mplayer musicbrainz mysql ncurses nls nogecko-sdk nptl nptlonly nvram ogg opengl oss pam pcre pdf pdflib perl png ppds pppd python qt qt3 qt4 quotes readline reflection samba session sms sndfile softmmu spell spl sqlite sse ssl svg taglib tcltk tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd vdr visualization vorbis win32codecs wma wmf xinerama xml xorg xrandr xslt xv zlib zvbi elibc_glibc input_devices_mouse input_devices_keyboard kernel_linux linguas_de lirc_devices_all userland_GNU video_cards_v4l video_cards_vesa video_cards_vbdev video_cards_nv"
Comment 2 Matthias Schwarzott gentoo-dev 2006-07-13 08:56:27 UTC
Adding "-lpthread" for linking in sigc++ is enough but I don't know where in the original Makefile this belongs.
Comment 3 Timothy Redaelli (RETIRED) gentoo-dev 2006-11-08 07:07:51 UTC
Created attachment 101467 [details, diff]
libsigc++-1.0.4-r3.ebuild patch

This ebuild has many problems:
1) the as-needed problem
2) problem to cross-compile
3) problem with keeptemp/keepwork

This patch should fix all the problems
Comment 4 Derek Hval (DISABLED FOR SPAM) 2008-01-14 21:56:36 UTC
(Spam administratively removed, by, at Tue Jan 15 00:37:28 UTC 2008)
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2008-04-20 22:55:15 UTC
drizzt, you posted the ebuild patch, but not the as-needed patch.
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2008-07-10 12:30:45 UTC
The build failure was in the tests, so I've just removed them altogether. They were never really used.

Fixed in cvs without a revbump.
Comment 7 Rémi Cardona (RETIRED) gentoo-dev 2008-07-10 12:37:05 UTC
Bleh... I shouldn't have opened my mouth. They are used, I've just disabled them for now. Real fix on its way.
Comment 8 Rémi Cardona (RETIRED) gentoo-dev 2008-07-10 13:49:18 UTC
Ok so this is fixed for real. Here's the fix :

    # fix --as-needed, see bug #140248
    sed -i -e 's:^libsigc_la_LIBADD =:& $(THREAD_LIB):' \
        sigc++/ || die

I tried doing it properly with a real patch to, but the is _really_ old, and does a lot of crappy things. Fixing it all was not worth it for a package which is used by maybe 5 other ebuilds that should be treecleaned.

So I'm lazy and did this instead, pretty much like Timothy's patch.

Again, fixed without a revbump.