Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install from ref: "At least Erlang/OTP 25.0 is required to build Elixir" (but I have Erlang 25 installed) #132

Open
thbar opened this issue Apr 22, 2024 · 4 comments

Comments

@thbar
Copy link
Contributor

thbar commented Apr 22, 2024

Hello,

I wanted to install Elixir 1.17 (not released at time of writing) in order to use new debugging features (such as https://twitter.com/josevalim/status/1762921819776934146) for my current feature work.

In my .tool-versions, I have:

elixir 1.16.2-otp-25
erlang 25.3.2.10
nodejs 20.11.1

I tried installing Elixir main version with:

asdf install elixir ref:6863a51c65896fcc6749883ac8d43a57d63714b2

But this results in:

❯ asdf install elixir ref:6863a51c65896fcc6749883ac8d43a57d63714b2
==> Checking whether specified Elixir reference exists...
==> Downloading 6863a51c65896fcc6749883ac8d43a57d63714b2 to /Users/thbar/.asdf/downloads/elixir/ref-6863a51c65896fcc6749883ac8d43a57d63714b2/elixir-ref-6863a51c65896fcc6749883ac8d43a57d63714b2-src.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 3153k    0 3153k    0     0  3146k      0 --:--:--  0:00:01 --:--:-- 5525k
==> Making the release
rm -rf ebin
rm -rf lib/*/ebin
rm -rf lib/elixir/src/elixir_parser.erl
rm -rf lib/*/_build/
rm -rf lib/*/tmp/
rm -rf lib/elixir/test/ebin/
rm -rf lib/mix/test/fixtures/deps_on_git_repo/
rm -rf lib/mix/test/fixtures/git_rebar/
rm -rf lib/mix/test/fixtures/git_repo/
rm -rf lib/mix/test/fixtures/git_sparse_repo/
rm -rf lib/mix/test/fixtures/archive/ebin/
rm -f erl_crash.dump
rm -f man/elixir.1
rm -f man/elixir.1.bak
rm -f man/iex.1
rm -f man/iex.1.bak
At least Erlang/OTP 25.0 is required to build Elixir
make: *** [erlang] Error 1
Build failed, cleaning...

The error mentions a requirement for OTP 25, but I have exactly OTP 25 running.

I wonder what is happening, maybe a shim issue for Erlang itself.

Is there a known solution for this?

Can't wait to use those debugging features :-)

@thbar
Copy link
Contributor Author

thbar commented Apr 24, 2024

As @Tuxified pointed out on Slack (thank you!):

Since install from reference (main branch) uses a subshell, I'm guessing it doesn't have the subshell setup correctly, hence it doesn't find Erlang. Do you have that version of Erlang set globally? If not, you could try that, hopefully the subshell does have asdf setup correctly ?

To check/debug if it setup correctly you can modify ~/.asdf/plugins/elixir/bin/install (assuming you have asdf installed there) and put echo $(erl -version) in the install_elixir_ref() function

I did that and the output shows that the sub shell is probably not initialised at all (like it can happen with other similar systems, e.g. RVM), and the output gives:

Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 13.2.2.7

@Stratus3D
Copy link
Member

Erlang (SMP,ASYNC_THREADS) (BEAM) emulator version 13.2.2.7

Sorry, what is this output from?

It's possible asdf isn't configured correctly on your system. What is the output of type -a erl in the same shell that you ran asdf install elixir ref:6863a51c65896fcc6749883ac8d43a57d63714b2 in?

@thbar
Copy link
Contributor Author

thbar commented Apr 26, 2024

The output is from:

put echo $(erl -version) in the install_elixir_ref() function

Re:

What is the output of type -a erl in the same shell that you ran asdf install elixir ref:6863a51c65896fcc6749883ac8d43a57d63714b2 in?

I initially got:

❯ type -a erl
erl is /Users/thbar/.asdf/shims/erl
erl is /opt/homebrew/bin/erl

I removed the brew installed one right after testing that, but it doesn't change the error I'm meeting!

@Stratus3D
Copy link
Member

The output you got from type -a erl is correct. It indicates asdf is configured properly for this and it takes precedence over brew binaries.

In the same directory that you ran asdf install elixir ref:6863a51c65896fcc6749883ac8d43a57d63714b2 in, what does asdf current print?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants