Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghcup-0.1.22.0 with libtinfow.so.9 currently broken on FreeBSD #1078

Closed
mr0mr0 opened this issue Jun 8, 2024 · 3 comments
Closed

ghcup-0.1.22.0 with libtinfow.so.9 currently broken on FreeBSD #1078

mr0mr0 opened this issue Jun 8, 2024 · 3 comments

Comments

@mr0mr0
Copy link

mr0mr0 commented Jun 8, 2024

ghcup-0.1.22.0 (as fetched by curl) fails to run on FreeBSD owing to a linker error for versioned shared object "libtinfow.so.9".
FreeBSD install of ncurses currently delivers libtinfo.so.6
Previous version ghcup-0.1.20.0 does not exhibit this problem, and runs okay on FreeBSD
Attempts to hack the shell script delivered by curl, eg by setting script environment variable "ghver=0.1.20.0", fail owing to immediate auto-upgrade to the the non-working version

Workaround:
[1] run the script from curl as far as possible to get some .ghcup infrastructure in place (it ends with the linker error as below)
[2] over-write ghcup with the earlier version
ghver="0.1.22.0"; curl -Lf "https://downloads.haskell.org/~ghcup/$ghver/x86_64-portbld-freebsd-ghcup-$ghver" >~/.ghcup/bin/ghcup
chmod a+x ~/.ghcup/bin/ghcup
[3] ghcup tui # now works for me

Example failures with 0.1.22.0

[user@home ~]$ ghcup
ld-elf.so.1: Shared object "libtinfow.so.9" not found, required by "ghcup"

[user@home ~]$ ldd .ghcup/bin/ghcup
.ghcup/bin/ghcup:
libm.so.5 => /lib/libm.so.5 (0x128848499000)
libtinfow.so.9 => not found (0) ### <<<<<
libutil.so.9 => /lib/libutil.so.9 (0x128847962000)
libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x1288490d3000)
libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x12884999d000)
librt.so.1 => /usr/lib/librt.so.1 (0x128849b92000)
libdl.so.1 => /usr/lib/libdl.so.1 (0x128849edf000)
libthr.so.3 => /lib/libthr.so.3 (0x12884a422000)
libc.so.7 => /lib/libc.so.7 (0x12884a8ff000)
[vdso] (0x7ffffffff650)

Sample curl command from https://www.haskell.org/ghcup/ which fetches installation shell script
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org

@hasufell
Copy link
Member

hasufell commented Jun 9, 2024

libtinfow.so.9 is provided by the FreeBSD base system and it is SONAME 9 for FreeBSD 14: https://github.com/freebsd/freebsd-src/blob/stable/14/lib/ncurses/tinfo/Makefile#L10

We do not actively support older FreeBSD versions. Which version are you running?

@mr0mr0
Copy link
Author

mr0mr0 commented Jun 9, 2024

D'oh! back to school for me! I am lurking behind the curve on FreeBSD 13.2
I like your idea: "OS is older than currently GHCup supported version - consider this in case of problems"
My apologies, and thanks for checking.

@hasufell
Copy link
Member

hasufell commented Jun 9, 2024

I would like to support even older FreeBSDs and I have private CI that can do that with pots/jails.

But it's work and I do all this in my free time anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants