Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337827 - dev-java/icedtea-6 fails to emerge with load-average in MAKEOPTS
Summary: dev-java/icedtea-6 fails to emerge with load-average in MAKEOPTS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Andrew John Hughes
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 337831
  Show dependency tree
 
Reported: 2010-09-18 08:29 UTC by Cyprien Nicolas (fulax)
Modified: 2011-11-18 16:48 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cyprien Nicolas (fulax) 2010-09-18 08:29:03 UTC
Hi,

My MAKEOPTS contains --jobs=4.0 --load-average=6.0 to prevent GMake to spawn several make process which would consume a lot of memory, and thus swapping (kswapd raises the cpu load quite fastly)

 * Configuring using --with-parallel-jobs=--jobs=4 --load-average=6.0
 * econf: updating icedtea6-1.9/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating icedtea6-1.9/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-openjdk=/usr/lib/icedtea6 --with-parallel-jobs=--jobs=4 --load-average=6.0 --disable-zero --with-openjdk-src-zip=/var/tmp/portage/dev-java/icedtea-6.1.9/distdir/openjdk-6-src-b20-21_jun_2010.tar.gz --with-hotspot-src-zip=/var/tmp/portage/dev-java/icedtea-6.1.9/distdir/ --with-jaxp-drop-zip=/var/tmp/portage/dev-java/icedtea-6.1.9/distdir/jdk6-jaxp-b20.zip --with-jaxws-drop-zip=/var/tmp/portage/dev-java/icedtea-6.1.9/distdir/jdk6-jaxws-b20.zip --with-jaf-drop-zip=/var/tmp/portage/dev-java/icedtea-6.1.9/distdir/jdk6-jaf-b20.zip --with-cacao-src-zip=/var/tmp/portage/dev-java/icedtea-6.1.9/distdir/e321b101a9ee.tar.bz2 --with-java=/usr/lib/jvm/icedtea6/bin/java --with-javac=/usr/lib/jvm/icedtea6/bin/javac --with-javah=/usr/lib/jvm/icedtea6/bin/javah --with-abs-install-dir=/usr/lib64/icedtea6 --enable-optimizations --disable-docs --disable-plugin --with-rhino=/usr/share/rhino-1.6/lib/js.jar --disable-cacao --disable-pulse-java --enable-xrender --disable-systemtap --disable-nio2 --enable-nss
configure: error: unrecognized option: `--load-average=6.0'
Try `./configure --help' for more information.
 * ERROR: dev-java/icedtea-6.1.9 failed:
 *   econf failed

Here, MAKEOPTS is passed unquoted to econf, so this explain the failure

/usr/portage/dev-java/icedtea/icedtea-1.6.9.ebuild:183
# OpenJDK-specific parallelism support.
        procs=$(echo ${MAKEOPTS} | sed -r 's/.*-j\W*([0-9]+).*/\1/')
        if [[ -n ${procs} ]] ; then
                config="${config} --with-parallel-jobs=${procs}";
                einfo "Configuring using --with-parallel-jobs=${procs}"
        fi

There are similar bugs, related to non standard MAKEOPTS opt, but the --load-average is _recommanded_ make make.conf(5) man page (and really needed for my low memory system, if I don't want to get a long slow down when compiling big paclages)

To solve this, I would suggest to recall bug 241684 comment 11 gives a sed expression that should solve it.



Going further, after reading bug 241684 comment 4:
Adding a dedicated JOBS make.conf variable just containing an integer will help all maintainers, instead of a per-ebuild crappy sed expression.
Another possibility would be to add a eutil function to get only the jobs numbers

If one of this two possibilities sounds good to you devs, maybe we can fill a feature request on portage, or suggest it on gentoo-dev@l.g.o
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-11-18 16:48:43 UTC
Fixed in the sense that jobs should be detected properly now. Unfortunately the system doesn't support passing load-average.