Git Product home page Git Product logo

Comments (6)

Nezteb avatar Nezteb commented on September 28, 2024 1

I'm thinking this is related to kerl/kerl#236 actually, which has been mentioned here before: #143

I have threse files:

# ~/.asdf/plugins/erlang/kerl-home/otp_installations

asdf_25.3 /Users/noah/.asdf/installs/erlang/25.3
asdf_22.3.4.26 /Users/noah/.asdf/installs/erlang/22.3.4.26
asdf_25.2.2 /Users/noah/.asdf/installs/erlang/25.2.2
asdf_25.3.2 /Users/noah/.asdf/installs/erlang/25.3.2
asdf_25.2.1 /Users/noah/.asdf/installs/erlang/25.2.1
asdf_26.0.2 /Users/noah/.asdf/installs/erlang/26.0.2
asdf_26.1.1 /Users/noah/.asdf/installs/erlang/26.1.1
asdf_26.1.2 /Users/noah/.asdf/installs/erlang/26.1.2
asdf_25.3.2.7 /Users/noah/.asdf/installs/erlang/25.3.2.7
asdf_25.1.1 /Users/noah/.asdf/installs/erlang/25.1.1

# ~/.asdf/plugins/erlang/kerl-home/otp_builds
25.3,asdf_25.3
22.3.4.26,asdf_22.3.4.26
25.2.2,asdf_25.2.2
25.3.2,asdf_25.3.2
25.2.1,asdf_25.2.1
26.0.2,asdf_26.0.2
25.3.2.7,asdf_25.3.2.7
25.1.1,asdf_25.1.1
26.1.2,asdf_26.1.2
26.1.1,asdf_26.1.1

As I noted earlier though:

❯ ls -al ~/.asdf/installs/erlang
25.1.1
26.1

tldr

kerl cleanup should fix this. For asdf-erlang, you may need to fully qualify the path to kerl, like: ~/.asdf/plugins/erlang/kerl cleanup.

At some point I was manually doing rm -rf ~/.asdf/installs/erlang/*; I didn't realize this causes so many issues for kerl. It looks like this might be fixed soon via PR to kerl though!

from asdf-erlang.

sevenseacat avatar sevenseacat commented on September 28, 2024

Yeah I'm seeing the same thing - with only one of my projects though.

I have a project using 26.1.2 that's totally fine, but now I'm getting this error with a different project using 26.0.2.

Also using macOS Sonoma
asdf version v0.13.1-8fbf9a3
asdf-erlang up to date with master

.: ~/P/w/a/spark : refactor/cheat-sheet-tables (8a987a3) : 12:13am :.
$ asdf install
==> Checking whether specified Elixir release exists...
==> Downloading 1.15.4-otp-26 to /Users/rebecca/.asdf/downloads/elixir/1.15.4-otp-26/elixir-precompiled-1.15.4-otp-26.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6642k  100 6642k    0     0  2369k      0  0:00:02  0:00:02 --:--:-- 2374k
==> Copying release into place
asdf_26.0.2 is not a kerl-managed Erlang/OTP installation
The asdf_26.0.2 build has been deleted
Extracting source code
Building Erlang/OTP 26.0.2 (asdf_26.0.2), please wait...
APPLICATIONS DISABLED (See: /Users/rebecca/.asdf/plugins/erlang/kerl-home/builds/asdf_26.0.2/otp_build_26.0.2.log)
 * jinterface     : No Java compiler found
 * odbc           : ODBC library - link check failed

APPLICATIONS INFORMATION (See: /Users/rebecca/.asdf/plugins/erlang/kerl-home/builds/asdf_26.0.2/otp_build_26.0.2.log)
 * wx             : Can not link wx program are all developer packages installed?

DOCUMENTATION INFORMATION (See: /Users/rebecca/.asdf/plugins/erlang/kerl-home/builds/asdf_26.0.2/otp_build_26.0.2.log)
 * documentation  :
 *                  fop is missing.
 *                  Using fakefop to generate placeholder PDF files.

Erlang/OTP 26.0.2 (asdf_26.0.2) has been successfully built

.: ~/P/w/a/spark : refactor/cheat-sheet-tables (8a987a3) : 12:14am :.
$ erl -v
No erl executable found for erlang 26.0.2

I'm not seeing the same error on my other machine running the exact same project, so I'm not sure what's going on...

from asdf-erlang.

Nezteb avatar Nezteb commented on September 28, 2024

I found the cause of the problem as well as a decent-enough workaround.

Listing all directories/files that match "erl" or "otp" in the asdf directory:

❯ tree ~/.asdf -L 5 --matchdirs --ignore-case -P 'erl|otp' --prune -f
/Users/noah/.asdf
├── /Users/noah/.asdf/installs
│   └── /Users/noah/.asdf/installs/erlang
│       ├── /Users/noah/.asdf/installs/erlang/25.1.1
│       │   └── /Users/noah/.asdf/installs/erlang/25.1.1/bin
│       │       └── /Users/noah/.asdf/installs/erlang/25.1.1/bin/erl
│       └── /Users/noah/.asdf/installs/erlang/26.1
│           └── /Users/noah/.asdf/installs/erlang/26.1/bin
│               └── /Users/noah/.asdf/installs/erlang/26.1/bin/erl
└── /Users/noah/.asdf/shims
    └── /Users/noah/.asdf/shims/erl

8 directories, 3 files

The biggest things to note:

  • asdf list all erlang lists Erlang 26.1.1 as an installable version.
  • I have been telling asdf to install version 26.1.1
    • However, I don't have any erlang/26.1.1 directories.
    • I do however have erlang/26.1.
      • For some reason the semver patch version is being truncated in the local directory name?

If I run the following, everything works as expected:

❯ asdf global erlang 26.1
❯ asdf local erlang 26.1
❯ erl
Erlang/OTP 26 [erts-14.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Eshell V14.1 (press Ctrl+G to abort, type help(). for help)
1> 

After this, trying to install 26.1.1 complains that an install already exists at the path ~/.asdf/installs/erlang/26.1.1, but that is not true:

❯ asdf install erlang 26.1.1
Install version: 26.1.1
Install path: /Users/noah/.asdf/installs/erlang/26.1.1
asdf_26.1.1 is not a kerl-managed Erlang/OTP installation
The asdf_26.1.1 build has been deleted
Extracting source code
Building Erlang/OTP 26.1.1 (asdf_26.1.1), please wait...
Building docs...
Erlang/OTP 26.1.1 (asdf_26.1.1) has been successfully built
ERROR: Installation (asdf_26.1.1) already registered for this location (/Users/noah/.asdf/installs/erlang/26.1.1)

❯ ls -al ~/.asdf/installs/erlang
25.1.1
26.1

I'm not sure if this is specific to the 26.1.x family of Erlang/OTP versions or not.

from asdf-erlang.

Nezteb avatar Nezteb commented on September 28, 2024

I'm thinking this might be a kerl issue.

For now I'll close this issue, open an issue there, and possible re-open this one later.

EDIT: Just kidding, trying to replicate this with vanilla kerl poses no problems. This is an asdf-erlang issue I believe. Still investigating.

from asdf-erlang.

sevenseacat avatar sevenseacat commented on September 28, 2024

The steps outlined in that resolved the issue for me also 👍

from asdf-erlang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.