Opened 3 years ago
Last modified 3 years ago
#63339 new defect
sicp @0.0.1_3: bad flags passed to makeinfo
Reported by: | cooljeanius (Eric Gallager) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | Cc: | cjones051073 (Chris Jones) | |
Port: | sicp |
Description
Building sicp fails on Big Sur due to makeinfo
being unable to recognize the -j1
flag:
---> Building sicp DEBUG: Executing org.macports.build (sicp) DEBUG: port disallows a parallel build, setting build jobs to 1 DEBUG: port disallows a parallel build, setting build jobs to 1 DEBUG: Environment: CC_PRINT_OPTIONS='YES' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_sicp/sicp/work/.CC_PRINT_OPTIONS' CPATH='/opt/local/include' DEVELOPER_DIR='/Library/Developer/CommandLineTools' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='11.0' SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk' Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_sicp/sicp/work/sicp.texi" && /opt/local/bin/makeinfo -j1 sicp.texi DEBUG: system: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_sicp/sicp/work/sicp.texi" && /opt/local/bin/makeinfo -j1 sicp.texi Unknown option: j Unknown option: 1 Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_sicp/sicp/work/sicp.texi" && /opt/local/bin/makeinfo -j1 sicp.texi Exit code: 1 Error: Failed to build sicp: command execution failed DEBUG: Error code: CHILDSTATUS 87798 1 DEBUG: Backtrace: command execution failed while executing "system {*}$notty {*}$callback {*}$nice $fullcmdstring" invoked from within "command_exec -callback portprogress::target_progress_callback build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_sicp/sicp/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port sicp failed
Change History (2)
comment:1 follow-up: 2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | cjones051073 added |
---|
comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
A different solution could be to change the globs to be more specific. [...] However, this change would have unintended consequences
This could be avoided by using an even-more-specific regular expression (that would match e.g. make
followed by whitespace or end of string, i.e. (make|ninja|scons)($|[[:space:]])
) instead of globs.
Note: See
TracTickets for help on using
tickets.
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 (like bsdmake, gnumake, omake, unsermake, etc.), 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, butmakeinfo
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.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 matchmakeinfo
. 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.