Re: Settings for parallel make jobs not applied

"Marcin Dulak" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <CABJoABb_6U8h0T0i8dk2wR6rVtf3TxO=pvUkdeq_i-L5TMb8aw@mail.gmail.com>
On Thu, Sep 29, 2022 at 3:22 PM Pierre Labastie <
[email protected]> wrote:

> 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.
>
I see gcc in optimize/opt_override (last commit in
https://wiki.linuxfromscratch.org/alfs/changeset/e5987084e64f36c5e539eb6e4ff1121535d4de7a/
)
and in the output shown by "jhalfs run"
```
Overridden packages:
gcc noOpt
grub noOpt
```
Taking into account the observation below, it seems that this
optimize/opt_override is
not actively used, since parallel gcc make is doing multiple jobs.

>
> > 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.
>
> ok, I looked more carefully at "top" during 502-gcc-pass1, and saw
two cc1plus for a while,
ps faux also shows two x86_64-lfs-linux-gnu-gcc, so it seems like the
parallel make works.

> >
> > 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

-- 
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.