asdf-community / asdf-crystal

Crystal plugin for the asdf version manager
https://github.com/asdf-vm/asdf
Apache License 2.0
75 stars 16 forks source link

Compiling a crytsal for interpreter #53

Open robacarp opened 1 year ago

robacarp commented 1 year ago

I have no idea if this is the right repo for this bug report, or if it should go at https://github.com/crystal-lang/distribution-scripts Perhaps someone here can pull back the curtain enough for me to either solve the problem or at least find the right place to go for better help.

I'm on an M* mac, and I'm curious to try out the interpreter. So I pulled down the repo and make interpreter=1 to spin it off.

It fails, and this is the error message it emits:

ld: warning: ignoring file /Users/robert/.asdf/installs/crystal/1.6.2/embedded/lib/libffi.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

Crystal is using the currently available crystal to compile itself -- the currently available crystal was installed with asdf-crystal, and it seems like the bundled libffi.a file is the wrong architecture for the M-series arm chip. What should my next step be?

noraj commented 1 year ago

cf. https://github.com/crystal-lang/crystal/issues/9285 the install script could use the bundled tarball (https://github.com/crystal-lang/crystal/issues/9285#issuecomment-1124534438) to have the static libraries.