[MacPorts] #64061: perl: posix_spawn: ${prefix}/var/macports/sip-workaround/502/usr/bin/perl5.xx: No such file or directory

MacPorts noreply at macports.org
Fri Nov 26 03:38:11 UTC 2021


#64061: perl: posix_spawn: ${prefix}/var/macports/sip-
workaround/502/usr/bin/perl5.xx: No such file or directory
--------------------------+--------------------
 Reporter:  chrstphrchvz  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  base          |    Version:  2.7.1
 Keywords:  tracemode     |       Port:
--------------------------+--------------------
 Attempting to build `ccache @4.5.1_0 +doc` in trace mode with a clean
 installation of MacPorts 2.7.1 on Monterey 12.0.1 x86-64. The build fails
 with:

 {{{
 [  5%] Generating ccache.1
 cd /opt/local/var/macports/build/_opt_local_var_macports_sources_github
 .com_macports_macports-ports_devel_ccache/ccache/work/build/doc && perl
 -pe 's!\\f\(CR(.*?)\\fP!\\fB\1\\fP!g'
 ccache.1.tmp >ccache.1
 perl: posix_spawn: /opt/local/var/macports/sip-
 workaround/502/usr/bin/perl5.30: No such file or directory
 make[2]: *** [doc/ccache.1] Error 1
 }}}

 I found only a few reports of nearly identical `perl: posix_spawn:
 ${prefix}/var/macports/sip-workaround/502/usr/bin/perl5.xx: No such file
 or directory` errors for various ports and macOS versions (a mailing list
 post appears to be the deepest investigation into this issue so far):
 ticket:59924#comment:4
 ticket:62104#comment:4
 [https://lists.macports.org/pipermail/macports-dev/2019-June/040820.html]

 From Ryan Schmidt (Fri Jun 7 04:07:19 UTC 2019):

 > I am assuming that MacPorts base copies these files to the sip-
 workaround directory when it thinks they are being used.
 >
 > I note that macOS (High Sierra at least) ships with both /usr/bin/perl
 and /usr/bin/perl5.18. They are both version 5.18, their "-V" output is
 identical, yet the files have different sizes. I am uncertain why this is.
 I would have thought one would be a symlink or hard link to the other.

 /usr/bin/perl is a small binary, whose purpose I would guess is to append
 a hardcoded version string it contains (e.g. "5.18" or "5.30" depending on
 macOS version) and use `posix_spawn()` to run the perl5.xx binary located
 in the same directory as itself. So if /usr/bin/perl5.xx hasn’t been
 copied to the sip-workaround directory before /usr/bin/perl is copied,
 this error will occur.

 Because reports of this error are rare, I would guess that
 /usr/bin/perl5.xx tends to be copied to the sip-workaround directory long
 before /usr/bin/perl is ever needed from trace mode.

 This error can be reproduced by removing ${prefix}/var/macports/sip-
 workaround/502/usr/bin/perl5.xx and running ${prefix}/var/macports/sip-
 workaround/502/usr/bin/perl (either directly or during a trace mode build
 of something needing it, e.g. `ccache @4.5.1_0 +doc`).

-- 
Ticket URL: <https://trac.macports.org/ticket/64061>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list