Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 errors when using with nerves #499

Open
Hermanverschooten opened this issue Nov 11, 2024 · 0 comments
Open

2 errors when using with nerves #499

Hermanverschooten opened this issue Nov 11, 2024 · 0 comments

Comments

@Hermanverschooten
Copy link

Hi,

I added zigler to my nerves project and noticed 2 errors.
After installing whenever I run a mix command I will get
Error while loading project :zigler at /Users/herman/Projects/GratWiFi/nerves/firmware/deps/zigler

When I run mix firmware I will get
10:30:01.934 [error] loading module Elixir.GratWiFi.Zig.Datetime {:load_failed, ~c"Failed to load NIF library: 'dlopen(/Users/herman/Projects/GratWiFi/nerves/firmware/_build/gratwifi_rpi5_dev/lib/zigler/priv/lib/Elixir.GratWiFi.Zig.Datetime.so, 0x0002): tried: '/Users/herman/Projects/GratWiFi/nerves/firmware/_build/gratwifi_rpi5_dev/lib/zigler/priv/lib/Elixir.GratWiFi.Zig.Datetime.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herman/Projects/GratWiFi/nerves/firmware/_build/gratwifi_rpi5_dev/lib/zigler/priv/lib/Elixir.GratWiFi.Zig.Datetime.so' (no such file), '/Users/herman/Projects/GratWiFi/nerves/firmware/_build/gratwifi_rpi5_dev/lib/zigler/priv/lib/Elixir.GratWiFi.Zig.Datetime.so' (not a mach-o file), '/Users/herman/Projects/GratWiFi/nerves/firmware/deps/zigler/priv/lib/Elixir.GratWiFi.Zig.Datetime.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herman/Projects/GratWiFi/nerves/firmware/deps/zigler/priv/lib/Elixir.GratWiFi.Zig.Datetime.so' (no such file), '/Users/herman/Projects/GratWiFi/nerves/firmware/deps/zigler/priv/lib/Elixir.GratWiFi.Zig.Datetime.so' (not a mach-o file)'"}

This is because :erlang.load_nif/2 is called in _module.ex on the cross-compiled so.

The resulting firmware works, but I still wanted to make you aware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant