Could not compile dependency :salty, "mix compile" failed

My project is always compiling failed with salty until recently i pull the latest master.

I can’t find a package :salty on hex.pm.

Could you please get into a bit more detail?

same, i can’t find it too.This is the failed message blow:

==> salty
cc -o priv/salty_nif.so src/salty_nif.c -I/Users/venooom/.asdf/installs/erlang/21.2.4/usr/include -O2 -Wall -Wextra -I/usr/local/include/sodium -L/Users/venooom/.asdf/installs/erlang/21.2.4/usr/lib -fPIC -shared -lsodium -lei -lerl_interface -L/usr/local/lib -Wl,-rpath /usr/local/lib -flat_namespace -undefined suppress
src/salty_nif.c:19:10: fatal error: 'sodium.h' file not found
#include "sodium.h"
         ^~~~~~~~~~
1 error generated.
make: *** [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"
==> ticket_service
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. Try running the
commands "gcc --version" and / or "make --version". If these programs
are not installed, you will be prompted to install them.

➜  ticket_service git:(a2e22436) ✗ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
➜  ticket_service git:(a2e22436) ✗ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

I still can’t find the package on hex, but from the error message it seams as if the headers for sodium library are missing.

On a Debian based system apt install libsodium-dev might help.

If this is libsalty then it requires system to provide libsodium.

2 Likes

thx a lot bro, libsalty & salty…i don’t have any words to describe my mood…

thx for dealing my problem immediately, but the Solution is not allowed multiple selected, so regard this as it.