You are not logged in.
Pages: 1
Topic closed
15/05/17: Solved on post number 3 by tuvistuvie
I am unable to install erlang 19.3 while using asdf: https://github.com/asdf-vm/asdf
After issuing:
asdf install erlang 19.0
During compilation, I get this error:
crypto.c:131:28: fatal error: openssl/chacha.h: No such file or directory
#include <openssl/chacha.h>
^
compilation terminated.
make[4]: *** [x86_64-unknown-linux-gnu/Makefile:136: ../priv/obj/x86_64-unknown-linux-gnu/crypto.o] Error 1
make[4]: Leaving directory '/tmp/erlang_build_MwcZWB/otp_src_19.0/lib/crypto/c_src'
make[3]: *** [/tmp/erlang_build_MwcZWB/otp_src_19.0/make/run_make.mk:35: opt] Error 2
make[3]: Leaving directory '/tmp/erlang_build_MwcZWB/otp_src_19.0/lib/crypto/c_src'
make[2]: *** [/tmp/erlang_build_MwcZWB/otp_src_19.0/make/otp_subdir.mk:29: opt] Error 2
make[2]: Leaving directory '/tmp/erlang_build_MwcZWB/otp_src_19.0/lib/crypto'
make[1]: *** [/tmp/erlang_build_MwcZWB/otp_src_19.0/make/otp_subdir.mk:29: opt] Error 2
make[1]: Leaving directory '/tmp/erlang_build_MwcZWB/otp_src_19.0/lib'
make: *** [Makefile:452: libs] Error 2
I believe I have all dependencies installed (especially openssl).
I have also searched for
chacha.h
and I can find it only in the following packages:
sudo pkgfile chacha.h
[sudo] password for returntrip:
core/nettle
extra/crypto++
community/botan
community/gitlab
community/libqtshadowsocks
Hope someone can help. Thanks.
Last edited by returntrip (2017-05-15 13:50:33)
Offline
I'm having the same problem
Offline
I just replied here: https://github.com/asdf-vm/asdf/issues/ … -301354356
I will just copy/paste the answer, just in case.
asdf plugin-update erlang
wget -O /tmp/link-openssl.sh https://gist.githubusercontent.com/tuvistavie/22554261f3e613703d76d882977290f1/raw/0f244ae93e980160492bd9fc9bc84797f16ac10a/archlinux-link-openssl1-0.sh
sudo bash /tmp/link-openssl.sh /usr/local/openssl-1.0
ERLANG_OPENSSL_PATH="/usr/local/openssl-1.0" asdf install erlang 19.3
After trying a few things, here are the results:
The issue is definitely that Erlang/OTP does not build with OpenSSL 1.1
ArchLinux openssl 1.0 package directory structure does not play well with erlang --with-ssl flag. The directory structure should be something like DIR/lib/libssl.so for it to work with --with-ssl=DIR, but it is installed at /usr/lib/openssl-1.0/libssl.so
Let's assume that we want to have OpenSSL 1.0 in $HOME/.openssl-1.0 (if we want to make this /usr/local/openssl-1.0, or something not inside user home, some steps will require sudo)
First, we need to have OpenSSL 1.0 installed with a a directory structure that Erlang build scripts will understand.
We have two choices:
Compile OpenSSL 1.0 from sources. This can be done with the following steps:
git clone https://github.com/openssl/openssl.git --branch OpenSSL_1_0_2-stable
./config --prefix=$HOME/.openssl-1.0 shared -fPIC
make depend && make && make install
Link the lib and include provided in Arch openssl-1.0 package. This can be done with the following steps:
mkdir -p $HOME/.openssl-1.0
cd $HOME/.openssl.1-0
ln -sf /usr/lib/openssl-1.0 lib
ln -sf /usr/include/openssl-1.0 include
I created a gist with the steps here: https://gist.github.com/tuvistavie/2255 … 82977290f1
I would rather go with the second solution, as it avoids having to maintain an OpenSSL install for no good reason.
Then we need to path --with-ssl to ./configure in Erlang so that it uses OpenSSL 1.0 and not 1.1.
I updated asdf-erlang to support the ERLANG_OPENSSL_PATH environment variable to make this easier, as the --with-ssl option was currently overriden.
Erlang can therefore be installed using:
ERLANG_OPENSSL_PATH="$HOME/.openssl-1.0" asdf install erlang 19.3
Let me know how this works for you.
NOTE: do not forget to run
asdf plugin-update erlang
before installing anything.
Offline
@tuvistavie: This worked fine. Thanks for the help!
Offline
Works well. Thank you very much
Offline
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed