Closed mpinkston closed 2 years ago
I am also having the same with
Erlang/OTP 23 [erts-11.0.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
Elixir 1.10.3 (compiled with Erlang/OTP 21)
OS Ubuntu 20.0
Error:
LD libdecaf_nif.so
/usr/bin/ld: cannot find -lerl_interface
collect2: error: ld returned 1 exit status
I think it is safe to remove that line -lerl_interface
. Playing around with this library, I've found that it requires OTP 20+ to get all test cases to pass, and OTP 19+ to get any of the tests to pass at all.
On OTP 18.3.4, tests fail with error /build/libdecaf/c_src/nif/libdecaf_nif.c:184:54: error: use of undeclared identifier 'ERL_NIF_DIRTY_JOB_CPU_BOUND'
. The failures happen with or without -lerl_interface
.
The presence of the -lerl_interface
line in the Makefile does not appear to make a difference on OTP 19+ for this library. I guess the -lei
already provides all the symbols necessary.
To get the tests to run, I had to make a few changes:
FROM ubuntu:xenial
(was ubuntu:cosmic)clang-7
to clang-8
, and all clang++-7
to clang++-8
make clean && make docker-setup DOCKER_OTP_VERSION=19.3.6 && make docker-test DOCKER_OTP_VERSION=19.3.6
Here is another try to deal with removed erl_interface
, what should work for Erlang prior 23 and also for later releases: https://github.com/potatosalad/erlang-libdecaf/pull/11.
This should be fixed as part of libdecaf
version 2.0.0.
compilation on OTP23 fails with the error message
ld: library not found for -lerl_interface
I think that was deprecated and appears to be fixable by simply removing that line in the Makefile
to
(though I wasn't quite sure how to make this backwards-compatible)