asdf-vm / asdf-erlang

Erlang plugin for asdf version manager

Home Page:https://github.com/asdf-vm/asdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ubuntu 22 erlang 23 build error

gabrielmancini opened this issue · comments

Hello everyone,

when i try:

asdf install erlang 23.3.4.17

i had

 LD	../priv/lib/x86_64-unknown-linux-gnu/otp_test_engine.so
cc1: some warnings being treated as errors
gmake[4]: *** [x86_64-unknown-linux-gnu/Makefile:185: ../priv/obj/x86_64-unknown-linux-gnu/pkey.o] Error 1
gmake[4]: Leaving directory '/home/xxx/.asdf/plugins/erlang/kerl-home/builds/asdf_23.3.4.17/otp_src_23.3.4.17/lib/crypto/c_src'
gmake[3]: *** [/home/xxx/.asdf/plugins/erlang/kerl-home/builds/asdf_23.3.4.17/otp_src_23.3.4.17/make/run_make.mk:35: opt] Error 2
gmake[3]: Leaving directory '/home/xxx/.asdf/plugins/erlang/kerl-home/builds/asdf_23.3.4.17/otp_src_23.3.4.17/lib/crypto/c_src'
gmake[2]: *** [/home/xxx/.asdf/plugins/erlang/kerl-home/builds/asdf_23.3.4.17/otp_src_23.3.4.17/make/otp_subdir.mk:29: opt] Error 2
gmake[2]: Leaving directory '/home/xxx/.asdf/plugins/erlang/kerl-home/builds/asdf_23.3.4.17/otp_src_23.3.4.17/lib/crypto'
gmake[1]: *** [/home/xxx/.asdf/plugins/erlang/kerl-home/builds/asdf_23.3.4.17/otp_src_23.3.4.17/make/otp_subdir.mk:29: opt] Error 2
gmake[1]: Leaving directory '/home/xxx/.asdf/plugins/erlang/kerl-home/builds/asdf_23.3.4.17/otp_src_23.3.4.17/lib'
gmake: *** [Makefile:505: libs] Error 2

when i search for error on the log the last one is:

 CC	../priv/obj/x86_64-unknown-linux-gnu/otp_test_engine.o
pkey.c: In function ‘get_pkey_digest_type’:
pkey.c:76:14: error: implicit declaration of function ‘FIPS_mode’ [-Werror=implicit-function-declaration]
   76 |         if (!FIPS_mode()) return PKEY_OK;
      |              ^~~~~~~~~

my openssl version installed is:

openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

For me to install 24.3.3 on Ubuntu 22.10 I had to install the following packages first:

sudo apt-get install clang-format clang-tidy clang-tools clang clangd libc++-dev libc++1 libc++abi-dev libc++abi1 libclang-dev libclang1 liblldb-dev libllvm-ocaml-dev libomp-dev libomp5 lld lldb llvm-dev llvm-runtime llvm python3-clang automake autoconf libncurses5-dev 

and then

asdf install erlang 24.3.3

Hopefully that helps someone.

IT didnt work for me
image

@gabrielmancini

cd /usr/local/src/
sudo git clone https://github.com/openssl/openssl.git -b OpenSSL_1_1_1-stable openssl-1.1.1m
cd openssl-1.1.1m
sudo ./config - prefix=/usr/local/ssl - openssldir=/usr/local/ssl shared zlib
sudo make
sudo make test
sudo make install_sw
export KERL_CONFIGURE_OPTIONS="-with-ssl=/usr/local/ssl"
asdf install erlang 23.3.4.17`

I think this will solve this issue.

A little bit another runbook to install openssl into local directory, not system-wide, just for erlang:

cd /usr/local/src/
sudo wget https://github.com/openssl/openssl/archive/refs/heads/OpenSSL_1_1_1-stable.zip
sudo unzip OpenSSL_1_1_1-stable.zip
sudo rm OpenSSL_1_1_1-stable.zip
cd openssl-OpenSSL_1_1_1-stable
sudo ./config --prefix=/usr/local/lib/openssl-1.1.1 --openssldir=/usr/local/lib/openssl-1.1.1 shared
sudo make
sudo make test
sudo make install
export KERL_CONFIGURE_OPTIONS="--with-ssl=/usr/local/lib/openssl-1.1.1"
asdf install erlang 23.3.4.17

@filipp-kucheriavenko thanks a lot, that worked for me finally! The pain of trying to Benchmark old versions 😀

@filipp-kucheriavenko thanks! it help me when install erlang 22.3.4.26 on Ubuntu 22.04.3