philss / rustler_precompiled

Use precompiled NIFs from trusted sources in your Elixir code
181 stars 25 forks source link

`TARGET_ARCH` using nerves remains invalid #72

Open steffenix opened 3 months ago

steffenix commented 3 months ago

I am setting up a nerve project using ex_keccak. When not forcing the recompile the project would not compile because the used lib is the right one for the rpi5 but not for my Apple silicon computer. Once I enable force build then it will compile but fail at the firmware generation step.

Updating base firmware image with Erlang release...
scrub-otp-release.sh: ERROR: Unexpected executable format for '/Users/user/Repositories/home_screen/_build/rpi5_dev/_nerves-tmp/rootfs_overlay/srv/erlang/lib/ex_keccak-0.7.5/priv/native/libexkeccak.so'

Got:
 file:Mach-O 64-bit dynamically linked shared library arm64

Expecting:
 readelf:AArch64;0x0
philss commented 2 months ago

So is this working only if you force the build?

steffenix commented 2 months ago

It will compile with a force compile yes but won't produce a firmware.