gugod / App-perlbrew

Manage perl installations in your $HOME
https://perlbrew.pl
Other
720 stars 216 forks source link

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

Open mstratman opened 2 months ago

mstratman commented 2 months ago

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