Re: Settings for parallel make jobs not applied

"Pierre Labastie" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
On Thu, 2022-09-29 at 10:04 +0000, md wrote:
> I'm having problems with switching on 2 parallel make jobs.
> Assuming this problem is resolved, is it still a valid recommendation to
> exclude gcc from the parallel builds?

No. gcc has been removed from blacklist long ago.

> It's the package that takes most time to build.
> 
> Section 5. RUNNING of https://wiki.linuxfromscratch.org/alfs/browser/README
> mentions
> [...]
> 
> Here is how I'm trying to configure make to use two jobs.
> After enabling "Optimization Settings" in "make", the "jhalfs run" shows the
> following, relevant output
> ```
> ...
> OPTIMIZE <2>
> N_PARALLEL <2>
> 

seems ok

> [...]
> 
> Despite this, the generated makefiles use -j1, except for 843-automake, which
> uses -j4. These settings seem hard-coded in the lfs book XML.
> ```
> grep j1 -r $LFS/jhalfs/lfs-commands/ | tail -1
> $LFS/jhalfs/lfs-commands/chapter06/607-findutils:make -j1 DESTDIR=$LFS install
> grep j1 -r $LFS/jhalfs/lfs-commands/ | wc -l
> 99
> grep j2 -r $LFS/jhalfs/lfs-commands/
> grep j4 -r $LFS/jhalfs/lfs-commands/
> $LFS/jhalfs/lfs-commands/chapter08/843-automake:# make -k -j4 check >>
> $TEST_LOG 2>&1 || true
> ```

All of this is normal, and does not mean -j1 is used everywhere: all the "make
install" commands are changed to "make -j1 install" by jhalfs, because the main
"Makefile" passes MAKEFLAGS=-j<selected number of jobs> to the scripts. So,
you'll never find "make -jx" in the scripts (the -j flag is in MAKEFLAGS)
except:
- if the book explicitly passes a -jx flags, it takes precedence
- and there are a lot of "-j1" in the "make install" commands.

> 
> Currently I'm using sed to adjust the selected -j1 make settings for the
> packages with the longest build times.
> ```
> cd $LFS/jhalfs
> for file in $(find lfs-commands -name "*gcc*" -o -name "*glibc*");
> do
> echo $file && sed -i "s/make -j./make -j2/" $file
> done
> ```

Not needed, see above


> [...]

Pierre

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.