Elixir with macOS 10.13 High Sierra

With very early beta versions of macOS 10.13 there were issues with installing elixir, specifically around openSSL/boringSSL.

With the GM of 10.13 now released to developers and the public release reportedly coming on September 25, 2017 has there been progress on OS compatibility?

Link to issues found so far?

The link idiot posted is the big one that was reported earlier. Without ssl building new versions of elixir w/ kiex for instance likely won’t work.

With the official release, I’ve taken a spare computer and done a clean install of High Sierra. These are the warnings you get when you try and install Erlang 20.1 via kerl:

Building Erlang/OTP 20.1 (20.1), please wait…
APPLICATIONS DISABLED (See: ~/.kerl/builds/20.1/otp_build_20.1.log)

  • crypto : No usable OpenSSL found
  • jinterface : No Java compiler found
  • odbc : ODBC library - header check failed
  • ssh : No usable OpenSSL found
  • ssl : No usable OpenSSL found

APPLICATIONS INFORMATION (See: ~/.kerl/builds/20.1/otp_build_20.1.log)

  • wx : wxWidgets not found, wx will NOT be usable

DOCUMENTATION INFORMATION (See: ~/.kerl/builds/20.1/otp_build_20.1.log)

  • documentation :
  •              fop is missing.
    
  •              Using fakefop to generate placeholder PDF files.

Still trying to figure out the OpenSSL component, but to get rid of the other areas I did the following:

Following that, the output is now just:

Verifying archive checksum…
Checksum verified (4c9eb112cd0e56f17c474218825060ee)
Extracting source code
Building Erlang/OTP 20.1 (20.1), please wait…
APPLICATIONS DISABLED (See: ~/.kerl/builds/20.1/otp_build_20.1.log)

  • crypto : No usable OpenSSL found
  • ssh : No usable OpenSSL found
  • ssl : No usable OpenSSL found
1 Like

Had no issues with asdf, just did asdf install erlang 20.1 and everything just worked. Do note the asdf page lists some basic prereqs you’ll want to install via brew.

2 Likes

Solved the last portion for OpenSSL:

  • brew install openssl
  • echo ‘export PATH="/usr/local/opt/openssl/bin:$PATH"’ >> ~/.bash_profile
    edit ~/.kerlrc and add:
    KERL_CONFIGURE_OPTIONS="–with-ssl=/usr/local/opt/openssl"

Following that:
Verifying archive checksum…
Checksum verified (4c9eb112cd0e56f17c474218825060ee)
Extracting source code
Building Erlang/OTP 20.1 (20.1), please wait…
Erlang/OTP 20.1 (20.1) has been successfully built

1 Like

Thanks benwilson512, I haven’t tried asdf before, I’ll have to check it out to see how it differs from kerl.

I wish asdf list-all erlang mentioned that 20.1 was available :frowning:

My late 2013 MBP choked trying to upgrade from Sierra to High Sierra. I ended up having to reformat the drive — doing a network restore, and upgrading again. Bleh.

Everything Elixir/Erlang related seems to be working well so far, but I did have to disable SIP before I could install Homebrew in /usr/local

In case anyone else gets “operation not permitted” when trying to chown /usr/local, you need to restart and hold Cmd+R to enter recovery mode. Then open terminal and:

csrutil disable
reboot

Then you can run chown and install Homebrew. Once you are done, you should reboot back into recovery mode and re-enable SIP.

2 Likes

To compare ease of install, I removed kerl and installed asdf, then added the asdf erlang & elixir plugins. Installation was very straight forward.

running: asdf install erlang 20.1 allowed me to installed the latest erlang version, despite it not appearing in the list of available versions. That’s good news for you dustinfarris!

4 Likes

On my computer, asdf was much easier to install Erlang with and took considerably less time to build & install.

did you have any issues running mix local.hex?

Confirming that I had to do this before compiling Erlang/Elixir :+1:

  • asdf manages not only erlang, but elixir, node, python, ruby, whatever as well, as long as there is a plugin available.
  • asdf uses shim binaries which decide which version to use based on your working directory, while kerl requires you to switch your versions manually and by altering environment variables.

That are the 2 most important differences which make me switch over to asdf on my ubuntu VM about 3 months ago.

1 Like

No, have you?

In an early version of asdf-elixir, it was installed to ~/.mix instead of the appropriate versions mix. This caused some random trouble all the time, but as far as I know this has been fixed a year ago.

The same was true for archive and local.rebar tasks as far as I know.

I have been happily using asdf install elixir-1.5.1-otp-20 to install the precompiled Elixir for OTP 20 but it doesn’t look like https://github.com/hexpm/bob is building for OTP 20.1 yet.

Looking at the source for asdf-vm/asdf-elixir it looks like you can set the environment variable ASDF_INSTALL_TYPE to ref then it should build an arbitrary Elixir ref/tag rather than downloading precompiled binaries. I tried that and for some reason it’s still trying to download elixir-precompiled-#{ref}.zip which fails. Do you guys know how to get asdf to build Elixir 1.5.1 against OTP 20.1 from source to work on High Sierra without relying on homebrew? Is that how you’re getting it to work?

bob only precompiles for the major OTP versions, and honestly I doubt there is any difference… but you can do:

asdf install erlang 20.1
asdf global erlang 20.1

and then elixir:
asdf install elixir ref:v1.5.1 (will compile locally)
asdf global elixir ref-v1.5.1

see: https://github.com/asdf-vm/asdf-elixir/issues/30#issuecomment-318496574

1 Like