Elixir explorer installation ends in "illegal instruction"

Hello everyone

I have installed erlang 27.0 and the corresponding elixir 1.17.2-otp-27. However, when I try to fetch dependency explorer ~>0.9.0, I am getting a message about “copying NIF from cache and extracting to …” but it ends in “illegal instruction”. I am guessing that the message originates from erlang (?) which would point to a mismatch of versions.

Irrespectively of whether my hunch is correct or not, how do we go about installing explorer in a similar setting?

Can you provide the complete terminal output with any stacktrace that you may have? Also please post your OS information.

Hi, certainly:

There is no stacktrace, this is all I am getting when it comes to installing explorer:


==> explorer
Compiling 29 files (.ex)

17:58:24.462 [debug] Copying NIF from cache and extracting to /home/[something something]/_build/dev/lib/explorer/priv/native/libexplorer-v0.9.0-nif-2.15-x86_64-unknown-linux-gnu.so
Illegal instruction

I am on Ubuntu 24.04 and asdf v0.14.0-ccdd47d

That should work. We probably test a similar environment on CI. Can you delete the cache and rule out it somehow getting corrupted?

I have tried this in a couple of different machines, but I just tried it again, getting:

Compiling 29 files (.ex)

18:17:44.504 [debug] Downloading NIF from https://github.com/elixir-nx/explorer/releases/download/v0.9.0/libexplorer-v0.9.0-nif-2.15-x86_64-unknown-linux-gnu.so.tar.gz

18:17:49.220 [debug] NIF cached at /home/[something something]/rustler_precompiled/precompiled_nifs/libexplorer-v0.9.0-nif-2.15-x86_64-unknown-linux-gnu.so.tar.gz and extracted to /home/[something something]/_build/dev/lib/explorer/priv/native/libexplorer-v0.9.0-nif-2.15-x86_64-unknown-linux-gnu.so
Illegal instruction

:frowning:

Sorry to hear. It seems there is something on your machine that is incompatible with our prebuilt cache. I wonder if this can be caused by gcc/clang version but I am not sure if that impacts Rust projects too.

What CPU do you have in the affected machines?

As a quicktest try using the legacy artifacts:

3 Likes

Yeah, I should have checked that first, really sorry. Thank you very much for such a quick response @josevalim , @NobbZ

1 Like