[MacPorts] #63339: sicp @0.0.1_3: bad flags passed to makeinfo

MacPorts noreply at macports.org
Tue Aug 3 20:58:05 UTC 2021


#63339: sicp @0.0.1_3: bad flags passed to makeinfo
--------------------------+--------------------
  Reporter:  cooljeanius  |      Owner:  (none)
      Type:  defect       |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.7.1
Resolution:               |   Keywords:
      Port:  sicp         |
--------------------------+--------------------
Changes (by ryandesign):

 * cc: cjones051073 (added)


Comment:

 Base only adds a `-j` flag for the number of jobs (e.g. `-j2`, `-j8`,
 etc.) for build commands that are thought to support it: build commands
 matching the globs `*make*`, `*scons*`, or `*ninja*`. The intention with
 these globs was to match build commands that are a version of make, scons,
 or ninja.

 The sicp port builds with the build command `makeinfo`. `makeinfo` is not
 a version of make and does not support `-j` flags, but `makeinfo` does
 match the glob `*make*` so MacPorts base erroneously adds the `-j` flag to
 it. Ten years ago, this was fixed for the sicp port by disabling parallel
 building; see #29211. In MacPorts versions earlier than 2.7.0, MacPorts
 base did not add a `-j` flag when the number of jobs was 1, for example
 due to parallel building being disabled.

 [changeset:d148e62c89c0fee07e202dd64b132e6134e7537e/macports-base MacPorts
 base was changed] in 2.7.0 so that a `-j` flag is added even when the
 number of jobs is 1. Previously we did not bother to pass the `-j` flag
 when the number of jobs is 1 because make and scons and default to 1 job.
 But ninja defaults to the number of CPU cores, so in order to be able to
 prevent ninja from building in parallel when desired, a `-j1` flag is now
 passed when the number of jobs is 1, thus reintroducing the problem for
 sicp. And this is not the first problem that this change has caused.

 One solution might be to change MacPorts base to only add the `-j1` flag
 for ninja and to return to not doing so for make or scons. This might be
 the least invasive change, having the greatest chance of upsetting the
 least number of ports.

 A different solution could be to change the globs to be more specific. For
 example, changing the globs to `*make`, `*scons`, and `*ninja` would
 ensure we only match at the end of the string, so we would still match
 e.g. `/usr/bin/make` or `/opt/local/bin/bsdmake` but we would no longer
 match `makeinfo`. However, this change would have unintended consequences
 for any ports that add arguments in the build command. For example, the
 enchant2 portfile currently does this, so its build command is currently
 `/usr/bin/make pkgdatadir=/opt/local/share/enchant-2`. If we change the
 glob as I suggested, this build command would not match `*make` and the
 port would no longer build in parallel. In this case, the enchant2
 portfile is wrong; it should set build.args rather than appending to
 build.cmd, and this is an easy fix, but there may be other ports affected
 as well.

-- 
Ticket URL: <https://trac.macports.org/ticket/63339#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list