[Haskell-cafe] When did it become so hard toinstallHaskellonWindows?
lonetiger at gmail.com
lonetiger at gmail.com
Sat Apr 25 10:29:48 UTC 2020
Thanks for this! I’ll respond in turn.
> * The big one was students who installed ghc without msys. Installing msys
> afterwards does not make GHC aware of it. Is there an equivalent of
> dpkg-reconfigure for chocolatey?
Yes, the msys2 detection is part of cabal not ghc, (ghc just has a dependency on cabal)
choco install cabal -y --reinstall
Would have corrected it.
> * Some students who were repeating the course had old
> %appdata%/cabal/config files, which meant that programs failed to copy
The presence of an old cabal file itself is not an issue. The issue is the presence of an old
broken cabal config file. There were some circumstances (mainly to do with paths with whitespaces) where
the haskell-platform installer may create an invalid config file.
The cabal user-config command won't behave properly if the config file is syntactically damaged.
So my chocolatey packages refuse to modify it because it's not in a sane state.
This is why the Haskell platform site recommend running
cabal user-config init -f
which resets the config file to a clean state. I should however emit a warning when it can’t modify the
config file with instructions on how to fix it.
> * Some students somehow managed to wind up with cabal-install installed
> but not GHC.
cabal is a dependency of ghc, so it will always be installed after GHC, the only exception here is
if you manually install cabal first.
e.g. choco install cabal ghc.
haskell-dev prevents this by having dependencies to all three packages.
> * Some students somehow managed to wind up with cabal-install and ghc
> installed, but not on %path%.
If the install finished (because of a quirk in how Windows shells update paths) you need to
either run `refreshenv` to refresh your PATH or simply close and open a new shell.
(You really MUST use one of these two, just running cmd again from the outdated cmd won't work for instance).
chocolatey runs scripts in a separate shell then the one you're executing in, so it can't update your running
> * Some students hit the following error when starting GHCi:
> GHCi, version 8.8.3: https://www.haskell.org/ghc/ :? for help
> <command line>: user specified .o/.so/.DLL could not be loaded (addDLL: pthread or dependencies not loaded. (Win32 error 5))
> Whilst trying to load: (dynamic) pthread
This is an ABI issue, generally happens when you have a program installed on your computer that has put an incompatible version of pthreads on your PATH. This is why you shouldn't put MSYS2 on your path either as
when the versions of pthread changes in msys2 it may become incompatoble with the one in GHC. The GHC 8.8.x
series is using GCC 8, and so GHC expects an ABI compatible pthreads.
We have been trying to tighten up where GHC loads dependencies from, but this is a GHC issue not a chocolatey one.
> * There were also a number of minor issues around spaces in paths, or
> possibly non-Latin characters in paths, or non-Latin system
> locale. Many of these will happen regardless of installation method,
> so it's not fair to lay them at Chocolatey's feet.
Path with white spaces is indeed a general issue when using configure, The approach platform took was
using dos 8.3 short paths, I haven't taken the same approach primarily because dos short names have a
performance overhead, can be disabled and not available on all filesystems. So the solution should be
something with how configure is invoked.
I am looking into that. For non-latin locales we are at the mercy of the fact that GCC and binutils on
Windows can't handle them. While we've always had tickets for them we haven't been able to do much about it.
However since we have now started experimenting with binary patch gcc we might be able to.
> > You can still use Haskell-dev if you want older GHCs. Just install it and then
> > Downgrade the ghc.
> I was not aware that this was possible. Thanks for telling me.
It's also possible to install any number of GHCs concurrently. Just give chocolatey the -m flag
when installing ghc, which stands for multiple
From: Jack Kelly
Sent: Saturday, April 25, 2020 11:00
To: lonetiger at gmail.com
Cc: dreixel at gmail.com; haskell
Subject: Re: [Haskell-cafe] When did it become so hard toinstallHaskellonWindows?
Thanks for your response and suggestions. I'll respond pointwise:
> What made it remarkably tough for students to set up on their machines?
* The big one was students who installed ghc without msys. Installing msys
afterwards does not make GHC aware of it. Is there an equivalent of
dpkg-reconfigure for chocolatey?
* Some students who were repeating the course had old
%appdata%/cabal/config files, which meant that programs failed to copy
* Some students somehow managed to wind up with cabal-install installed
but not GHC.
* Some students somehow managed to wind up with cabal-install and ghc
installed, but not on %path%.
* Some students hit the following error when starting GHCi:
GHCi, version 8.8.3: https://www.haskell.org/ghc/ :? for help
<command line>: user specified .o/.so/.DLL could not be loaded (addDLL: pthread or dependencies not loaded. (Win32 error 5))
Whilst trying to load: (dynamic) pthread
* Some students seem to have computers that are straight-up haunted.
* There were also a number of minor issues around spaces in paths, or
possibly non-Latin characters in paths, or non-Latin system
locale. Many of these will happen regardless of installation method,
so it's not fair to lay them at Chocolatey's feet.
Unfortunately, I can't give you more detailed information than
this. This semester was tougher than usual because of the remote
troubles with COVID-19, and on top of that many of the students who had the
really cursed problems stopped responding before we could get to the
bottom of things. Perhaps they dropped the course?
> You can still use Haskell-dev if you want older GHCs. Just install it and then
> Downgrade the ghc.
I was not aware that this was possible. Thanks for telling me.
> I would be quite interested to figure out what the pain points were.
> Surely if they are new to Windows they would have come from a platform where
> they know what a package manager is.
Not necessarily. These are first-year CS students, some of whom have
never programmed before, although they're computer-literate. I have
personally seen students who ask questions like "what's a terminal?" in
the first lab session pass the course with very good marks.
> Would providing a binary to automate the steps work for you? I have been reluctant to
> do so because I don’t want to hide what the installer is doing.
I think this would be extremely helpful.
> And to be clear, if it because you don’t want to use a commandline and want an installer
> Chocolatey also provides a GUI overlay, It is after all. A bog standard package manager.
> Is the latest release. It has the familiar “Click and installer asks for UAC and magic happens in background”.
I was not aware that this existed. It may help, thanks for showing it to
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe