dk / Prima

prima.eu.org
Other
106 stars 27 forks source link

Build for Darwin arm64? #90

Closed bwva closed 1 year ago

bwva commented 1 year ago

Both cpan and cpanm attempt to build the x86 version of Prima on my arm64 Mac. The "flavor" assignment doesn't seem right. The makefile log shows: "Build: Prima-1.68002-darwin.x86_64-5.36.0" and the build fails for many dependencies. Example: "warning: ignoring file /opt/homebrew/lib/libXext.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64"

Is there a version for arm64?

dk commented 1 year ago

Hi, the flavor line is quite suspicious: the "darwin.x86_64" string is not something Prim a detects or defines, this comes straight out of perl config. Also building from source has nothing to do with binary preferences, this is, well, source... I suspect that your perl has some strange config - check perl -V. However it runs, so no matter what is there wrong in the config, I believe the real problem is elsewhere. Most probably there's something wrong with binary files from homebrew, if these dylibs cannot be picked up by makefile.pl . Finally it "works for me" on my M1 mac which is not x86_64 either. So I would try to build some simpler perl modules first, f ex JSON::XS (no dylib dependencies) and then GD (libgd.dylib needed) just to make sure your setup is good.

bwva commented 1 year ago

Thanks. The flavor line comes from the Makefile. The make process uses uname to get the OS.

The perl is 5.36 that I installed in /opt, after migrating this system from Intel to ARM. I’ve had no problem installing lots of modules. But I see now that I got it wrong, because in perl -V uname shows “release_x86_64”.

Thanks!

— Bruce

_bruce__van_allen__santa_cruzca

On Mar 25, 2023, at 10:04 PM, Dmitry Karasik @.***> wrote:

Hi, the flavor line is quite suspicious: the "darwin.x86_64" string is not something Prim a detects or defines, this comes straight out of perl config. Also building from source has nothing to do with binary preferences, this is, well, source... I suspect that your perl has some strange config - check perl -V. However it runs, so no matter what is there wrong in the config, I believe the real problem is elsewhere. Most probably there's something wrong with binary files from homebrew, if these dylibs cannot be picked up by makefile.pl . Finally it "works for me" on my M1 mac which is not x86_64 either. So I would try to build some simpler perl modules first, f ex JSON::XS (no dylib dependencies) and then GD (libgd.dylib needed) just to make sure your setup is good. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

dk commented 1 year ago

Great! Shall we close the ticket?

bwva commented 1 year ago

Yes, go ahead and close.

I’ll post in r/perl after I reinstall Perl and start over with Prima.

— Bruce

_bruce__van_allen__santa_cruzca

On Mar 26, 2023, at 7:51 AM, Dmitry Karasik @.***> wrote:

Great! Shall we close the ticket? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>