Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107628 - genkernel does not support multiprocessing hosts: -j make option
Summary: genkernel does not support multiprocessing hosts: -j make option
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-09-29 11:07 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2006-06-20 12:52 UTC (History)
3 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 DEMAINE Benoît-Pierre, aka DoubleHP 2005-09-29 11:07:48 UTC
I have three bi-cpu box, and use genkernel 

MAKEOPTS="-j4"
from make.conf is not used, but I am not really surprised;

neverthe less, /etc/genkernel.conf does not offer any kind of -j option, nor
make option, not even generic line that would let add genkernel options in the
conf file ...

the ONLY way to use -j is toi use --makeopts ON THE COMMAND LINE, and can not be
archived definitively in system conf ... (unless using aliases in .bashrc )

PLEASE add two or three new lines in the conf file, and corresponding support in
the code.

the strict minimum would be a generic line like:
GENKERNEL_EXTRA_ARGUMENTS ...
or something like that.

Thanks.
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2005-09-29 11:40:49 UTC
Yeah, genkernel is Gentoo-agnostic, so it reads *nothing* from make.conf, on
purpose.  I don't see a problem with adding support to genkernel.conf, though.
Comment 2 Tim Yamin (RETIRED) gentoo-dev 2005-11-04 16:32:50 UTC
Try setting MAKEOPTS='j4' in /etc/genkernel.conf and see if that works.
Comment 3 Eric Edgar (RETIRED) gentoo-dev 2005-11-21 10:15:45 UTC
--makeopts="-j4" is known to work.
Comment 4 Tim Yamin (RETIRED) gentoo-dev 2005-12-05 14:26:41 UTC
Please see comment #2
Comment 5 DEMAINE Benoît-Pierre, aka DoubleHP 2006-01-17 16:53:09 UTC
I have tried
MAKEOPTS="j5"
and
MAKEOPTS="-j5"

in /etc/genkernel.conf
and I now always got in ps aux:

 4978 tty4     S+     0:00 make -j2 CC=gcc LD=ld AS=as bzImage

so ... 


--makeopts="-j5"
does work, but I dislike very much having to think about options every day, especially with tools designed to automate daily tasks ...

=>
- why doesnt MAKEOPTS work in the conf ?
- onece support is added and works, please insert an example line in the conf, so that people dont have to grab forums, but already have answers in comments of the conf file. Especially for actual bi cores and coming quadricores CPUs ... which respectively theoretically want -j3 and -j5
Comment 6 DEMAINE Benoît-Pierre, aka DoubleHP 2006-01-20 02:36:44 UTC
Note that genkernel actually use internally -j2, but such an option is quiet ridiculous on computer with several cores, or more than 2 CPUs.

Manual override works, but the point of this bug is to ask dev to automate the process.
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2006-01-20 09:15:06 UTC
What kernel is your target? 2.4 or 2.6?
Comment 8 DEMAINE Benoît-Pierre, aka DoubleHP 2006-01-20 16:06:55 UTC
latest kernel yesterday was 2.6.15-gentoo-r1
Comment 9 DEMAINE Benoît-Pierre, aka DoubleHP 2006-02-13 11:42:16 UTC
I just solved the problem.

Issue is due to line 82 (on my system) of /usr/share/genkernel/genkernel :

source ${ARCH_CONFIG} || gen_die "Could not read ${ARCH_CONFIG}"

this call overrides any /etc/genkernel.conf setting.
I found that using dychotomy; if adding in there MAKEOPTS="-j77" just before, changes nothing; just after, you get -j77 in ps at run time.

Reason is: MAKEOPTS is actually hardcoded in /usr/share/genkernel/<arch>/config.sh . Other parameters of those are ok to be there, but MakeOPTS here override /etc/genkernel.conf ... my fix is to alter all /usr/share/genkernel/<arch>/config.sh that way: replace:

MAKEOPTS="-j2"

with:

if [ "${MAKEOPTS}" == "" ]
then
        MAKEOPTS="-j2"
fi

That has to be done for all architectures, since every single arch overrides that variable locally. I have found no way to affect all arch nicer way.

This fix DOES solve actual bug, and DOES NOT affect CLI options, what really surprised me in fact :)

So, please update package, and wait for stabilisation before closing. Cheers everybody.
Comment 10 Tim Yamin (RETIRED) gentoo-dev 2006-06-20 12:52:28 UTC
Fixed in 3.4.0_pre1, thanks.