Settings for parallel make jobs not applied
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <[email protected]> |
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? It's the package that takes most time to build. Section 5. RUNNING of https://wiki.linuxfromscratch.org/alfs/browser/README mentions that using "Optimization and parallelisation" "you'll be able to select the number of parallel `make' jobs". Also the lfs book mentions export MAKEFLAGS='-j4' https://www.linuxfromscratch.org/lfs/view/systemd/chapter04/aboutsbus.html, but it's not clear whethet this is supported by jhalfs, even if MAKEFLAGS appears in the jhalfs source. 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> ... *** config parameters look good *** ------------------------------------------------------------------------------ Are you happy with these settings? yes/no (no): yes ------------------------------------------------------------------------------ Loading save module...OK Loading optimization module...OK Loading optimization config...OK WARNING: The use of build optimizations may be dangerous. You should know what you are doing and be sure that the optimization settings listed below are what you want. If there are build issues or the system doesn't work as expected, please rebuild without optimizations before asking for support. MAKEFLAGS: <-j2> BLACK_LIST: <> DEF_OPT_MODE: <noOpt> CFLAGS: <unset> CXXFLAGS: <unset> LDFLAGS: <unset> OTHER_CFLAGS: <unset> OTHER_CXXFLAGS: <unset> OTHER_LDFLAGS: <unset> Overridden packages: gcc noOpt grub noOpt ------------------------------------------------------------------------------ Are you happy with these optimization settings? yes/no (no): yes ------------------------------------------------------------------------------ ... ``` 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 ``` 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 ``` More details about the setup follows below. I'm using the following commit of https://git.linuxfromscratch.org/jhalfs.git (obtained with "git show --oneline --no-abbrev --shortstat") "5156f518599b40cd1febae71614c346ff825b1d0 BLFS: remove only "a" lines for runtime deps" and this configuration file: ``` # Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) # # BOOK Settings # # BOOK_LFS is not set BOOK_LFS_SYSD=y # BOOK_BLFS is not set INITSYS="systemd" RUN_ME="./jhalfs run" BRANCH=y # WORKING_COPY is not set COMMIT="trunk" LFS_MULTILIB_NO=y # LFS_MULTILIB_I686 is not set # LFS_MULTILIB_X32 is not set # LFS_MULTILIB_ALL is not set MULTILIB="default" BUILD_CHROOT=y # BUILD_BOOT is not set METHOD="chroot" # BLFS_TOOL is not set # CUSTOM_TOOLS is not set # end of BOOK Settings # # General Settings # LUSER="lfs" LGROUP="lfs" LHOME="/home" BUILDDIR="$LFS" GETPKG=y SRC_ARCHIVE="$SRC_ARCHIVE" RETRYSRCDOWNLOAD=y RETRYDOWNLOADCNT=20 DOWNLOADTIMEOUT=30 SERVER="http://ftp.osuosl.org" # RUNMAKE is not set # CLEAN is not set # end of General Settings # # Build Settings # CONFIG_TESTS=y # # Test settings # TST_1=y # TST_2 is not set # end of Test settings TEST=1 # PKGMNGT is not set INSTALL_LOG=y # STRIP is not set DEL_LA_FILES=y # NO_PROGRESS_BAR is not set # end of Build Settings # # System configuration # # HAVE_FSTAB is not set # CONFIG_BUILD_KERNEL is not set # NCURSES5 is not set TIMEZONE="GMT" LANG="POSIX" # FULL_LOCALE is not set PAGE_LETTER=y # PAGE_A4 is not set PAGE="letter" HOSTNAME="jhalfs" # # Network configuration # INTERFACE="eth0" IP_ADDR="10.0.2.9" GATEWAY="10.0.2.2" PREFIX="24" BROADCAST="10.0.2.255" DOMAIN="local" DNS1="10.0.2.3" DNS2="8.8.8.8" # end of Network configuration # # Console configuration # FONT="lat0-16" KEYMAP="us" # LOCAL is not set # end of Console configuration # end of System configuration # # Advanced Features # REPORT=y SAVE_CH5=y # COMPARE is not set CONFIG_OPTIMIZE=y # # Optimization settings # N_PARALLEL=2 # OPT_1 is not set OPT_2=y # REALSBU is not set # end of Optimization settings OPTIMIZE=2 # # Internal Settings (WARNING: for jhalfs developers only) # SCRIPT_ROOT="jhalfs" JHALFSDIR="$BUILDDIR/$SCRIPT_ROOT" LOGDIRBASE="logs" LOGDIR="$JHALFSDIR/$LOGDIRBASE" TESTLOGDIRBASE="test-logs" TESTLOGDIR="$JHALFSDIR/$TESTLOGDIRBASE" FILELOGDIRBASE="installed-files" FILELOGDIR="$JHALFSDIR/$FILELOGDIRBASE" ICALOGDIR="$LOGDIR/ICA" MKFILE="$JHALFSDIR/Makefile" XSL="lfs.xsl" PKG_LST="unpacked" # end of Internal Settings (WARNING: for jhalfs developers only) # end of Advanced Features # REBUILD_MAKEFILE is not set ``` -- http://lists.linuxfromscratch.org/sympa/info/alfs-discuss Unsubscribe: See the above information page