I am trying to run iex -S mix phx.server . But I am getting below error . I have installed libsodium using sudo apt install libsodium-dev but it didn't work . I also have make , gcc, erlang-dev installed
Elixir version : Elixir 1.11.2 (compiled with Erlang/OTP 23)
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:2244:5: warning: missing initializer for field ‘flags’ of ‘ErlNifFunc’ {aka ‘struct enif_func_t’} [-Wmissing-field-initializers]
2244 | SALTY_EXPORT_FUNC(randombytes_buf, 1),
| ^~~~~~~~~~~~~~~~~
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:2245:5: warning: missing initializer for field ‘flags’ of ‘ErlNifFunc’ {aka ‘struct enif_func_t’} [-Wmissing-field-initializers]
2245 | SALTY_EXPORT_FUNC(randombytes_buf_deterministic, 2),
| ^~~~~~~~~~~~~~~~~
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'".
I referred to the below posts but it didn't work out .
could not compile dependency :salty, "mix compile" failed
https://elixirforum.com/t/could-not-compile-dependency-salty-mix-compile-failed/24538