test_storage.o: In function `run_storage_tests(boost::intrusive_ptr<libtorrent::torrent_info>, boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&, libtorrent::storage_mode_t)': test_storage.cpp:(.text+0x10f5): undefined reference to `test_sleep(int)' test_storage.cpp:(.text+0x1196): undefined reference to `test_sleep(int)' test_storage.o: In function `test_fastresume()': test_storage.cpp:(.text+0x40de): undefined reference to `create_torrent(std::basic_ostream<char, std::char_traits<char> >*)' test_storage.cpp:(.text+0x42a3): undefined reference to `test_sleep(int)' test_storage.cpp:(.text+0x42f9): undefined reference to `test_sleep(int)' test_storage.cpp:(.text+0x4347): undefined reference to `test_sleep(int)' test_storage.cpp:(.text+0x4395): undefined reference to `test_sleep(int)' test_storage.cpp:(.text+0x43e3): undefined reference to `test_sleep(int)' test_storage.o:test_storage.cpp:(.text+0x4431): more undefined references to `test_sleep(int)' follow collect2: ld returned 1 exit status make[1]: *** [test_storage] Error 1 make[1]: *** Waiting for unfinished jobs.... creating test_piece_picker x86_64-pc-linux-gnu-g++ -ftemplate-depth-50 -I../include -I../include/libtorrent -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -O2 -march=k8 -pipe -funroll-loops -o .libs/test_metadata_extension main.o setup_transfer.o test_metadata_extension.o -L/usr/lib -pthread ../src/.libs/libtorrent.so -lz -lboost_date_time-mt -lboost_filesystem-mt -lboost_thread-mt -lssl -lcrypto x86_64-pc-linux-gnu-g++ -ftemplate-depth-50 -I../include -I../include/libtorrent -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -O2 -march=k8 -pipe -funroll-loops -o .libs/test_buffer main.o test_buffer.o -L/usr/lib -pthread ../src/.libs/libtorrent.so -lz -lboost_date_time-mt -lboost_filesystem-mt -lboost_thread-mt -lssl -lcrypto test_metadata_extension.o: In function `test_transfer(bool, bool)': test_metadata_extension.cpp:(.text+0x57a): undefined reference to `setup_transfer(libtorrent::session*, libtorrent::session*, libtorrent::session*, bool, bool, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)' test_metadata_extension.cpp:(.text+0x68c): undefined reference to `print_alerts(libtorrent::session&, char const*, bool, bool)' test_metadata_extension.cpp:(.text+0x6a5): undefined reference to `print_alerts(libtorrent::session&, char const*, bool, bool)' test_metadata_extension.cpp:(.text+0x9bd): undefined reference to `test_sleep(int)' test_metadata_extension.cpp:(.text+0xbd7): undefined reference to `test_sleep(int)' test_metadata_extension.cpp:(.text+0xc22): undefined reference to `print_alerts(libtorrent::session&, char const*, bool, bool)' test_metadata_extension.cpp:(.text+0xc3b): undefined reference to `print_alerts(libtorrent::session&, char const*, bool, bool)' test_metadata_extension.cpp:(.text+0xc5f): undefined reference to `test_sleep(int)' collect2: ld returned 1 exit status make[1]: *** [test_metadata_extension] Error 1 creating test_buffer x86_64-pc-linux-gnu-g++ -ftemplate-depth-50 -I../include -I../include/libtorrent -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -O2 -march=k8 -pipe -funroll-loops -o .libs/test_swarm main.o setup_transfer.o test_swarm.o -L/usr/lib -pthread ../src/.libs/libtorrent.so -lz -lboost_date_time-mt -lboost_filesystem-mt -lboost_thread-mt -lssl -lcrypto test_swarm.o: In function `test_swarm()': test_swarm.cpp:(.text+0x5ba): undefined reference to `setup_transfer(libtorrent::session*, libtorrent::session*, libtorrent::session*, bool, bool, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)' test_swarm.cpp:(.text+0x6fa): undefined reference to `print_alerts(libtorrent::session&, char const*, bool, bool)' test_swarm.cpp:(.text+0x710): undefined reference to `print_alerts(libtorrent::session&, char const*, bool, bool)' test_swarm.cpp:(.text+0x726): undefined reference to `print_alerts(libtorrent::session&, char const*, bool, bool)' test_swarm.cpp:(.text+0xaed): undefined reference to `test_sleep(int)' test_swarm.o: In function `test_main()': test_swarm.cpp:(.text+0x19fc): undefined reference to `test_sleep(int)' collect2: ld returned 1 exit status make[1]: *** [test_swarm] Error 1 ../test/setup_transfer.cpp:242: fatal error: opening dependency file .deps/../test/setup_transfer.Tpo: No such file or directory compilation terminated. make[1]: *** [../test/setup_transfer.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/net-libs/rb_libtorrent-0.13/work/libtorrent-0.13/test' make: *** [all-recursive] Error 1 * * ERROR: net-libs/rb_libtorrent-0.13 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2565: Called die * The specific snippet of code: * emake || die "emake failed" * The die message: * emake failed Reproducible: Always Steps to Reproduce: 1,emerge rb_libtorrent (net-libs/rb_libtorrent-0.13) 2.compile breaks 3. ~ # emerge --info Portage 2.2_rc1 (default-linux/amd64/2007.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r6 x86_64) ================================================================= System uname: Linux-2.6.25-gentoo-r6-x86_64-Dual-Core_AMD_Opteron-tm-_Processor_2214-with-glibc2.2.5 Timestamp of tree: Fri, 11 Jul 2008 17:30:01 +0000 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7, 2.1.6-r1 dev-lang/python: 2.5.2-r5 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r3 sys-devel/autoconf: 2.13, 2.62-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 2.2.4 virtual/os-headers: 2.6.25-r4 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=k8 -pipe -funroll-loops" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-O2 -march=k8 -pipe -funroll-loops" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LC_ALL="en_US" LDFLAGS="" LINGUAS="en_US" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" 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" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X acl acpi alsa amd64 apache2 ati berkdb bitmap-fonts bluetooth cairo cd cdr cli cracklib crypt cups dri dvd dvdr dvdread emacs fbcon firefox flash foomaticdb fortran gd gdbm gif gimp gimpprint glitz gpm gstreamer gtk gtk2 iconv ipv6 isdnlog java jpeg jpeg2k jpg lm_sensors me midi mikmod mmx mp3 mpeg mpm-worker mudflap mysql ncurses nls nptl nptlonly nsplugin ogg oggvorbis opengl openmp oss pam pcre pdf perl php png ppds pppd pvr python quickti readline reflection session spell spl sse sse2 ssl stream svg tcpd themes threads tif tiff truetype-fonts type1-font unicode usb vorbis xinerama xml xmm xorg zlib" ALSA_CARDS="hda_intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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 filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Try with MAKEOPTS="-j1"
thnx Raúl Porcel repeated with MAKEOPTS="-j1" and it compiled correctly fixed
This issue is still happening for me on amd64. Although setting MAKEOPTS="-j1" works, this is a WORKAROUND, not a solution. Isn't there a way to force MAKEOPTS="-j1" in the ebuild or something? It took me a while to find this bug and I wasted a bunch of time trying different versions of rb_libtorrent that also exhibited the same problem. People shouldn't have to go through this just to get rb_libtorrent installed when they have a MAKEOPTS other than -j1. Suggesting to re-open and fix properly.