I am trying to run my project using command iex -S mix phx.server . However I am getting below error . I have already installed libsodium using sudo apt install libsodium-dev . I also have gcc , make running .
In file included from src/salty_nif.c:20:
/usr/lib/erlang/usr/include/erl_nif.h:123:14: note: ‘flags’ declared here
123 | unsigned flags;
| ^~~~~
src/salty_nif.c:2246:5: warning: missing initializer for field ‘flags’ of ‘ErlNifFunc’ {aka ‘struct enif_func_t’} [-Wmissing-field-initializers]
2246 | SALTY_EXPORT_FUNC(randombytes_close, 0),
| ^~~~~~~~~~~~~~~~~
In file included from src/salty_nif.c:20:
/usr/lib/erlang/usr/include/erl_nif.h:123:14: note: ‘flags’ declared here
123 | unsigned flags;
| ^~~~~
/usr/bin/ld: cannot find -lerl_interface
collect2: error: ld returned 1 exit status
make: *** [Makefile:37: priv/salty_nif.so] Error 1
could not compile dependency :salty, “mix compile” failed. You can recompile this dependency with “mix deps.compile salty”, update it with “mix deps.update salty” or clean it with “mix deps.clean salty”
** (Mix) Could not compile with “make” (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
“build-essential”. Also install “erlang-dev” package if not
included in your Erlang/OTP version. If you’re on Fedora, run
“dnf group install ‘Development Tools’”.
Regards
Satyam