Opened 6 months ago

Last modified 5 months ago

#59924 assigned defect

openssl won't install when used in trace mode

Reported by: raphaelcohn (Raphael Cohn) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc: neverpanic (Clemens Lang)
Port: openssl


openssl refuses to finish the Configure phase when used with trace mode (port install -t openssl).

This seems to be because it relised on perl5.18, whilst only perl is on the path.

We use trace mode to make sure we don't accidentally pollute our builds.

Attachments (1)

main.log (31.9 KB) - added by raphaelcohn (Raphael Cohn) 6 months ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 months ago by ryandesign (Ryan Schmidt)

Cc: neverpanic added
Owner: set to larryv
Status: newassigned

Please attach a main.log file showing the problem.

comment:2 Changed 6 months ago by mf2k (Frank Schima)

Priority: HighNormal

Changed 6 months ago by raphaelcohn (Raphael Cohn)

Attachment: main.log added


comment:3 Changed 6 months ago by raphaelcohn (Raphael Cohn)

Added main.log

comment:4 Changed 5 months ago by neverpanic (Clemens Lang)

Error is perl: posix_spawn: /Users/raph/Documents/hdl-playground/tools/reproducible-macports/prefix/var/macports/sip-workaround/501/usr/bin/perl5.18: No such file or directory.

${prefix}/var/macports/sip-workaround/${euid} is a path used as a workaround for Apple's system integrity protection, which drops any DYLD_* variables when executing binaries under SIP. Since this would break trace mode, MacPorts hooks execve(2) and posix_spawn(2) and makes a copy of the original binary in this folder if the binary is SIP-protected, and then transparently proceeds to execute this copy instead.

OpenSSL's configure script uses /usr/bin/env perl as shebang, which would have triggered a copy of /usr/bin/env, injected with a library that hooks the execve call. That should then have caused a copy of /usr/bin/perl (or any other perl in MacPorts' path) to be executed.

I'm not sure where and why the perl5.18 path would show up in this chain. Do you have a symlink perl -> perl5.18 somewhere? In any case, I cannot reproduce this. Try wiping the contents of ${prefix}/var/macports/sip-workaround/, maybe that helps?

Note: See TracTickets for help on using tickets.