Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 394885

Summary: net-p2p/rtorrent-0.8.9 fails to link because of missing lpthread for LIBS
Product: Gentoo Linux Reporter: Attila Tóth <atoth>
Component: Current packagesAssignee: Gentoo net-p2p team <net-p2p>
Status: RESOLVED WORKSFORME    
Severity: normal CC: vostorga
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://libtorrent.rakshasa.no/ticket/2291
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Proposed ebuild to solve the problem

Description Attila Tóth 2011-12-16 00:50:07 UTC
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I/var/tmp/portage/net-p2p/rtorrent-0.8.9/work/rtorrent-0.8.9/src -I.. -I/var/tmp/portage/net-p2p/rtorrent-0.8.9/work/rtorrent-0.8.9/src -I/var/tmp/portage/net-p2p/rtorrent-0.8.9/work/rtorrent-0.8.9    -O2 -march=i686 -mtune=athlon-mp -pipe -DNDEBUG -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include       -I/usr/include  -c -o main.o /var/tmp/portage/net-p2p/rtorrent-0.8.9/work/rtorrent-0.8.9/src/main.cc
rm -f libsub_root.a
i686-pc-linux-gnu-ar cru libsub_root.a command_download.o command_dynamic.o command_events.o command_file.o command_helpers.o command_local.o command_network.o command_peer.o command_tracker.o command_scheduler.o command_ui.o control.o globals.o option_parser.o signal_handler.o thread_base.o thread_main.o thread_worker.o
i686-pc-linux-gnu-ranlib libsub_root.a
/bin/sh ../libtool --tag=CXX   --mode=link i686-pc-linux-gnu-g++  -O2 -march=i686 -mtune=athlon-mp -pipe -DNDEBUG -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include       -I/usr/include   -Wl,-O1 -Wl,--as-needed -o rtorrent main.o libsub_root.a ui/libsub_ui.a core/libsub_core.a display/libsub_display.a input/libsub_input.a rpc/libsub_rpc.a utils/libsub_utils.a -lncursesw  -lsigc-2.0   -lcurl   -ltorrent   -L/usr/lib   -lxmlrpc_server -lxmlrpc -lxmlrpc_util -lxml2 -lz -lm
libtool: link: i686-pc-linux-gnu-g++ -O2 -march=i686 -mtune=athlon-mp -pipe -DNDEBUG -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include -Wl,-O1 -o rtorrent main.o  -Wl,--as-needed libsub_root.a ui/libsub_ui.a core/libsub_core.a display/libsub_display.a input/libsub_input.a rpc/libsub_rpc.a utils/libsub_utils.a -lncursesw -lsigc-2.0 -lcurl -ltorrent -L/usr/lib -lxmlrpc_server -lxmlrpc -lxmlrpc_util -lxml2 -lz -lm
/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: libsub_root.a(thread_base.o): undefined reference to symbol 'pthread_create@@GLIBC_2.1'
/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/../../../../i686-pc-linux-gnu/bin/ld: note: 'pthread_create@@GLIBC_2.1' is defined in DSO /lib/libpthread.so.0 so try adding it to the linker command line
/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[3]: *** [rtorrent] Error 1


Reproducible: Always




emerge --info
Portage 2.1.10.11 (hardened/linux/x86, gcc-4.5.3, glibc-2.13-r4, 3.1.1-hardened-r1 i686)
=================================================================
System uname: Linux-3.1.1-hardened-r1-i686-AMD_Athlon-TM-_MP_2600+-with-gentoo-2.0.3
Timestamp of tree: Wed, 14 Dec 2011 22:00:01 +0000
ccache version 3.1.6 [disabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.4_p6-r1, 1.5-r1, 1.6.3::<unknown repository>, 1.7.9-r2, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.4.6-r1, 4.5.3-r2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo x-portage hardened-dev anarchy x-overlay
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -mtune=athlon-mp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/mozilla/defaults/pref /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -mtune=athlon-mp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.inf.elte.hu/ http://gentoo.inode.at/"
LANG="hu_HU.utf8"
LC_ALL="hu_HU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="hu en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/hardened-development /var/lib/layman/anarchy /home/atoth/public_html/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="32bit 3dnow 3dnowext 7zip GNU R X X509 Xaw3d a52 aac aalib acl acpi aiglx aio aisleriot alaw alsa amr aotuv apache2 apng applet archive ares asf atmo audio audiofile bash-completion bazaar bcmath bdf berkdb bind binfilter bitmap-fonts bittorrent blas bluetooth bonobo boost branding browserplugin bugzilla bzip2 cairo calendar canvas caps cdaudio cdda cddax cddb cdio cdparanoia cdr cdrom celt cgi chardet charmap checkpath cheese clamdtop cli clutter color colord consolekit contentcache context contrib coverage cracklib cramfs crashreporter crypt css ctype cue cups curl curlwrappers cvs cxx dba dbm dbus dcmtk ddate deskbar detex devhelp device-mapper dga dhcp dia dicom dirac disassembler discard-path divx divx4linux djbfft djvu dlloader dmi dnsrbl doc-pdf dot dri dselect dtmf dts dv dvd dvdnav dvdr dvdread dvi dvi2tty dvipdfm eap-sim ecap eds egl elf embed emerald enca enchant encode enscript epiphany epoll evo exif expat extensions extra extrafilters extras faac faad fam fame fat fax ffmpeg fftw fileinfo finger firefox firefox-bookmarks flac flash flatfile flickr floppy fltk follow-xff fontconfig fontforge foomaticdb force-cgi-redirect fortran fpm fpx ftdi ftp g722 g729 gadu gajim galago gallium gbm gconf gd gdb gdbm gdl gdu gedit geoip gftp gif gimp gimpprint ginac git glade glchess gles glibc gme gmedia gmp gnet gnome gnome-keyring gnumeric gopher gpac gpg gphoto2 gpm graphics graphicsmagick graphviz groupwise gs gsf gsl gsm gstreamer gtalk gtk gtk2 gtk3 gtkhtml guile h224 h281 h323 hardened hash hdf5 hpcups hpijs html http hub icap-client iconv icu id3 id3tag idle idn iksemel ilbc imagemagick imap imlib inherit-graph inifile inkjar inode intl introspection ipc iplayer iplsrc iptc irc irda ivr jabber jadetex java java-internal java6 javascript jemalloc jingle jpeg jpeg2k jpgraph jrtplib json kate kdrive kpathsea ladspa lame lapack latex latex3 lcms ldb libass libburn libcaca libffi libgda libkms libnl libnotify libplot libsamplerate libssh2 libv4l2 lightning llvm lm_sensors logging logitech-mouse loop-aes lua lyx lzma lzo lzw m17n-lib mad map matroska mbox mcal md5sum meanwhile memlimit mercurial mhash midi mikmod milter ming mjpeg mktemp mmap mmx mmxext mng mode-owner modules motif mozbranding mozcalendar mp2 mp3 mp4 mpeg mpeg1 mpeg2 mplayer mudflap multinetwork musepack mysql mysqli nautilus ncurses nemesi netlink network networking new-login nifti nls nntp nokia nopop3d nptl nptlonly nsplugin nss ntfs nut nuv oav ocr odbc odk ofx ogg oggvorbis ogm oidentd oil onaccess opencore-amr openct opendbx openexr opengl openmp openssl openvg optimisememory otr overload packagekit pam pam_chroot pam_ssh pam_timestamp pango passwd passwdqc paste64 pasteafter pax_kernel pccts pcmcia pcntl pcre pcsc-lite pda pdf pdfannotextractor pdfimport pdo pear perl phar php pic pidgin playlist plotutils png pnm policykit posix postscript ppds pppd prefixaq projectm pstricks publishers pvr python python2 qhull qt3support quicktime quota quotas rar rc5 rcs readline realmedia reflection reiserfs remoteosd replytolist rle rss rtc rtf samba sasl sbc scanner scenarios schroedinger science scp screen scripting sdl sdl-sound sdlgfx secure-delete seed sendmail sendto sensord serprog session sftplogging shared-dricore shared-glapi shm short-touchpad-timeout showlistmodes showtabbar sid sidebar sieve silc sip sipim skins slang smbsharemodes smime smp sms smtp sndfile soap socialweb sockets sound soundex soundtouch sourceview sox sparse speex spell spoof sqlite3 srt srtp sse ssh ssl ssp sspall startup-notification stats stun subtitles subversion sudoku suhosin svg svnserve swat sysfs syslog system-sqlite systray sysvipc t1lib taglib tagwriting tcl tcltk tcpd templates terminal tetex tex4ht tga themes theora threads threadsafe thunderbird tidy tiff tilepath tk tlen tokenizer toolbar tools topicisnuhost totem tracker transcode trayicon truetype truetype-fonts twolame type1-fonts type3 udev ulaw underscores unicode unlock-notify usb userlocales usermod utils v4l v4l2 vala valgrind vcd vcdinfo vcdx video vidix virus-scan vista visualization vlc vlm volpack vorbis vtk vxml wav wavplay webkit webm webp wifi wildcards wimax win32codecs winscp wma wmf wmp wps wxwidgets wxwindows x264 x86 xattr xcap xcb xchatdccserver xetex xforms xine xmedcon xml xml2 xmlreader xmlrpc xmlwriter xmp xnest xorg xpm xps xsl xulrunner xv xvfb xvid xvmc yahoo zip zlib zvbi" ALSA_CARDS="cmipci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias auth_digest version filter ident charset_lite asis dbd authn_dbd proxy proxy_ajp proxy_balancer proxy_connect proxy_http imagemap cgid substitute" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse acecad evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hu en" PHP_TARGETS="php5-3 php5-4" RUBY_TARGETS="ruby18" SANE_BACKENDS="epson epson2 gt68xx ma1509 mustek mustek_usb mustek_usb2 plustek snapscan umax" USERLAND="GNU" VIDEO_CARDS="radeon v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Attila Tóth 2011-12-16 00:55:12 UTC
Created attachment 295989 [details]
Proposed ebuild to solve the problem

+# taken from http://libtorrent.rakshasa.no/ticket/2291
+sed -ri 's/^(LIBS = .+)/\1 -lpthread/' ../rtorrent-0.8.9_build/Makefile
+sed -ri 's/^(LIBS = .+)/\1 -lpthread/' ../rtorrent-0.8.9_build/src/Makefile
Comment 2 Vicente Olivert Riera (RETIRED) gentoo-dev 2013-07-08 10:50:59 UTC
I don't have that problem. Is(In reply to Attila Tóth from comment #1)
> Created attachment 295989 [details]
> Proposed ebuild to solve the problem
> 
> +# taken from http://libtorrent.rakshasa.no/ticket/2291
> +sed -ri 's/^(LIBS = .+)/\1 -lpthread/' ../rtorrent-0.8.9_build/Makefile
> +sed -ri 's/^(LIBS = .+)/\1 -lpthread/' ../rtorrent-0.8.9_build/src/Makefile


That bug (http://libtorrent.rakshasa.no/ticket/2291) was closed as invalid.

I can't reproduce your problem.
Comment 3 Víctor Ostorga (RETIRED) gentoo-dev 2014-06-08 17:41:41 UTC
Please reopen if you can reproduce it.