cocoa-xu / otp-build

Precompiled OTP for NIF library CI builds.
https://cocoa.build/otp/
Apache License 2.0
1 stars 0 forks source link

OTP-27.0.1 otp-aarch64-linux-gnu.tar.gz on ubuntu-22.04 errors #2

Open wojtekmach opened 3 weeks ago

wojtekmach commented 3 weeks ago

I tried the following and received two different errors:

$ docker run --rm -it ubuntu:22.04
root@758c77cbefad:/# apt update && apt install -y curl
root@758c77cbefad:/# curl --fail -LO https://github.com/cocoa-xu/otp-build/releases/download/v27.0.1/otp-aarch64-linux-gnu.tar.gz
root@758c77cbefad:/# mkdir otp-27.0.1 && tar -xzf otp-aarch64-linux-gnu.tar.gz -C otp-27.0.1

root@758c77cbefad:/# otp-27.0.1/usr/local/bin/erl
otp-27.0.1/usr/local/bin/erl: 57: exec: /usr/local/lib/erlang/erts-15.0.1/bin/erlexec: not found

root@758c77cbefad:/# otp-27.0.1/usr/local/lib/erlang/bin/erl
/otp-27.0.1/usr/local/lib/erlang/erts-15.0.1/bin/beam.smp: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

I was able to solve the first error by doing: cd otp-27.0.1/usr/local/lib/erlang && ./Install -sasl $PWD, fwiw. I guess this is expected but I thought I'd mention this.

In my builds I was doing ./Install before archiving since the installation is relocatable as of OTP 25.

cocoa-xu commented 2 weeks ago

Thanks @wojtekmach! btw I'm not sure if it would be a good idea to do a little hack to the launch scripts (in this repo of course) to bring the relocatable feature to OTP 24, or just do an AS-IS build and make a note in README.md? (I mean of course it's not necessary to use the code in this repo for your proposal, but just as a general question regarding whether the precompiled OTP 24 should have this feature)

wojtekmach commented 1 week ago

@cocoa-xu agreed, I think it's safe to run ./Install on OTP 25+ but otherwise keep things as is and document accordingly. FYI I'll be submitting an OTP patch to have a .zip Windows build in releases which is archived relocatable install. :) (See https://github.com/erlang/otp/pull/8729#issuecomment-2298754932)