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

[perl #133306] 5.28.0 fails to compile on macOS 10.13 withDuseshrplib

Thread Next
From:
Dominyk Tiller
Date:
June 25, 2018 23:34
Subject:
[perl #133306] 5.28.0 fails to compile on macOS 10.13 withDuseshrplib
Message ID:
rt-4.0.24-24677-1529969140-1326.133306-75-0@perl.org
# New Ticket Created by  Dominyk Tiller 
# Please include the string:  [perl #133306]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133306 >


Hey folks,

Trying to update Perl to the latest 5.28.0 release over at Homebrew we
discovered (https://github.com/Homebrew/homebrew-core/pull/29384) the
problematic use of `DYLD_LIBRARY_PATH` has expanded from the testsuite
(https://rt.perl.org/Ticket/Display.html?id=126706) to the main build
itself.

I'll attach a full make printout but the failures are all similar to:
=======================================================
cd dist/Storable ;
DYLD_LIBRARY_PATH=/private/tmp/perl-20180625-20323-1h89sy0/perl-5.28.0
/Applications/Xcode.app/Contents/Developer/usr/bin/make
lib/Storable/Limit.pm
/private/tmp/perl-20180625-20323-1h89sy0/perl-5.28.0/dist/Storable/../../miniperl
"-I../../lib" -MExtUtils::Command -e 'mkpath' -- ../../lib
/private/tmp/perl-20180625-20323-1h89sy0/perl-5.28.0/cpan/Encode/KR/../../../miniperl
"-I../../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- KR.bs
../../../lib/auto/Encode/KR/KR.bs 644
"../../perl" "-I../../lib" "-I../../lib" stacksize --core
dyld: Library not loaded:
/usr/local/Cellar/perl/5.28.0/lib/perl5/5.28.0/darwin-thread-multi-2level/CORE/libperl.dylib
  Referenced from:
/private/tmp/perl-20180625-20323-1h89sy0/perl-5.28.0/dist/Storable/../../perl
  Reason: image not found
make[1]: *** [lib/Storable/Limit.pm] Abort trap: 6
make: *** [dist/Storable/lib/Storable/Limit.pm] Error 2
make: *** Waiting for unfinished jobs....
=======================================================

I appreciate the use of `-Duseshrplib` is not a default setting on macOS
(https://github.com/Perl/perl5/blob/74269297/hints/darwin.sh#L359-L360)
but given Homebrew, MacPorts and Apple themselves ship perl configured
with that option it's a pretty major issue for the platform.

It's worth noting that `DYLD_LIBRARY_PATH` has been intentionally
hobbled since macOS 10.11 as part of Apple's System Integrity Protection
and consequently for the vast majority of cases it should no longer be
used; rpath has become the standard replacement.

I've also attached a hastily thrown together bash script to show the
issue with passing `DYLD_LIBRARY_PATH`, in case that's a clearer way of
explaining the situation. Run that on any version of macOS after 10.11 &
it should blow up in the same way Perl's make process now does.

Thanks,

Dominyk
-- 
Sent from macOS.

Thread Next


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