asdf-crystal icon indicating copy to clipboard operation
asdf-crystal copied to clipboard

Compiling a crytsal for interpreter

Open robacarp opened this issue 2 years ago • 1 comments

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?

robacarp avatar Dec 05 '22 03:12 robacarp

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.

noraj avatar Feb 27 '23 00:02 noraj