Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 277607 - genkernel should recognise "--jobs" option in MAKEOPTS
Summary: genkernel should recognise "--jobs" option in MAKEOPTS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-13 02:51 UTC by Leung Ki Chi
Modified: 2011-01-22 00:17 UTC (History)
3 users (show)

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


Attachments
genkernel log (genkernel.log,149.60 KB, text/plain)
2009-07-13 02:53 UTC, Leung Ki Chi
Details
genkernel configuration (genkernel.conf,5.43 KB, text/plain)
2009-07-13 02:53 UTC, Leung Ki Chi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leung Ki Chi 2009-07-13 02:51:37 UTC
Genkernel seems not to recognise that make accepts "--jobs" as well as "-j" to control number of jobs. If I pass "--jobs=50" (on a quad-core machine) it detects wrongly that "-j" was passed and replaces that with "-j1", leading to the invalid option "--j1obs=50" being passed to make.

Reproducible: Always

Steps to Reproduce:
1. invoke genkernel with --makeopts="--jobs=2"
2. or edit /etc/genkernel.conf and change MAKEOPTS="--jobs=2"
3. either way, invoke "genkernel all"

Actual Results:  
Failure when invoking "make menuconfig" in /usr/src/linux, first line:
make: unrecognized option '--j1bs=4'

Expected Results:  
make menuconfig should complete successfully

c2qbox ~ # emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.3, glibc-2.10.1-r0, 2.6.28-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 13 Jul 2009 02:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p24
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.6.2-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe -fno-ident -fomit-frame-pointer"
CHOST="i686-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/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium-m -O2 -pipe -fno-ident -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=50 --load-average=4"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="http://mirror.averse.net/pub/gentoo http://ftp.swin.edu.au/gentoo http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB en_US"
MAKEOPTS="--jobs=4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude=/lost+found"
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="X accessibility acpi alsa bash-completion bzip2 cairo cjk cleartype consolekit cups curl dbus dhcpcd dri fam firefox gdbm gif glitz gstreamer gtk hal handbook history iconv icu ipv6 ithreads jpeg kde laptop libnotify lucene midi mmx mmxext mng mp3 mpeg msn ncurses networkmanager nptl nsplugin ntp ogg opengl pch pcre pdf perl png poppler-data ppds python qt3support qt4 readline sdl sqlite sse sse2 ssl startup-notification svg sysfs threads threadsafe tiff truetype unicode usb v4l v4l2 vorbis webkit win32codecs x86 xcb xcomposite xine xml xorg xulrunner xv zip 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 mmap_emul 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 evdev" KERNEL="linux" LCD_DEVICES="ncurses text" LINGUAS="en en_GB en_US" USERLAND="GNU" VIDEO_CARDS="intel v4l"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTDIR_OVERLAY
Comment 1 Leung Ki Chi 2009-07-13 02:53:04 UTC
Created attachment 197740 [details]
genkernel log
Comment 2 Leung Ki Chi 2009-07-13 02:53:36 UTC
Created attachment 197741 [details]
genkernel configuration
Comment 3 Kayvan Sylvan 2010-05-08 01:24:52 UTC
In addition, if you specify MAKEOPTS="-j5" in /etc/make.conf, genkernel still uses -j2 as its default.
Comment 4 John R. Graham gentoo-dev 2010-05-25 03:23:39 UTC
This, at least, is not a bug.  Genkernel is not part of Portage and, by design, does not source /etc/make.conf.

-  John
Comment 5 Sebastian Pipping gentoo-dev 2011-01-22 00:06:11 UTC
Confirmed.  The code

  ${MAKEOPTS/-j?/-j1}

is evalutad in a call to

  compile_generic ${whatever} runtask

The only case of that I can find in the latest code is 

  compile_generic menuconfig runtask

which can be triggered by a command like

  genkernel kernel --menuconfig --makeopts="--jobs=50"
Comment 6 Sebastian Pipping gentoo-dev 2011-01-22 00:17:31 UTC
I have replaced "${MAKEOPTS/-j?/j1}" by "${MAKEOPTS} -j1" to fix this problem. You can get and test this patch by emerging genkernel-99999 (five nines).

http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=94f4e02816dd8300439a14537770e186f7884c0b