Emerging dev-java/icedtea-7.2.0-r1 fails because of a misconfigured "-j" option to make. Sadly the error happens way down somewhere in the guts of the build process. I think the problematic lines are: make: Entering an unknown directory make: the `-j' option requires a positive integral argument Output: ... cd linux_amd64_compiler2/product && /usr/bin/make -w " LP64=1 " make[6]: Entering directory `/var/tmp/portage/dev-java/icedtea-7.2.0-r1/work/icedtea-2.0/openjdk.build-boot/hotspot/outputdir/linux_amd64_compiler2/product' make: Entering an unknown directory make: the `-j' option requires a positive integral argument Usage: make [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. -C DIRECTORY, --directory=DIRECTORY Change to DIRECTORY before doing anything. -d Print lots of debugging information. --debug[=FLAGS] Print various types of debugging information. -e, --environment-overrides Environment variables override makefiles. --eval=STRING Evaluate STRING as a makefile statement. -f FILE, --file=FILE, --makefile=FILE Read FILE as a makefile. -h, --help Print this message and exit. -i, --ignore-errors Ignore errors from recipes. -I DIRECTORY, --include-dir=DIRECTORY Search DIRECTORY for included makefiles. -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. -k, --keep-going Keep going when some targets can't be made. -l [N], --load-average[=N], --max-load[=N] Don't start multiple jobs unless load is below N. -L, --check-symlink-times Use the latest mtime between symlinks and target. -n, --just-print, --dry-run, --recon Don't actually run any recipe; just print them. -o FILE, --old-file=FILE, --assume-old=FILE Consider FILE to be very old and don't remake it. -p, --print-data-base Print make's internal database. -q, --question Run no recipe; exit status says if up to date. -r, --no-builtin-rules Disable the built-in implicit rules. -R, --no-builtin-variables Disable the built-in variable settings. -s, --silent, --quiet Don't echo recipes. -S, --no-keep-going, --stop Turns off -k. -t, --touch Touch targets instead of remaking them. -v, --version Print the version number of make and exit. -w, --print-directory Print the current directory. --no-print-directory Turn off -w, even if it was turned on implicitly. -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE Consider FILE to be infinitely new. --warn-undefined-variables Warn when an undefined variable is referenced. This program built for x86_64-pc-linux-gnu Report bugs to <bug-make@gnu.org> make: Leaving an unknown directory make[6]: *** [ad_stuff] Error 2 make[6]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.2.0-r1/work/icedtea-2.0/openjdk.build-boot/hotspot/outputdir/linux_amd64_compiler2/product' make[5]: *** [product] Error 2 make[5]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.2.0-r1/work/icedtea-2.0/openjdk.build-boot/hotspot/outputdir' make[4]: *** [generic_build2] Error 2 make[4]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.2.0-r1/work/icedtea-2.0/openjdk-boot/hotspot/make' make[3]: *** [product] Error 2 make[3]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.2.0-r1/work/icedtea-2.0/openjdk-boot/hotspot/make' make[2]: *** [hotspot-build] Error 2 make[2]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.2.0-r1/work/icedtea-2.0/openjdk-boot' make[1]: *** [build_product_image] Error 2 make[1]: Leaving directory `/var/tmp/portage/dev-java/icedtea-7.2.0-r1/work/icedtea-2.0/openjdk-boot' make: *** [stamps/icedtea-boot.stamp] Error 2 * ERROR: dev-java/icedtea-7.2.0-r1 failed (compile phase): * emake failed * * If you need support, post the output of 'emerge --info =dev-java/icedtea-7.2.0-r1', * the complete build log and the output of 'emerge -pqv =dev-java/icedtea-7.2.0-r1'. * The complete build log is located at '/var/tmp/portage/dev-java/icedtea-7.2.0-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-java/icedtea-7.2.0-r1/temp/environment'. * S: '/var/tmp/portage/dev-java/icedtea-7.2.0-r1/work/icedtea-2.0' !!! When you file a bug report, please include the following information: GENTOO_VM=gcj-jdk CLASSPATH="" JAVA_HOME="" JAVACFLAGS="" COMPILER="" and of course, the output of emerge --info My emerge --info: Portage 2.2.0_alpha72 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 3.1.0-gentoo x86_64) ================================================================= System uname: Linux-3.1.0-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q8200_@_2.33GHz-with-gentoo-2.1 Timestamp of tree: Sat, 05 Nov 2011 05:00:01 +0000 ccache version 3.1.6 [disabled] app-shells/bash: 4.2_p10 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.2.2 dev-util/ccache: 3.1.6 dev-util/cmake: 2.8.6-r3 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1-r1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.5.3-r1 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.4-r4 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo kde gnome zugaina desktop-effects xfce-dev sunrise local Installed sets: @system, @xfce4 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -g -O2 -pipe -fomit-frame-pointer -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/games/angband/edit/ /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -g -O2 -pipe -fomit-frame-pointer -ggdb" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox" FFLAGS="" GENTOO_MIRRORS="http://mirror.qubenet.net/mirror/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirror.muntinternet.net/pub/gentoo/ http://gentoo.tups.lv/source/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://mirror.bytemark.co.uk/gentoo/ http://gentoo.supp.name/ http://gentoo.po.opole.pl http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://mirror.bih.net.ba/gentoo/ http://ftp.uoi.gr/mirror/OS/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://ftp.klid.dk/ftp/gentoo/ http://mirror.yandex.ru/gentoo-distfiles/ http://ftp.heanet.ie/pub/gentoo/ http://ftp.gentoo.bg/ http://gentoo.inf.elte.hu/ http://mirrors.evolva.ro/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirror.ovh.net/gentoo-distfiles/ http://gentoo.inode.at/ http://mirrors.ludost.net/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://mirror.jamit.de/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.netcologne.de/gentoo/ ftp://gentoo.inode.at/source/ http://ftp.ds.karen.hj.se/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ http://gentoo.prz.rzeszow.pl ftp://mirror.bih.net.ba/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://gentoo.mirror.pw.edu.pl/ http://gentoo.ynet.sk/pub http://mirrors.xservers.ro/gentoo/ http://gentoo-euetib.upc.es/mirror/gentoo/ http://gentoo.tiscali.nl/ http://de-mirror.org/distro/gentoo/ http://mirror.cambrium.nl/pub/os/linux/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en de" 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="/var/lib/layman/kde /var/lib/layman/gnome /var/lib/layman/zugaina /var/lib/layman/desktop-effects /var/lib/layman/xfce-dev /var/lib/layman/sunrise /usr/local/portage/local" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X a52 aac aalib acl acpi aften alsa amarok amd64 amrnb apache2 apng automount avahi bash-completion berkdb branding bzip2 cairo calendar caps cdaudio cdda cddb cdparanoia cdr cgi cli consolekit cpudetection cracklib crypt cscope css cups curl cxx daap dbus declarative dga dhclient directfb divx dri dts dv dvb dvd dvdr dvdread dvn eds emboss enca encode exif expat extra extras faac fam fbcon ffmpeg firefox flac fontconfig fortran ftp fts3 fuse gd gdbm gdu ggi gif gimp git glib glitz gmp gnutls gpm gstreamer gtk gtk3 h323 htmlhandbook iconv ieee1394 ifp imagemagick imap imlib inifiles inotify introspection ipod ipv6 irmc jabber jack java joystick jpeg jpeg2k kpathsea lame laptop latex lcms lcmsi ldap libnotify lua lzma lzo mad matroska mjpeg mmext mmx mng modules mono mozdevelop mp3 mp3tunes mp4 mpeg mpg123 mtp mudflap multilib mysql mysqli nas ncurses nepomuk networkmanager nls nptl nptlonly nsplugin offensive ogg openal openct openexr opengl openmp pam pango pch pcmcia pcre pdf perl php png policykit ppds pppd pulseaudio python qalculate qt-faststart qt3support qt4 quicktime qwt rar rdesktop readline realmedia recode rss rtc samba sasl scanner scim sdk sdl semantic-desktop server session sharedext sharedmem sip soap speex spell sql sqlite sqlite3 sse sse2 ssl startup-notification subversion svg sysfs tcpd theora tidy tiff tivo tokenizer truetype udev unicode usb v4l v4l2 vaapi vcd vdpau vidx vim vim-syntax vnc vorbis wav webkit wmp x264 xanim xattr xcb xcomposite xforms xine xinerama xml xorg xprint xrandr xscreensaver xsl xulrunner xv xvid xvmc zeroconf zip zlib" 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" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon sony_dscf1 sony_dscf55" 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv vesa nvidia 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, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Reproducible: Always Steps to Reproduce: 1. emerge =dev-java/icedtea-7.2.0-r1 2. 3.
As a workaround setting MAKEOPTS="-j5" in /etc/make.conf should allow you to compile icedtea. Off course any other -j value should be fine as well as long as it's explicit.
# grep MAKEOPTS /etc/make.conf MAKEOPTS="-j=5" Nope. Same error. MAKEOPTS is ignored by icedtea. I use MAKEOPTS="--jobs=8" normally. Did comment it in the last try which is reflected my emerge --info output.
(In reply to comment #2) > # grep MAKEOPTS /etc/make.conf > MAKEOPTS="-j=5" That's wrong syntax. Correct is: MAKEOPTS="-j5"
That's right, but the ebuild doesn't recognize the long make option --jobs=N... It's the expression in the sed call at line 183, I will attach an patch.
Created attachment 291877 [details, diff] Ebuild Patch to make icedtea.ebuild recognize long --jobs=N option
Just took a peek at similar bugs. This is about makeopts handling in icedtea-6: https://bugs.gentoo.org/show_bug.cgi?id=337827 As stated by fulax, take a look at https://bugs.gentoo.org/show_bug.cgi?id=241684#c11
(In reply to comment #3) > (In reply to comment #2) > > # grep MAKEOPTS /etc/make.conf > > MAKEOPTS="-j=5" > > That's wrong syntax. Correct is: > MAKEOPTS="-j5" Uuups. You're right. I've overlooked that one. However, I applied patch from https://bugs.gentoo.org/show_bug.cgi?id=389791#c5 and it works with long MAKEOPT options again. Fixed. Thx!
Fixed, thanks. In the end I used code from waf-utils.eclass which seemed even more robust.