File has no extension: <current_directory>/kernel
esambo opened this issue · 2 comments
Error
asdf install erlang latest
fails with:
...
gmake[2]: Entering directory '/Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts/start_scripts'
GEN /Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts/start_scripts/start_clean.rel
GEN /Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts/start_scripts/start_sasl.rel
GEN /Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts/start_scripts/start_all_example.rel
GEN /Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts/start_scripts/no_dot_erlang.rel
GEN /Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts/start_scripts/start_clean.script
File has no extension: /Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts/start_scripts/tmp/kernel
gmake[2]: *** [Makefile:84: /Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts/start_scripts/start_clean.script] Error 1
gmake[2]: Leaving directory '/Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts/start_scripts'
gmake[1]: *** [Makefile:73: local_setup] Error 2
gmake[1]: Leaving directory '/Users/emmanuel.sambo/.asdf/plugins/erlang/kerl-home/builds/asdf_25.1.2/otp_src_25.1.2/erts'
gmake: *** [Makefile:1102: local_setup] Error 2
It appears that the File has no extension:
error looking for kernel
is in the last directory the installation entered (eg. start_scripts
).
Environment
Homebrew
My homebrew configuration is:
brew config
HOMEBREW_VERSION: 3.6.7
ORIGIN: https://github.com/Homebrew/brew
HEAD: 6a7eac25e167a1eb2d49e13c8cc530a3188af995
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: e56c559de618867c3eadb58615208aba6116ecc9
Core tap last commit: 57 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: mvim
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.38.1 => /opt/homebrew/bin/git
Curl: 7.84.0 => /usr/bin/curl
macOS: 13.0-arm64
CLT: 14.1.0.0.1.1666437224
Xcode: N/A
Rosetta 2: false
Env Vars
My environment variables are (also exclude megaco as it kept failing the installation):
export KERL_CONFIGURE_OPTIONS="--with-ssl=$(brew --prefix openssl@1.1) --with-odbc=$(brew --prefix unixodbc) --without-megaco"
export CC="/usr/bin/clang -I$(brew --prefix unixodbc)/include"
export LDFLAGS=-L$(brew --prefix unixodbc)/lib
Related
Homebrew
I can recreate the same kind of error with a homebrew erlang version too, and the error message also reflects the current directory I'm in:
$(brew --prefix erlang@24)/lib/erlang/bin/erlc -v
File has no extension: /kernel
I do have kernel.{beam,app,appup}
files in:
- /opt/homebrew/Cellar/erlang@24/24.3.4.6/lib/erlang/lib/kernel-8.3.2.2/ebin/kernel.*
- /opt/homebrew/Cellar/erlang@24/24.3.4.6/lib/erlang/lib/kernel-8.3.2.2/src/kernel.*
Error Message
Not that it matters, it the error message may come from: https://github.com/blackberry/Erlang-OTP/blob/master/lib/stdlib/src/erl_compile.erl#L183
Not sure why, but the problems seems to be:
env | grep kernel
ERL_AFLAGS=kernel shell_history enabled
Removing this env. var. fixes the error. But why doesn't it work on macOS Ventura anymore?
And why did I need --without-megaco
?
It works just fine if I use the correct syntax of:
export ERL_AFLAGS="-kernel shell_history enabled"