[Android-tools-devel] Bug#1002747: makeparallel looks for --jobserver-fds instead of --jobserver-args

Sean Anderson sean.anderson at seco.com
Tue Dec 28 19:11:34 GMT 2021


Package: makeparallel
Version: 1:8.1.0+r23-3ubuntu2
Severity: important

The makeparallel command does not correctly determine the number of jobs
it should use. This is because it determines the the jobserver pipe fds
from the "--jobserver-fds" options [1]. However, this option was renamed
in make 4.2 to be "--jobserver-args" [2]. This causes makeparallel to
instead guess the number of jobs based on the number of CPUs.

I believe this is more of an upstream issue, but unfortunately
makeparallel was removed from android-platform-build 11 [3]. So it does
not look like it will be fixed. A minimal patch would look something
like

diff --git a/tools/makeparallel/makeparallel.cpp b/tools/makeparallel/makeparallel.cpp
index 66babdf13d..a123308bb1 100644
--- a/tools/makeparallel/makeparallel.cpp
+++ b/tools/makeparallel/makeparallel.cpp
@@ -115,6 +115,7 @@ static bool ParseMakeflags(std::vector<std::string>& args,
    while (1) {
      const static option longopts[] = {
          {"jobserver-fds", required_argument, 0, 0},
+        {"jobserver-args", required_argument, 0, 0},
          {0, 0, 0, 0},
      };
      int longopt_index = 0;
--

[1] https://salsa.debian.org/android-tools-team/android-platform-build/-/blob/28768b3120f751583a2743101b892f210d4715cf/tools/makeparallel/makeparallel.cpp#L117
[2] https://git.savannah.gnu.org/cgit/make.git/commit/?id=c9e6ab9a
[3] https://android.googlesource.com/platform/build/+/893948955dc53ff2910920679ad5640dda0b2d48



More information about the Android-tools-devel mailing list