opam icon indicating copy to clipboard operation
opam copied to clipboard

Opam 2.2.1 release - install broken on (latest) OpenBSD 7.6

Open jideelgh opened this issue 1 year ago • 2 comments

Just to let you know, trying to install Opam 2.2.1 release on OpenBSD 7.6 (using bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh)" which fetches opam-2.2.1-x86_64-openbsd) leads to:

ld.so: opam: can't load library 'libc++.so.9.0' Killed

OpenBSD moved to libc++.so.10.0 in 7.5:

tar -tzf base73.tgz |grep libc++ ./usr/lib/libc++.so.9.0 ./usr/lib/libc++abi.so.6.0

tar -tzf base74.tgz |grep libc++ ./usr/lib/libc++.so.9.0 ./usr/lib/libc++abi.so.6.0

tar -tzf base75.tgz |grep libc++ ./usr/lib/libc++.so.10.0 ./usr/lib/libc++abi.so.7.0

So I guess I was just 'lucky' to keep libc++.so.9.0 during the previous upgrades but on an upgraded 7.5->7.6 system which still has 'libc++.so.9.0' available, it's not anymore sufficient:

opam[31192]: pinsyscalls addr ca14a7fb859 code 253, pinoff 0xffffffff (pin 330 ca1c28c5000-ca1c28d366d e66d) (libcpin 0 0-0 0) error 78 Abort trap

I managed to workaround this by :

  • pkg_add opam which installs opam 2.2.0 (and is built against libc++.so.10.0)
  • build opam 2.2.1 from source.
  • remove 2.2.0 afterwards.

Not so much a big deal but at least you're aware of this 'issue'.

jideelgh avatar Oct 09 '24 20:10 jideelgh

I think this should be moved to ocaml/opam. Ping @kit-ty-kate or @rjbou

mseri avatar Oct 10 '24 08:10 mseri

https://github.com/ocaml/opam/pull/6237 fixed this (only >= 2.3.0~beta1), however the release binary now is only available for OpenBSD 7.6. I'll open a new ticket to remind myself to experiment with statically linked binaries on OpenBSD to see if it could be a solution for 7.5 as OpenBSD supports its last two releases (7.5 and 7.6).

kit-ty-kate avatar Oct 15 '24 12:10 kit-ty-kate

This was fixed in 2.3.0 released yesterday. Out of the box the binary supports 7.6. Users of 7.5 can also still use it by doing:

cd /usr/lib
ln -s libc.so.99.0 libc.so.100.3

I'll leave https://github.com/ocaml/opam/issues/6241 open but i'm probably not gonna work on it in the short term as the workaround above exists.

Thanks for the report!

kit-ty-kate avatar Nov 14 '24 22:11 kit-ty-kate

Great! Tested 2.3.0 on 7.6, worked flawlessly. Thanks to you :)

jideelgh avatar Nov 17 '24 09:11 jideelgh