erlang / rebar3

Erlang build tool that makes it easy to compile and test Erlang applications and releases.
http://www.rebar3.org
Apache License 2.0
1.69k stars 515 forks source link

OTP23 default Makefile template links erl_interface #2323

Closed dominicletz closed 4 years ago

dominicletz commented 4 years ago

OTP23 has erl_interface deprecated and erl_interface.so is not part of the distribution anymore. Thus the default Makefile template fails linking

$ ./rebar3 -v
rebar 3.13.2 on Erlang/OTP 23 Erts 11.0.3
$ ./rebar3 new cmake
$ cd c_src/
c_src$ make
cc /home/dominicletz/projects/esqlite/c_src/sqlite3/sqlite3.o /home/dominicletz/projects/esqlite/c_src/queue.o /home/dominicletz/projects/esqlite/c_src/esqlite3_nif.o -shared -L /usr/lib/erlang/lib/erl_interface-4.0/lib -lerl_interface -lei -o /home/dominicletz/projects/esqlite/c_src/../priv/esqlite.so
/usr/bin/ld: cannot find -lerl_interface
collect2: error: ld returned 1 exit status
Makefile:58: recipe for target '/home/dominicletz/projects/esqlite/c_src/../priv/esqlite.so' failed
make: *** [/home/dominicletz/projects/esqlite/c_src/../priv/esqlite.so] Error 1

https://github.com/erlang/rebar3/blob/416176290b20e1e68c5901f83cccef71ec2bc322/priv/templates/Makefile#L37

tsloughter commented 4 years ago

Thanks, glad this was caught before we cut 3.14.0. We had updated the port_compiler plugin but not the builtin template! :)