Closed hasufell closed 1 year ago
In GitLab by @maerwald on Sep 10, 2022, 17:56
Required system dependencies are printed during installation.
The script even requires you to press enter before proceeding. You have to actively ignore the message 😅
In GitLab by @ulysses4ever on Sep 10, 2022, 22:58
Good to know, thank you! My use-case for having those in the docs is that I can quickly copy and paste it to some novice who has trouble with the installation process. Unfortunately, novices usually not paying attention to the output. (It may also depend on the style and amount of output, and also whether they're prompted by the script to pay attention to the critical parts, but I don't wanna start that discussion here.)
Also, having a critical piece of requirements both in the output and in the docs is normal.
Of course, if you don't feel like supporting this use case, feel free to close.
In GitLab by @maerwald on Sep 13, 2022, 22:46
ghcup-metadata has a helper tool for releases and stuff that already generates html table for some docs pages, see here https://github.com/haskell/ghcup-metadata/blob/master/ghcup-gen/Generate.hs#L128
The same pattern could be used to generate html for requirements per distro. PRs welcome.
In GitLab by @brandonchinn178 on Nov 9, 2022, 13:39
Update: apologies, my actual problem was getting libnuma failures when installing ghcup itself (https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/125#note_462017), so I didn't even get to the point of trying to install GHC
That being said, the output is a bit hidden in the logs
[ Info ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml as file /root/.ghcup/cache/ghcup-0.0.7.yaml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 191k 100 191k 0 0 754k 0 --:--:-- --:--:-- --:--:-- 755k
[ Info ] Upgrading GHCup...
[ Warn ] No GHCup update available
System requirements
Please ensure the following distro packages are installed before continuing (you can exit ghcup and return at any time): build-essential curl libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
[ Info ] downloading: https://downloads.haskell.org/~ghc/9.2.5/ghc-9.2.5-aarch64-deb10-linux.tar.xz as file /root/.ghcup/cache/ghc-9.2.5-aarch64-deb10-linux.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 263M 100 263M 0 0 25.5M 0 0:00:10 0:00:10 --:--:-- 28.9M
[ Info ] verifying digest of: ghc-9.2.5-aarch64-deb10-linux.tar.xz
[ Info ] Unpacking: ghc-9.2.5-aarch64-deb10-linux.tar.xz to /root/.ghcup/tmp/ghcup-08cbf401caafe505
[ Info ] Installing GHC (this may take a while)
[ ghc-configure ] checking for python3... no
[ ghc-configure ] checking for gcc... no
[ ghc-configure ] checking for clang... no
[ ghc-configure ] configure: error: in `/root/.ghcup/tmp/ghcup-08cbf401caafe505/ghc-9.2.5':
[ ghc-configure ] configure: error: no acceptable C compiler found in $PATH
[ ghc-configure ] See `config.log' for more details
[ Error ] Process "sh" with arguments ["./configure",
[ ... ] "--prefix=/root/.ghcup/ghc/9.2.5"] failed with exit code 1.
[ Error ] Also check the logs in /root/.ghcup/logs
"_eghcup --cache install ghc recommended" failed!
Maybe it could be a bit more emphasized like
[ Info ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml as file /root/.ghcup/cache/ghcup-0.0.7.yaml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 191k 100 191k 0 0 754k 0 --:--:-- --:--:-- --:--:-- 755k
[ Info ] Upgrading GHCup...
[ Warn ] No GHCup update available
================================================================================
System requirements
Please ensure the following distro packages are installed before continuing (you can exit ghcup and return at any time): build-essential curl libffi-dev libffi8ubuntu1 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
================================================================================
...
In GitLab by @maerwald on Nov 9, 2022, 14:05
Yes it's true you don't get a list of system dependencies if ghcup itself fails to start. That's a GHC bug. They can't seem to fix the libnuma thing properly. You're also not running x86_64, which is statically linked and will never fail to start.
In GitLab by @maerwald on Nov 10, 2022, 23:47
As explained in https://gitlab.haskell.org/haskell/ghcup-hs/-/issues/411#note_452686 ...PR welcome.
In GitLab by @maerwald on Nov 12, 2022, 11:18
mentioned in commit 9fdc6eebe8097b326b3d00da5f3ae1ac333a4818
In GitLab by @maerwald on Nov 12, 2022, 11:18
In GitLab by @maerwald on Nov 12, 2022, 11:21
In GitLab by @ulysses4ever on Nov 12, 2022, 12:41
Amazing, thank you! ♥️ 💙 💜
I just noticed that Stack does a very good job at running a system package manager to install dependencies during setup. Maybe you'd want to look at it and possibly copy it. The user is "only" required to sudo
.
I just noticed that Stack does a very good job at running a system package manager to install dependencies during setup. Maybe you'd want to look at it and possibly copy it. The user is "only" required to sudo.
Absolutely not.
This goes against the core design principles of GHCup, against unix philosophy and against safety standards (programs invoking sudo can do horrible things).
Also see: https://www.haskell.org/ghcup/about/#non-goals
Package managers are an extremely delicate matter. Invoking them via scripts is bad form and makes them untrustworthy.
In GitLab by @ulysses4ever on Sep 9, 2022, 22:05
Just this week, I once again had to help a newcomer with setting up the Haskell toolchain on a fresh Ubuntu machine. The issue there is, as it's often the case with newcomers, the system is completely fresh and misses certain system dependencies. I don't see the list of dependencies for such a prolific use case in the User Guide. Would it be possible to add it somewhere? E.g. the Troubleshooting section. I should say the error I saw was quite bizarre (something like "preprocessor sanity check failed" on the configure step for GHC).
As far as I'm aware, this should be enough for Ubuntu (again, a vastly dominant variant of Linux, if include all the flavors and remixes):