Created attachment 424576 [details] dev-libs/libusb-1.0.20 build log When trying to build dev-libs/libusb-1.0.20, the build process fails with the following output: libtool: compile: i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-libs/libusb-1.0.20/work/libusb-1.0.20/libusb -I.. -std=gnu99 -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow -pthread -fvisibility=hidden -O2 -march=native -mfpmath=sse -pipe -c /var/tmp/portage/dev-libs/libusb-1.0.20/work/libusb-1.0.20/libusb/os/linux_udev.c -fPIC -DPIC -o os/.libs/libusb_1_0_la-linux_udev.o /bin/sh ../libtool --tag=CC --mode=link i686-pc-linux-gnu-gcc -std=gnu99 -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow -pthread -fvisibility=hidden -O2 -march=native -mfpmath=sse -pipe -version-info 1:0:1 -no-undefined -Wl,-O1 -Wl,--as-needed -o libusb-1.0.la -rpath /usr/lib libusb_1_0_la-core.lo libusb_1_0_la-descriptor.lo libusb_1_0_la-io.lo libusb_1_0_la-strerror.lo libusb_1_0_la-sync.lo libusb_1_0_la-hotplug.lo os/libusb_1_0_la-threads_posix.lo os/libusb_1_0_la-linux_usbfs.lo os/libusb_1_0_la-poll_posix.lo os/libusb_1_0_la-linux_udev.lo -ludev -pthread libtool: link: i686-pc-linux-gnu-gcc -shared -fPIC -DPIC .libs/libusb_1_0_la-core.o .libs/libusb_1_0_la-descriptor.o .libs/libusb_1_0_la-io.o .libs/libusb_1_0_la-strerror.o .libs/libusb_1_0_la-sync.o .libs/libusb_1_0_la-hotplug.o os/.libs/libusb_1_0_la-threads_posix.o os/.libs/libusb_1_0_la-linux_usbfs.o os/.libs/libusb_1_0_la-poll_posix.o os/.libs/libusb_1_0_la-linux_udev.o -ludev -pthread -O2 -march=native -mfpmath=sse -Wl,-O1 -Wl,--as-needed -pthread -pthread -Wl,-soname -Wl,libusb-1.0.so.0 -o .libs/libusb-1.0.so.0.1.0 os/.libs/libusb_1_0_la-linux_usbfs.o: file not recognized: File truncated collect2: error: ld returned 1 exit status Makefile:549: recipe for target 'libusb-1.0.la' failed make[3]: *** [libusb-1.0.la] Error 1 make[3]: Leaving directory '/var/tmp/portage/dev-libs/libusb-1.0.20/work/libusb-1.0.20-abi_x86_32.x86/libusb' Makefile:755: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/var/tmp/portage/dev-libs/libusb-1.0.20/work/libusb-1.0.20-abi_x86_32.x86/libusb' Makefile:470: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/dev-libs/libusb-1.0.20/work/libusb-1.0.20-abi_x86_32.x86' Makefile:379: recipe for target 'all' failed make: *** [all] Error 2 Previous versions worked fine, so I guess there might be something new with the new version. A complete build log; here's the output of :emerge --info': Portage 2.2.27 (python 3.4.3-final-0, default/linux/x86/13.0/desktop, gcc-5.3.0, glibc-2.22-r1, 4.4.1-gentoo i686) ================================================================= System uname: Linux-4.4.1-gentoo-i686-AMD_E1-2100_APU_with_Radeon-TM-_HD_Graphics-with-gentoo-2.2 KiB Mem: 3578048 total, 2026272 free KiB Swap: 8191996 total, 8191996 free Timestamp of repository gentoo: Wed, 03 Feb 2016 18:15:01 +0000 sh bash 4.3_p42-r1 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 app-shells/bash: 4.3_p42-r1::gentoo dev-lang/perl: 5.22.1::gentoo dev-lang/python: 2.7.11-r2::gentoo, 3.4.3-r7::gentoo dev-util/cmake: 3.4.3::gentoo dev-util/pkgconfig: 0.29::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.20.4::gentoo sys-apps/sandbox: 2.10-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 5.3.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.22-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://celine.tisys.org/gentoo-portage priority: 1 tisys location: /usr/local/portage masters: gentoo priority: 2 ACCEPT_KEYWORDS="x86 ~x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=native -mfpmath=sse -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/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=native -mfpmath=sse -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -march=i686 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -march=i686 -pipe" GENTOO_MIRRORS="ftp://celine.tisys.org/pub/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg lcms ldap libnotify mad mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl seccomp session spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 x86 xattr xcb xml xv xvid zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" 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 ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" 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: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Same on amd64 with USE="abi_x86_32"
This is a "parallel make" bug. As a workaround, you can temporarily set MAKEOPTS="-j1" in make.conf (or in the environment or whereever).
I got hit with this bug this afternoon and can confirm the workaround by temporarily setting MAKEOPTS="-j1" before emerging. Hopefully this can get resolved with a more permanent fix shortly.
Same here on a amd64 no-multilib system The workaround MAKEOPTS="-j1" emerge -av1 =libusb-1.0.20 works. Thanks
Created attachment 424586 [details, diff] Backported fix for upstream issue #121 This is upstream issue https://github.com/libusb/libusb/issues/121 I backported the fix for libusb-1.20.
I added emake -j1 until a maintainer can review that patch. commit fc25f9f79f4ef187124eb43a9f0642ce09f71b17 Author: Mike Gilbert <floppym@gentoo.org> Date: Wed Feb 3 23:17:36 2016 -0500 dev-libs/libusb: Work around racy Makefile Bug: https://bugs.gentoo.org/573802 Package-Manager: portage-2.2.27_p57 dev-libs/libusb/libusb-1.0.20.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
(In reply to Mike Gilbert from comment #6) > I added emake -j1 until a maintainer can review that patch. The patch works for me.
FYI this has been fixed upstream and the workaround is no longer necessary for 1.0.21. See: https://github.com/libusb/libusb/issues/121 The workaround is still present in the ebuild for 1.0.21 and should be removed.
i've dropped the workaround in 1.0.21: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65c925a55012af9a2dc429f063263ffa9c68a091 i'll leave it in 1.0.20 since the upstream patch is non-trivial. i imagine the patch could be stripped down (since it's fixing more than one issue in the patch -- ugh), but prob not worth the effort at this point. thanks Mike for the 1.0.20 mitigation in the mean time!