ArteMisc / libsalty

Elixir bindings for libsodium (NIF)
Apache License 2.0
21 stars 25 forks source link

Still does not compile #18

Open marcelodiegues opened 5 years ago

marcelodiegues commented 5 years ago

I'm trying to add paseto library in my elixir application. In the doc they say to install libsodium on my macOS, but when I start my app server this error come up.

`cc -o priv/salty_nif.so src/salty_nif.c -I/usr/local/Cellar/erlang/21.3.7/lib/erlang/usr/include -O2 -Wall -Wextra -I/usr/local/include/sodium -L/usr/local/Cellar/erlang/21.3.7/lib/erlang/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"`

marcelodiegues commented 5 years ago

I figured out what's happening. The libsalty is trying to find sodium.h inside of usr/local/include/sodium, but in the new versions, sodium.h came outside this folder. I copied the file to inside the folder and change the include's path.