Opened 5 years ago
Closed 5 years ago
#1725 closed defect (fixed)
the top level make file may be run with parallelism enabled
Reported by: | Pierre Labastie | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 3.0 |
Component: | jhalfs | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description
Symptom: from J Michmerhuizen on alfs-discuss:
Building the system... make[1]: Entering directory '/Proj/LFS/bld/jhalfs' -------------------------------------------------------------------------------- mk_SETUP stty: 'standard input': Inappropriate ioctl for device -------------------------------------------------- Terminal too small: columns x lines Minimum: 80 columns x 24 lines -------------------------------------------------- Makefile:78: recipe for target 'ck_terminal' failed make[1]: *** [ck_terminal] Error 1 make[1]: *** Waiting for unfinished jobs.... ROOT privilege is required to perform a number of commands sudo will request a password in order to execute all high privilege commands -------------------------------------------------------------------------------- Building target save-luser User lfs exists with ID 1001 Target save-luser OK -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- Building target 026-creatingtoolsdir Makefile:207: recipe for target '026-creatingtoolsdir' failed make: *** [026-creatingtoolsdir] Error 1 Makefile:88: recipe for target 'mk_SETUP' failed make[1]: *** [mk_SETUP] Error 2 make[1]: Leaving directory '/Proj/LFS/bld/jhalfs' ERROR: Error 2 at common/common-functions line 39! <jhalfs> exit Makefile:12: recipe for target 'all' failed make: *** [all] Error 2
One obvious issue is that the top level make has -jN with N>1, which is not expected.
The second issue is that the "ck_terminal" target lacks a terminal.
Note:
See TracTickets
for help on using tickets.
With the present code, there is a global variable MAKEFLAGS in jhalfs, which is set to -j<N> if optimization is asked. Obviously, it is exported to "make" when "Run the makefile" is ticked.
So several target are started in parallel, and according to make documentation, only one can get a terminal, on a first arrived first served basis. This is explained in "info make" paragraph 5.4.2:
although it is not clear whether this influences the stty command.
Anyway, I think the global MAKEFLAGS should be renamed to a name-spaced variable JH_MAKFLAGS. Let's do that and test again.