App-perlbrew icon indicating copy to clipboard operation
App-perlbrew copied to clipboard

Install fail on OSX 12.6.2

Open toddr opened this issue 2 years ago • 7 comments
trafficstars

The relevant Configure output seems to be:

Use which C compiler? [clang]  
clang: error: invalid arch name '-arch -mmacosx-version-min=12.6'
clang: error: invalid arch name '-arch try.c'
clang: error: no input files
Uh-oh, the C compiler 'clang' doesn't seem to be working.

Is there a way I can specify my arch?

toddr avatar Dec 31 '22 17:12 toddr

I seem to be able to run Configure manually. How can I determine what perlbrew is passing to Configure?

toddr avatar Dec 31 '22 17:12 toddr

I was running with

perlbrew install -v -j8 --noman   --64int --64all --ld --switch --clang perl-5.34.1

Turns out --64all was breaking it :\

toddr avatar Dec 31 '22 17:12 toddr

I seem to be able to run Configure manually. How can I determine what perlbrew is passing to Configure?

The answer to this was using the -v option.

toddr avatar Dec 31 '22 17:12 toddr

The failure output is pretty bad here from Configure. The only thing I wonder is if perlbrew should have the smarts to know that --64all is fatal to clang on osx or if I should ping @tux about doing something in Configure.

toddr avatar Dec 31 '22 17:12 toddr

See also https://stackoverflow.com/q/77161089/2173773 and https://github.com/Perl/perl5/issues/21512

hakonhagland avatar Sep 23 '23 17:09 hakonhagland

--64all is fatal to clang

Can confirm that the failure does not occur if I omit '-Duse64bitall', also make runs with no errors, but then make test fails with:

$ make test
[...]
Making all in dist/threads
 /Applications/Xcode.app/Contents/Developer/usr/bin/make all PERL_CORE=1 LIBPERL_A=libperl.dylib LINKTYPE=dynamic
DYLD_LIBRARY_PATH=/Users/hakonhaegland/perl/test/perl-5.14.4  ./miniperl -Ilib make_ext.pl lib/auto/threads/shared/shared.bundle MAKE=/Applications/Xcode.app/Contents/Developer/usr/bin/make LIBPERL_A=libperl.dylib LINKTYPE=dynamic
	Making threads::shared (all)
Making all in dist/threads-shared
 /Applications/Xcode.app/Contents/Developer/usr/bin/make all PERL_CORE=1 LIBPERL_A=libperl.dylib LINKTYPE=dynamic
cd x2p; DYLD_LIBRARY_PATH=/Users/hakonhaegland/perl/test/perl-5.14.4 /Applications/Xcode.app/Contents/Developer/usr/bin/make s2p
make[1]: `s2p' is up to date.
cd t && (rm -f perl; /bin/ln -s ../perl perl)
DYLD_LIBRARY_PATH=/Users/hakonhaegland/perl/test/perl-5.14.4 ./runtests choose
dyld[29249]: Library not loaded: /usr/local/lib/perl5/5.14.4/darwin-thread-multi-2level/CORE/libperl.dylib
  Referenced from: <116C2A3D-6FB0-309C-ADDC-1DA49649B1E5> /Users/hakonhaegland/perl/test/perl-5.14.4/perl
  Reason: tried: '/usr/local/lib/perl5/5.14.4/darwin-thread-multi-2level/CORE/libperl.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/perl5/5.14.4/darwin-thread-multi-2level/CORE/libperl.dylib' (no such file), '/usr/local/lib/perl5/5.14.4/darwin-thread-multi-2level/CORE/libperl.dylib' (no such file), '/usr/local/lib/libperl.dylib' (no such file), '/usr/lib/libperl.dylib' (no such file, not in dyld cache)
./runtests: line 51: 29249 Abort trap: 6           $PERL $TESTFILE $TEST_ARGS $TEST_FILES < /dev/tty
make: *** [test] Error 134

I notice this line:

dyld[29249]: Library not loaded: /usr/local/lib/perl5/5.14.4/darwin-thread-multi-2level/CORE/libperl.dylib

that file does not exist on my computer, rather the file is in the current directory

$ pwd
/Users/hakonhaegland/perl/test/perl-5.14.4
$ file libperl.dylib
libperl.dylib: Mach-O 64-bit dynamically linked shared library arm64

also this file contains reference to the nonexisting file (which I guess is the reason why dyld is failing):

$  otool -L libperl.dylib
libperl.dylib:
	/usr/local/lib/perl5/5.14.4/darwin-thread-multi-2level/CORE/libperl.dylib (compatibility version 5.14.0, current version 5.14.4)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)

hakonhagland avatar Sep 23 '23 18:09 hakonhagland

Just FYI: in case this is on ARM, the issue is with the darwin hints: https://github.com/Perl/perl5/pull/22672/commits/796f85dcc918f40ac12ea01b9cdeb3d8224beaeb Perl/perl5#22672

mtsanovv avatar Oct 16 '24 15:10 mtsanovv