ninenines / erlang.mk

A build tool for Erlang that just works.
https://erlang.mk
ISC License
578 stars 241 forks source link

Error when trying to link *.so for nif. OTP-23rc1 #876

Closed tank-bohr closed 4 years ago

tank-bohr commented 4 years ago

from ei guide

The old legacy erlinterface library (functions with prefix erl) is deprecated as of OTP 22, and will be removed in OTP 23. This does not apply to the ei library. Reasonably new gcc compilers will issue deprecation warnings. In order to disable these warnings, define the macro EI_NO_DEPR_WARN.

But https://github.com/ninenines/erlang.mk/blob/7edc30ad40cd5dc033bc8f0e914b951abf6d0527/plugins/c_src.mk#L59 still works everytime. Which lead to the error for make deps target

make[1]: Entering directory '/app/deps/tempo'
cc -c -o c_src/tempo.o c_src/tempo.c -std=gnu99 -Wall -Wextra  -pedantic -finline-functions -Wall -fPIC -I "/usr/local/lib/erlang/erts-11.0/include" -I "/usr/local/lib/erlang/lib/erl_interface-3.14/include" -fPIC
cc -o priv/tempo.so c_src/tempo.o  -L "/usr/local/lib/erlang/lib/erl_interface-3.14/lib" -lerl_interface -lei   -shared
/usr/bin/ld: cannot find -lerl_interface
collect2: error: ld returned 1 exit status
make[2]: *** [c_src/Makefile.erlang.mk:22: priv/tempo.so] Error 1
make[1]: *** [Makefile:22: pre-app] Error 2
make[1]: Leaving directory '/app/deps/tempo'
make: *** [erlang.mk:4504: deps] Error 2

erlang.mk version:

erlang.mk (version 2020.03.05)
essen commented 4 years ago

What Erlang version are you using?

tank-bohr commented 4 years ago

What Erlang version are you using?

@essen OTP-23rc1

Erlang/OTP 23 [RELEASE CANDIDATE 1] [erts-11.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
essen commented 4 years ago

Probably just going to remove it as it's too complex to check for availability reliably.

essen commented 4 years ago

Please update make erlang-mk and confirm it is now fixed. Thanks!