Opened 5 years ago

Closed 4 years ago

Last modified 3 years ago

#59924 closed defect (worksforme)

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), chrstphrchvz (Christopher Chavez)
Port: openssl

Description

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) 5 years ago.
main.log

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

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

Please attach a main.log file showing the problem.

comment:2 Changed 5 years ago by mf2k (Frank Schima)

Priority: HighNormal

Changed 5 years ago by raphaelcohn (Raphael Cohn)

Attachment: main.log added

main.log

comment:3 Changed 5 years ago by raphaelcohn (Raphael Cohn)

Added main.log

comment:4 Changed 5 years 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?

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

Resolution: worksforme
Status: assignedclosed

Cannot reproduce.

comment:6 in reply to:  4 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Replying to neverpanic:

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.

I encountered a nearly identical error building a different port, and have a possible explanation for it: #64061

comment:7 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added
Note: See TracTickets for help on using tickets.