2

I'm trying to install Erlang (and later Elixir) with asdf however I'm getting an error regarding jinterface as the install process seems to freeze:

➜  ~ asdf install erlang 22.1.1
Downloading OTP-22.1.1.tar.gz to /Users/me/.asdf/plugins/erlang/kerl-home/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   122    0   122    0     0    320      0 --:--:-- --:--:-- --:--:--   321
100 52.4M    0 52.4M    0     0  7604k      0 --:--:--  0:00:07 --:--:-- 9203k
Extracting source code
Building Erlang/OTP 22.1.1 (asdf_22.1.1), please wait...
APPLICATIONS DISABLED (See: /Users/me/.asdf/plugins/erlang/kerl-home/builds/asdf_22.1.1/otp_build_22.1.1.log)
 * jinterface     : Java compiler disabled by user

DOCUMENTATION INFORMATION (See: /Users/me/.asdf/plugins/erlang/kerl-home/builds/asdf_22.1.1/otp_build_22.1.1.log)
 * documentation  :
 *                  fop is missing.
 *                  Using fakefop to generate placeholder PDF files.

I had a look at https://github.com/asdf-vm/asdf-erlang and it says

For example, to skip the java dependency during installation use:
$ export KERL_CONFIGURE_OPTIONS="--disable-debug --without-javac"
$ asdf install erlang <version>

If I had to guess, this is a java issue so when I try this solution it doesn't work and I get the same output.

Any idea on how to install Erlang this without installing Java? I don't recall this being an issue with Homebrew, meaning Homebrew requiring Java compiler present.

Flux
  • 9,805
  • 5
  • 46
  • 92
Loading...
  • 863
  • 9
  • 21

3 Answers3

7

I suspect it's not actually freezing - it's compiling Erlang, but hiding all the output. Give it ten to twenty minutes or so, and it should complete.

You can verify this with top. Compiling Erlang is CPU intensive, so you should be able to easily spot C and Erlang compilers with close to 100% CPU usage.

legoscia
  • 39,593
  • 22
  • 116
  • 167
3

you can track progress with

tail -f /Users/me/.asdf/plugins/erlang/kerl-home/builds/asdf_22.1.1/otp_build_22.1.1.log

ash
  • 711
  • 4
  • 8
1

Instead of trying it without jinterface you can install all dependencies.This fix I found here it works

sudo apt-get install automake autoconf libreadline-dev libncurses-dev \
libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev \
libwxgtk3.0-dev libgl1-mesa-dev  libglu1-mesa-dev libssh-dev xsltproc fop \
libxml2-utils

In case you are installing on small server like 1GB memory, if compiling fails increasing swap memory helps, took a while for me to fix.

Yugandhar Chaudhari
  • 3,831
  • 3
  • 24
  • 40
  • The [asdf-erlang documentation](https://github.com/asdf-vm/asdf-erlang/blob/master/README.md#ubuntu-and-debian) has an up-to date list of recommended dependencies. – Gerbal Dec 02 '22 at 09:52