saleyn / erlexec

Execute and control OS processes from Erlang/OTP
https://hexdocs.pm/erlexec/readme.html
Other
525 stars 139 forks source link

Disable erl_interface for Erlang 23 #142

Closed Zabrane closed 3 years ago

Zabrane commented 3 years ago

The erl_interface is deprecated on 23.

$ make
WARN:  Missing plugins: [pc]
==> erlexec (compile)
Compiling c_src/exec.cpp
Compiling c_src/exec_impl.cpp
ld: library not found for -lerl_interface
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR: sh(clang c_src/ei++.o c_src/exec.o c_src/exec_impl.o  -m64  -L"/Users/zab/erlang/23.2.1/lib/erl_interface-4.0.1/lib" -lerl_interface -lei -o priv/x86_64-apple-darwin17.7.0/exec-port)
failed with return code 1 and the following output:
ld: library not found for -lerl_interface
clang: error: linker command failed with exit code 1 (use -v to see invocation)

ERROR: compile failed while processing /private/tmp/erlexec: rebar_abort
make: *** [all] Error 1

Could it be possible to leave the -lerl_interface flag for <23 and disable for >=23

saleyn commented 3 years ago

This needs to be submitted to the maintainers of the "pc" (port_compiler) rebar's plugin, as the port compilation options are set by that plugin.

Also, I do have erlang 23.1.4 installed, but not getting this issue:

$ make
===> Fetching pc v1.11.0
===> Version cached at .../.cache/rebar3/hex/hexpm/packages/pc-1.11.0.tar is up to date, reusing it
===> Analyzing applications...
===> Compiling pc
===> Verifying dependencies...
===> Compiling c_src/ei++.cpp
===> Compiling c_src/exec.cpp
===> Compiling c_src/exec_impl.cpp
===> Linking .../erlexec/priv/x86_64-unknown-linux-gnu/exec-port
===> Analyzing applications...
===> Compiling erlexec

Maybe you have stale rebar3? Also it's strange that you are getting a warning about the missing plugin.