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

Resulting binary is x86_64 on an M1 mac but should be arm64

Open mstratman opened this issue 5 months ago • 0 comments

My perl binaries on an M1 mac are x86_64 which is preventing me from building DBD::Pg. I believe I need an arm64 binary.

~ $ file /Users/mstratman/perl5/perlbrew/perls/perl-5.40.0/bin/perl
/Users/mstratman/perl5/perlbrew/perls/perl-5.40.0/bin/perl: Mach-O 64-bit executable x86_64

I tried exporting ARCHFLAGS=-arch arm64, verifying it was set w/ env then perlbrew install .... and the resulting binary was still x86_64

~ $ env | grep ARCH
ARCHFLAGS=-arch arm64
~ $ perlbrew install --notest perl-5.38.2
Installing /Users/mstratman/perl5/perlbrew/build/perl-5.38.2/perl-5.38.2 into ~/perl5/perlbrew/perls/perl-5.38.2

This could take a while. You can run the following command on another shell to track the status:

  tail -f ~/perl5/perlbrew/build.perl-5.38.2.log

perl-5.38.2 is successfully installed.
~ $ file ~/perl5/perlbrew/perls/perl-5.38.2/bin/perl
/Users/mstratman/perl5/perlbrew/perls/perl-5.38.2/bin/perl: Mach-O 64-bit executable x86_64

mstratman avatar Sep 04 '24 15:09 mstratman