Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508304 - x11-wm/i3-4.7.2 - ld: cannot find -li3 (parallel make)
Summary: x11-wm/i3-4.7.2 - ld: cannot find -li3 (parallel make)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Kacper Kowalik (Xarthisius) (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 499098
  Show dependency tree
 
Reported: 2014-04-21 09:16 UTC by Ferenc Erki
Modified: 2014-05-27 07:31 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,64.51 KB, text/plain)
2014-04-21 09:17 UTC, Ferenc Erki
Details
i3-4.7.2-parallel-make.patch (i3-4.7.2-parallel-make.patch,2.28 KB, patch)
2014-04-22 15:50 UTC, Julian Ospald
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ferenc Erki 2014-04-21 09:16:02 UTC
Compile failed during an upgrade attempt from x11-wm/i3-4.6 to 4.7.2. Recompilation of 4.6 also failed with the same error message.

Reproducible: Always

Steps to Reproduce:
1. Add FEATURES=distcc to /etc/portage/make.conf
2. emerge x11-wm/i3
Actual Results:  
Compilation fails with:
...
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -li3
...

Expected Results:  
Compile and install cleanly.

Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)
=================================================================
System uname: Linux-3.12.13-gentoo-x86_64-Intel-R-_Core-TM-_i5-3317U_CPU_@_1.70GHz-with-gentoo-2.2
KiB Mem:     3903444 total,    946240 free
KiB Swap:    2097148 total,   2068792 free
Timestamp of tree: Mon, 21 Apr 2014 08:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo sunrise hasufell g-cpan ferki
Installed sets: @rex
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-11.x PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc 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"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.wheel.sk/"
LANG="en_GB.utf8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8 -l4"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/hasufell /usr/local/portage /home/ferki/projektek/gentoo-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bindist branding bzip2 cairo cli consolekit cracklib crypt cryptsetup cxx dbus devhelp device-mapper dri dts emboss encode exif fam fbcon ffmpeg firefox flac fortran gdbm geoclue gif git gnome-online-accounts gpm graphviz gtk gtk3 highlight hostip iconv icu imagemagick irc jabber java jpeg laptop lcms libkms libnotify libsecret mad minizip mmx mng modules mp3 mp4 mpeg multilib multiterm ncurses nls nptl nsplugin odf ogg opengl openmp openrc pam pango pcre pdf plugins png policykit ppds readline sdl sendto session sftp smp speex spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 startup-notification svg symlink tcpd telepathy tiff truetype udev udisks unicode upower usb v4l vim-pager vim-syntax vorbis webkit webkit2 wxwidgets x264 xcb xinerama xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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" 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" LINGUAS="en hu" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel" 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, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Ferenc Erki 2014-04-21 09:17:26 UTC
Created attachment 375408 [details]
build.log
Comment 2 Julian Ospald 2014-04-22 15:50:39 UTC
Created attachment 375486 [details, diff]
i3-4.7.2-parallel-make.patch
Comment 3 Julian Ospald 2014-04-22 16:02:44 UTC
I can't actually reproduce your issue, but I believe this will fix it. Please test.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-22 16:23:18 UTC
(In reply to Julian Ospald (hasufell) from comment #3)
> I can't actually reproduce your issue, but I believe this will fix it.

The way to at least sometimes reproduce this would be to set both -j and -l in MAKEOPTS, FEATURES=distcc, and make sure i3 is compiled on the slowest host with the other distcc-host(s) being the quicker ones.

Since make doesn't measure the other system's load average, but does use it (-lN..), it will start to catch recipes with missing requirements (such as local libraries that haven't been built yet).
Comment 5 Ferenc Erki 2014-04-22 17:13:14 UTC
(In reply to Julian Ospald (hasufell) from comment #3)
> I can't actually reproduce your issue, but I believe this will fix it.
> Please test.

Thanks, hasufell, your patch does fix the issue indeed!

(In reply to Jeroen Roovers from comment #4)
> The way to at least sometimes reproduce this would be to set both -j and -l
> in MAKEOPTS, FEATURES=distcc, and make sure i3 is compiled on the slowest
> host with the other distcc-host(s) being the quicker ones.

I tried to compile with various settings (without hasufell's patch). You are right about 'compiled on the slowest host', as the other machine was turned off, but it seems it is enough to set -jN with N > number of threads (which is 4 for me) to reproduce the issue. In other words, it was possible to reproduce it without the -l in MAKEOPTS.
Comment 6 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2014-05-27 07:31:13 UTC
*i3-4.7.2-r1 (24 Apr 2014)

  24 Apr 2014; Kacper Kowalik <xarthisius@gentoo.org>
  +files/i3-4.7.2-cflags.patch, +files/i3-4.7.2-parallel_make.patch,
  +i3-4.7.2-r1.ebuild:
  Respect CFLAGS during linking phase, make build parallel safe. Fixes #508304
  by Ferenc Erki <erkiferenc@gmail.com> and #508426 by Julian Ospald
  <hasufell@gentoo.org>. Thanks to hasufell for the patches