develooper Front page | perl.perl5.porters | Postings from October 2018

[perl #126706] `make test` fails on OS X El Capitan

From:
Tony Cook via RT
Date:
October 9, 2018 05:28
Subject:
[perl #126706] `make test` fails on OS X El Capitan
Message ID:
rt-4.0.24-32502-1539062919-461.126706-15-0@perl.org
On Wed, 03 Oct 2018 22:51:15 -0700, tonyc wrote:
> On Sat, 21 Nov 2015 13:31:31 -0800, dominyktiller@gmail.com wrote:
> > As per the subject line:
> > 
> > ```
> > DYLD_LIBRARY_PATH=/private/tmp/perl20151121\-6532\-elg51d/perl\-5.22.0
> > ./runtests choose
> > dyld: Library not loaded:
> > /usr/local/Cellar/perl/5.22.0/lib/5.22.0/darwin-thread-multi-
> > 2level/CORE/libperl.dylib
> >   Referenced from: /private/tmp/perl20151121-6532-elg51d/perl-
> > 5.22.0/t/./perl
> >   Reason: image not found
> > ./runtests: line 70: 26701 Trace/BPT trap: 5       ./perl $TESTFILE
> > $TEST_ARGS $TEST_FILES < /dev/tty
> > make: *** [test] Error 133
> > ```
> > 
> > OS X El Capitan has a new security feature where the DYLD_LIBRARY_PATH
> > isn't passed down to a child process, which is probably the root cause
> > of the failure here.
> > 
> > If you run:
> > 
> > ```
> > DYLD_LIBRARY_PATH=/private/tmp/perl20151121\-6532\-elg51d/perl\-5.22.0
> > env | grep DYLD
> > ```
> > 
> > As a test for example, on OS X Mavericks you see:
> > 
> > ```
> > DYLD_LIBRARY_PATH=/private/tmp/perl20151121-6532-elg51d/perl-5.22.0
> > ```
> > 
> > On OS X El Capitan you get nothing.
> > 
> > This has been reported in various other projects as well:
> > * http://postgresql.nabble.com/OS-X-El-Capitan-and-DYLD-LIBRARY-PATH-
> > td5869963.html
> > * https://www.mail-archive.com/pgsql-
> > hackers@postgresql.org/msg272269.html
> > * https://forum.qt.io/topic/59439/dyld-library-not-loaded-when-
> > debugging-but-ok-when-running-on-os-x-el-capitan-solved/2
> 
> Please try the attached.
> 
> One test currently fails.
> 
> Tony

This one is better.

The original patch made the libperl path rpath relative, but that confused the embedding test build, and would likely have caused similar problems with production embedding, such as with mod_perl2.

The new patch uses absolute paths, adjusting them on installation, which fixes the embedding case.

Tony


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=126706



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About