[erlang-questions] MacOs Sierra + OTP 19.2 + openssl 1.0.2j from source

Jay Nelson jay@REDACTED
Sun Jan 1 23:29:00 CET 2017

Well I seem to have finally gotten the upgrade working with a new fresh compile of Erlang/OTP without using Brew. On El Capitan I could use the Swift migration tool headers for openssl, but in Sierra they are completely gone. The following steps were used to install a new version of openssl development headers and erlang:

1) Upgrade to latest Xcode and accept license
2) Add command line tools to Xcode
3) Upgrade to Sierra

4) Download and install openssl 1.0.2j
    a) ./configure darwin64-x86_64-cc shared      (this seemed to be the key step)
    b) make depend
    c) make
    d) sudo make install
    e) sudo ln -s /usr/local/ssl/bin/openssl /usr/local/bin/openssl
    f) make sure /usr/local/bin comes before /usr/bin in $PATH
    g) openssl version => 1.0.2j  instead of 0.9.8zh

5) Download and install Erlang 19.2
    a) ./configure —with-ssl=/usr/local/ssl
    b) make -j6
    c) sudo make install
    d) erl
    e) 1> l(crypto).
    f) 2> crypto:strong_rand_bytes(22).

OpenSSL 1.1.0 has a very different structure that 1.0.x and probably can’t work with Erlang/OTP until changes are made specifically for it because the code is being split to different directories. The above steps make openSSL 1.0.2j found before the Apple version, not sure what problems that will cause with other software. Also, I don’t know if it is wise to use shared libraries for crypto instead of static. If it didn’t work for your environment, loading the crypto module will cause an error.

Any comments about why this is wrong, or where I will run into trouble are highly encouraged! Others may wish to try this approach if I don’t complain about it after a week or so (although I’m not doing much crypto stuff, l(crypto) and strong_rand_bytes seems to work).


More information about the erlang-questions mailing list