ArteMisc / libsalty

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

Enable compilation with macOS #1

Closed tuupola closed 6 years ago

tuupola commented 6 years ago

This pull request enables compilation with macOS. It contains two changes.

1) First compilation fails with ld: unknown option: -R/usr/local/lib which was fixed by using -rpath instead.

2) After above change I got screenful of Undefined symbols for architecture x86_64: "_enif_alloc_binary", referenced from: .... This was fixed by adding -flat_namespace -undefined suppress to ERLANG_LFLAGS..

Everything is inside conditional so updated flags are used with macOS / Darwin only. Tested with macOS 10.12 Sierra.

ArteMisc commented 6 years ago

included, thanks!