haskell/ghcup-hs

Something seems wrong with ghcup installing bindist for i386 on debian 12

mpickering opened this issue · 4 comments

Something goes wrong during installation which means not all the files are copied into the installation directories.

I tried in a container unpacking and manually ./configure && make install the bindist and that worked, so it appears the bindist is correct.

With the manually installed bindist I can run the tests without problems.

Something goes wrong during installation which means not all the files are copied into the installation directories.

I don't think that's the case:

root@c3d8e90f42ba:~# file ~/.ghcup/bin/ghc
/root/.ghcup/bin/ghc: broken symbolic link to ../ghc/9.4.8/bin/ghc-9.4.8
root@c3d8e90f42ba:~# file ~/.ghcup/bin/../ghc/9.4.8/bin/ghc-9.4.8
/root/.ghcup/bin/../ghc/9.4.8/bin/ghc-9.4.8: cannot open `/root/.ghcup/bin/../ghc/9.4.8/bin/ghc-9.4.8' (Value too large for defined data type)Bourne-Again shell script, ASCII text executable
root@c3d8e90f42ba:~# ~/.ghcup/bin/../ghc/9.4.8/bin/ghc-9.4.8 --version
root@c3d8e90f42ba:~# cat ~/.ghcup/bin/../ghc/9.4.8/bin/ghc-9.4.8
#!/bin/bash
exedir="/root/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/bin"
exeprog="./ghc-9.4.8"
executablename="/root/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/bin/./ghc-9.4.8"
bindir="/root/.ghcup/ghc/9.4.8/bin"
libdir="/root/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/lib"
docdir="/root/.ghcup/ghc/9.4.8/share/doc/ghc-9.4.8"
includedir="/root/.ghcup/ghc/9.4.8/include"

exec "$executablename" -B"$libdir" ${1+"$@"}
root@c3d8e90f42ba:~# /root/.ghcup/ghc/9.4.8/lib/ghc-9.4.8/bin/./ghc-9.4.8 --version
The Glorious Glasgow Haskell Compilation System, version 9.4.8

See that the symbolic link is considered broken, but the file is actually there. And then we get some Value too large for defined data type errors.

I see, is there something about the way ghcup is constructing these symlinks which causes the issue? The manual bindist install seems to work correctly.

The manual install worked locally for me but it seems something else is quite fundamentally broken on deb12 on i386. Here is a job I added to ghcup-ci testing which installs the bindist directly (and fails in a different place), which I can't reproduce locally in a docker container.

https://gitlab.haskell.org/ghc/ghcup-ci/-/jobs/1935815