Skip to content

macOS system perl on 10.15+ doesn't allow loading relative paths (from MM_Any.pm) #350

@nieder

Description

@nieder

EU:MM sets INST_ARCHLIB as a relative path, which breaks with the 'latest' release of perl (5.18.4) included with macOS 10.15.

$self->{INST_ARCHLIB} ||= $self->catdir($Curdir,"blib","arch");

An example failure is this:

cc  -I/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -bundle -undefined dynamic_lookup -fstack-protector  ReadKey.o  -o blib/arch/auto/Term/ReadKey/ReadKey.bundle  \
	      \
	  
chmod 755 blib/arch/auto/Term/ReadKey/ReadKey.bundle
"/usr/bin/arch" -x86_64 perl5.18 "-Iblib/arch" "-Iblib/lib" ReadKey_pm.PL ReadKey.pm 
Creating ReadKey.pm
Can't load 'blib/arch/auto/Term/ReadKey/ReadKey.bundle' for module Term::ReadKey: dlopen(blib/arch/auto/Term/ReadKey/ReadKey.bundle, 1): no suitable image found.  Did find:
	file system relative paths not allowed in hardened programs at /System/Library/Perl/5.18/darwin-thread-multi-2level/DynaLoader.pm line 194.
 at /System/Library/Perl/5.18/darwin-thread-multi-2level/DynaLoader.pm line 98.
	DynaLoader::croak('Can\'t load \'blib/arch/auto/Term/ReadKey/ReadKey.bundle\' fo...') called at /System/Library/Perl/5.18/darwin-thread-multi-2level/DynaLoader.pm line 194
	DynaLoader::bootstrap('Term::ReadKey') called at ReadKey_pm.PL line 515
Bootstrapping the XS for blockoptions: make: *** [ReadKey.pm] Error 255

In the snippet above from MM_Any.pm, if I change $Curdir to the absolute path above 'blib/arch' in my build tree for Term::ReadKey, then Term::ReadKey builds.

Should EU::MM be patched to provide the full path? If not, is there a local hack I can use to change $Curdir to the full path?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions