Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517282 - autotools.eclass - MAKEOPTS=-j5 breaks? _elibtoolize
Summary: autotools.eclass - MAKEOPTS=-j5 breaks? _elibtoolize
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-17 05:15 UTC by Ryan Reich
Modified: 2014-11-14 01:31 UTC (History)
1 user (show)

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


Attachments
ebuild updated from gentoo-gx86-staging (providing multilib support) (gobject-introspection-1.40.0.ebuild,3.35 KB, text/plain)
2014-07-17 05:16 UTC, Ryan Reich
Details
ebuild environment (environment,163.36 KB, text/plain)
2014-07-17 05:26 UTC, Ryan Reich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Reich 2014-07-17 05:15:08 UTC
The attached ebuild (slightly modified from the gentoo-gx86-staging repository) fails when calling _elibtoolize with the following error:

***** libtoolize *****
***** PWD: /var/tmp/portage/dev-libs/gobject-introspection-1.40.0/work/gobject-introspection-1.40.0-abi_x86_32.x86
***** libtoolize --install --copy --force --automake -j5

libtoolize: unrecognized option `-j5'
libtoolize: Try `libtoolize --help' for more information.

Full build log and $(emerge --info) are attached.  This error seems to stem from the following line in _elibtoolize in autotools.eclass:

autotools_run_tool ${LIBTOOLIZE} "$@" ${opts}

which incorrectly expands the undeclared variable ${opts}, presumably set at some previous time to the value of ${MAKE_OPTS}, which for me contains "-j5".  This error was introduced in revision 1.135 of autotools.eclass (diff: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?r1=1.134&r2=1.135) when the function's logic was changed from the original, introduced in revision 1.19 (!), which did use a local variable of this name.

The correct line should simply omit ${opts}.

Reproducible: Always

Steps to Reproduce:
1. Set MAKE_OPTS="-j5" in /etc/portage/make.conf
2. Attempt to emerge the attached ebuild (e.g. with 'ebuild ./gobject-introspection-1.40.0.ebuild compile', after clean of course)

Actual Results:  
The ebuild fails when libtoolize is run; the backtrace shows that the '-j5' option is introduced when _elibtoolize calls autotools_run_tool.

Expected Results:  
libtoolize should be called without '-j5' as an option (which it does not support) and succeed.
Comment 1 Ryan Reich 2014-07-17 05:16:48 UTC
Created attachment 380862 [details]
ebuild updated from gentoo-gx86-staging (providing multilib support)
Comment 2 Ryan Reich 2014-07-17 05:20:28 UTC
Portage 2.2.10 (default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.8.3, glibc-2.19-r1, 3.15.3-gentoo x86_64)
=================================================================
System uname: Linux-3.15.3-gentoo-x86_64-Intel-R-_Core-TM-_i5-3317U_CPU_@_1.70GHz-with-gentoo-2.2
KiB Mem:     3993908 total,    354736 free
KiB Swap:    4194300 total,   4173228 free
Timestamp of tree: Unknown
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.7, 3.3.5, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
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.11.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.15 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo steam-overlay x-portage
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
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"
FCFLAGS="-march=native -O2 -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"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://lug.mtu.edu/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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/steam /usr/local/portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cli colord cracklib crypt cups cxx dbus dri dts dvd emboss encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg latex lcms ldap libnotify libsecret mad mmx mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support readline sdl session socialweb spell sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg systemd tcpd threads tiff truetype udev udisks unicode upower usb vim-syntax vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel" 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" GRUB_PLATFORMS="efi-64" 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_US en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="pixma" USERLAND="GNU" VIDEO_CARDS="dummy fbdev intel 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 3 Ryan Reich 2014-07-17 05:24:28 UTC
emerge -pqv '=dev-libs/gobject-introspection-1.40.0::x-portage':

[ebuild   R   ] dev-libs/gobject-introspection-1.40.0 [1.40.0] USE="cairo -doctool {-test}" ABI_X86="32%* (64%*) (-x32)" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7"
Comment 4 Ryan Reich 2014-07-17 05:26:59 UTC
Created attachment 380864 [details]
ebuild environment
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2014-07-17 06:34:12 UTC
Why are you setting MAKE_OPTS?!

MAKEFLAGS is what GNU make uses
MAKEOPTS is what Portage uses to pass flags to emake

But MAKE_OPTS is nothing. You can break Portage in multiple ways by setting random variables.
Comment 6 Ryan Reich 2014-07-17 07:01:50 UTC
(In reply to Samuli Suominen from comment #5)
> Why are you setting MAKE_OPTS?!
> 
> MAKEFLAGS is what GNU make uses
> MAKEOPTS is what Portage uses to pass flags to emake
> 
> But MAKE_OPTS is nothing. You can break Portage in multiple ways by setting
> random variables.

So, it's obviously a typo in my report (I meant MAKEOPTS).  I edited the title but the text seems to be immutable.  Sorry about that!
Comment 7 Fabian Groffen gentoo-dev 2014-08-12 07:51:30 UTC
See same thing in Prefix.  Seems to be because of a stray "opts" that's referenced nowhere but in _elibtoolize (autotools.eclass), and it's not declared local.  I suspect it picks up some dirt from multilib eclasses.

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -313,7 +313,7 @@ eaclocal() {
                ${LIBTOOLIZE} -n --install >& /dev/null || shift
        fi
 
-       autotools_run_tool ${LIBTOOLIZE} "$@" ${opts}
+       autotools_run_tool ${LIBTOOLIZE} "$@"
 }
 
 # @FUNCTION: eautoheader
Comment 8 Alexander Tsoy 2014-11-14 00:31:57 UTC
(In reply to Fabian Groffen from comment #7)
> I suspect it picks up some dirt from multilib eclasses.

Yeah, it's probably from multibuild.eclass:

./multibuild.eclass:        opts=-j${MULTIBUILD_JOBS}
./multibuild.eclass:        opts=${MAKEOPTS}
Comment 9 SpanKY gentoo-dev 2014-11-14 01:31:51 UTC
(In reply to Fabian Groffen from comment #7)

looks like it was mostly deleted in an earlier commit, but that one was missed:
http://sources.gentoo.org/eclass/autotools.eclass?r1=1.134&r2=1.135

but it's gone now:
http://sources.gentoo.org/eclass/autotools.eclass?r1=1.164&r2=1.165