I'm trying to compile by asdf install erlang 20.3.8.9 on macOS 10.13.6, but many symbols aren't resolved:
Undefined symbols for architecture x86_64:
"_erts_bind_to_cpu", referenced from:
_erts_sched_check_cpu_bind in erl_cpu_topology.o
_erts_init_scheduler_bind_type_string in erl_cpu_topology.o
_erts_bind_schedulers in erl_cpu_topology.o
"_erts_cbprintf", referenced from:
_dump_memory_map_to_stream in erl_instrument.o
_dump_stat_to_stream in erl_instrument.o
_erl_crash_dump_v in break.o
_erts_print_nif_taints in erl_nif.o
"_erts_cpu_info_create", referenced from:
_erts_pre_early_init_cpu_topology in erl_cpu_topology.o
"_erts_cpu_info_update", referenced from:
_erts_update_cpu_info in erl_cpu_topology.o
...
It also occurs when asdf install erlang 21.3.8.6 and asdf install erlang 22.0.7.
Clang version is here:
$ clang --version
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Not sure, I've got a similar setup and everything works for me:
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Maybe look for issues in the kerl issue tracker? They might be aware of something related to this.
I had to unset my custom LDFLAGS (important as I use a non-standard homebrew path) but fortunately my KERL_CONFIGURE_OPTIONS="--with-ssl=/Users/b/brew/opt/openssl" was enough to get a working compile (with SSL).
I got it!
I guess this MacBook environment was broken because it can be built on another environment.
Thank you!
Most helpful comment
I had to unset my custom LDFLAGS (important as I use a non-standard homebrew path) but fortunately my KERL_CONFIGURE_OPTIONS="--with-ssl=/Users/b/brew/opt/openssl" was enough to get a working compile (with SSL).