Opened 3 years ago

Closed 3 years ago

#11671 closed enhancement (fixed)

Address mention of NINJAJOBS in qtwebengine.

Reported by: ken@… Owned by: Douglas R. Reno
Priority: normal Milestone: 8.4
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

We used to optionally patch ninja to limit the number of jobs, and I'm sure there is at least one reference to that in BLFS. With ninja-1.9.0 the system version will now accept -j N.

Change History (9)

comment:1 by ken@…, 3 years ago

Owner: changed from blfs-book to ken@…
Status: newassigned

comment:2 by ken@…, 3 years ago

Owner: changed from ken@… to blfs-book
Status: assignednew

The only affected package is qtwebengine, where NINJAJOBS needed to be specified when invoking make. Needs to be tested on an up-to-date system, ideally one with more cores. Giving back to the book because not sure when I'll get that far.

comment:3 by Bruce Dubbs, 3 years ago

Summary: Address any mention of NINJAJOBS.Address mention of NINJAJOBS in qtwebengine.

comment:4 by Douglas R. Reno, 3 years ago

Owner: changed from blfs-book to Douglas R. Reno
Status: newassigned

comment:5 by Bruce Dubbs, 3 years ago

I think we (I) removed the ninja patch too quickly. What we need is to add back a highly cut down version of the patch:

-- ninja-1.8.2.orig/src/ninja.cc   2017-09-10 20:20:10.000000000 -0500
+++ ninja-1.8.2/src/ninja.cc  2017-10-12 14:47:34.143936739 -0500
@@ -221,6 +221,12 @@

 /// Choose a default value for the -j (parallelism) flag.
 int GuessParallelism() {
+
+  int   j = 0;
+  char* jobs = getenv( "NINJAJOBS" );
+  if ( jobs != NULL ) j = atoi( jobs );
+  if ( j > 0 ) return j;
+
   switch (int processors = GetProcessorCount()) {
   case 0:
   case 1:

We could even do it as a sed:

sed -i '/int Guess/a \
  int   j = 0;\
  char* jobs = getenv( "NINJAJOBS" );\
  if ( jobs != NULL ) j = atoi( jobs );\
  if ( j > 0 ) return j;\
' src/ninja.cc

Should we do this for 8.4? We could do it for LFS and BLFS or just BLFS. The sed is educational because it shows how to add multiple lines without a patch.

in reply to:  5 comment:6 by ken@…, 3 years ago

Replying to bdubbs:

I think we (I) removed the ninja patch too quickly. What we need is to add back a highly cut down version of the patch:

[...]

We could even do it as a sed:

sed -i '/int Guess/a \
  int   j = 0;\
  char* jobs = getenv( "NINJAJOBS" );\
  if ( jobs != NULL ) j = atoi( jobs );\
  if ( j > 0 ) return j;\
' src/ninja.cc

Should we do this for 8.4? We could do it for LFS and BLFS or just BLFS. The sed is educational because it shows how to add multiple lines without a patch.

Using a sed sounds good. I was going to ask why ninja is still in BLFS, but I suppose some people use emacs or want to build the docs ;-) For me, doing this in LFS (and therefore also in BLFS, for the few people who rebuild it), and for 8.4, sounds good.

comment:7 by Bruce Dubbs, 3 years ago

I looked at what we have for ninja in BLFS and think keeping it is more effort than it is worth. It is not referenced by any other package. Unless there is a strong objection, I will remove it tomorrow.

comment:8 by Douglas R. Reno, 3 years ago

I'm all down for this :-)

comment:9 by Bruce Dubbs, 3 years ago

Resolution: fixed
Status: assignedclosed

I archive ninja in BLFS and added the sed to ninja in LFS. Update the explanation in qtwebkit in BLFS.

Marking as fixed in LFS revision 11526 and BLFS revision 21201.

The page in BLFS still needs to be tagged.

Note: See TracTickets for help on using tickets.