I’ve been having issues installing older erlang versions recently and I’m not sure if I’ve broken something in my development environment. I’m trying to install erlang 21.3 with:
asdf install erlang 21.3.8.17
But it is failing with:
Build failed.
make[4]: *** [x86_64-unknown-linux-gnu/Makefile:665: /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/bin/x86_64-unknown-linux-gnu/erl_call] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src'
make[3]: *** [Makefile:30: opt] Error 2
make[3]: Leaving directory '/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src'
make[2]: *** [/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/make/otp_subdir.mk:29: opt] Error 2
make[2]: Leaving directory '/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface'
make[1]: *** [/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/make/otp_subdir.mk:29: opt] Error 2
make[1]: Leaving directory '/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib'
make: *** [Makefile:490: libs] Error 2
Looking at the build log it looks like the issue is that ld
is failing:
/usr/bin/ld: /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(eirecv.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
/usr/bin/ld: /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(send.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
/usr/bin/ld: /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(send_reg.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
/usr/bin/ld: /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(epmd_port.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
/usr/bin/ld: /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_portio.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
RANLIB /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/obj/x86_64-unknown-linux-gnu/liberl_interface.a
collect2: error: ld returned 1 exit status
make[4]: *** [x86_64-unknown-linux-gnu/Makefile:665: /home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/bin/x86_64-unknown-linux-gnu/erl_call] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/home/jason/.asdf/plugins/erlang/kerl-home/builds/asdf_21.3.8.17/otp_src_21.3.8.17/lib/erl_interface/src'
make[3]: *** [Makefile:30: opt] Error 2
Are other people getting similar errors? Does this point to an issue with my environment somehow?