potatosalad / erlang-keccakf1600

Keccak-f[1600] NIF with timeslice reductions for Erlang and Elixir.
MIT License
17 stars 30 forks source link

mac x64 compile issue #4

Open tcodes0 opened 5 years ago

tcodes0 commented 5 years ago

Hey guys! thanks for this awesome lib. Having some issues to compile on mac:

===> Compiling keccakf1600
 LD     keccakf1600_nif.so
Undefined symbols for architecture x86_64:
  "_enif_alloc", referenced from:
      _keccakf1600_nif_load in keccakf1600_nif.o
      _keccakf1600_nif_upgrade in keccakf1600_nif.o
      _keccakf1600_nif_spongerng_init_from_file_3 in keccakf1600_nif.o
      _keccakf1600_xnif_load in keccakf1600_nif.o
  "_enif_alloc_resource", referenced from:
      _keccakf1600_nif_sha3_224_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_2 in keccakf1600_nif.o
      ...
  "_enif_consume_timeslice", referenced from:
      _xnif_slice_trap in xnif_slice.o
  "_enif_free", referenced from:
      _keccakf1600_nif_load in keccakf1600_nif.o
      _keccakf1600_nif_upgrade in keccakf1600_nif.o
      _keccakf1600_nif_unload in keccakf1600_nif.o
      _keccakf1600_nif_spongerng_init_from_file_3 in keccakf1600_nif.o
      _keccakf1600_xnif_load in keccakf1600_nif.o
      _keccakf1600_xnif_unload in keccakf1600_nif.o
  "_enif_get_resource", referenced from:
      _keccakf1600_nif_sha3_224_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_512_update_2 in keccakf1600_nif.o
      ...
  "_enif_get_ulong", referenced from:
      _keccakf1600_nif_sha3_224_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_512_2 in keccakf1600_nif.o
      ...
  "_enif_inspect_iolist_as_binary", referenced from:
      _keccakf1600_nif_sha3_224_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_512_2 in keccakf1600_nif.o
      ...
  "_enif_make_atom", referenced from:
      _keccakf1600_xnif_load in keccakf1600_nif.o
  "_enif_make_badarg", referenced from:
      _keccakf1600_nif_sha3_224_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_update_2 in keccakf1600_nif.o
      ...
  "_enif_make_new_binary", referenced from:
      _keccakf1600_nif_sha3_224_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_512_2 in keccakf1600_nif.o
      ...
  "_enif_make_resource", referenced from:
      _keccakf1600_nif_sha3_224_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_2 in keccakf1600_nif.o
      ...
  "_enif_make_tuple", referenced from:
      _keccakf1600_nif_spongerng_next_2 in keccakf1600_nif.o
  "_enif_monotonic_time", referenced from:
      _xnif_slice_trap in xnif_slice.o
  "_enif_open_resource_type", referenced from:
      _keccakf1600_xnif_load in keccakf1600_nif.o
      _xnif_slice_load in xnif_slice.o
      _xnif_slice_upgrade in xnif_slice.o
  "_enif_priv_data", referenced from:
      _keccakf1600_nif_sha3_224_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_update_2 in keccakf1600_nif.o
      ...
  "_enif_release_resource", referenced from:
      _keccakf1600_nif_sha3_224_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_224_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_init_0 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_256_update_2 in keccakf1600_nif.o
      _keccakf1600_nif_sha3_384_2 in keccakf1600_nif.o
      ...
  "_enif_schedule_nif", referenced from:
      _keccakf1600_nif_shake128_final_2 in keccakf1600_nif.o
      _keccakf1600_nif_shake256_final_2 in keccakf1600_nif.o
      _xnif_slice_schedule in xnif_slice.o
      _xnif_slice_trap in xnif_slice.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/vamac/Code/sense-server/deps/keccakf1600/priv/keccakf1600_nif.so] Error 1
===> Hook for compile failed!

** (Mix) Could not compile dependency :keccakf1600, "/Users/vamac/.mix/rebar3 bare compile --paths="/Users/vamac/Code/sense-server/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile keccakf1600", update it with "mix deps.update keccakf1600" or clean it with "mix deps.clean keccakf1600"
~> elixir --version
Erlang/OTP 22 [erts-10.5.3] [source] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.9.2 (compiled with Erlang/OTP 22)
~> uname -a
Darwin Coffee-Lake-iMac.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64