ghcup failed

Simon Peyton Jones simonpj at microsoft.com
Wed Jun 2 19:52:59 UTC 2021


Update: Tom Ellis helped me to discover that I probably had not completed my WSL1 -> WSL2 changeover on my laptop, so the error I got below came from WSL1.
Once we’d unravelled that, the error went away.  So it seems that WSL1 is to blame, not ghcup, happily.
I wonder if someone might add to this page https://www.haskell.org/ghcup/

  *   a prominent notice saying “Does not work with WLS1”,
  *   explaining how to find out how to know what version you are running (wsl -l -v in Powershell)
  *   pointing to the instructions for upgrading to WSL2 https://docs.microsoft.com/en-us/windows/wsl/install-win10
Thanks
Simon

From: ghc-devs <ghc-devs-bounces at haskell.org> On Behalf Of Simon Peyton Jones via ghc-devs
Sent: 02 June 2021 20:07
To: GHC <ghc-devs at haskell.org>
Cc: Julian Ospald <hasufell at posteo.de>
Subject: ghcup failed

Dear devs
I wanted to install GHC 8.10 on my WSL2 (Windows Subsystem for Linux) computer.  So I went here
https://www.haskell.org/ghcup/<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.haskell.org%2Fghcup%2F&data=04%7C01%7Csimonpj%40microsoft.com%7C941d2a501a8a451f026b08d925f9c287%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637582576926132378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Qbhmg5LysvmW2srYmLM2AONWdG5SvZJVOtRFFFlHfNw%3D&reserved=0>
and followed the instructions (the curl … command).  There was a long pause then

[ Info  ] verifying digest of: ghc-8.10.4-x86_64-deb9-linux.tar.xz

[ Info  ] Unpacking: ghc-8.10.4-x86_64-deb9-linux.tar.xz to /tmp/ghcup-khiegA

[ Info  ] Installing GHC (this may take a while)

[ Error ] BuildFailed failed in dir "/tmp/ghcup-khiegA": NonZeroExit 2 "make" ["install"]

    Check the logs at "/home/simonpj/.ghcup/logs" and the build directory "/tmp/ghcup-khiegA" for more clues.

    Make sure to clean up "/tmp/ghcup-khiegA" afterwards.

"_eghcup --cache install ghc recommended" failed!
I looked in the logs as suggested, and found this in the tail of ghc-make.log

Installing library in /home/simonpj/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/libiserv-8.10.4

"utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" copy compiler stage2 "strip" '' '/home/simonpj/.ghcup/ghc/8.10.4' '/home/simonpj/.ghcup/ghc/8.10.4/lib/ghc-8.10.4' '/home/simonpj/.ghcup/ghc/8.10.4/share/doc/ghc-8.10.4/html/libraries' 'v p dyn'

Installing library in /home/simonpj/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/ghc-8.10.4

"/home/simonpj/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/bin/ghc-pkg" --force --global-package-db "/home/simonpj/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/package.conf.d" update rts/dist/package.conf.install

ghc-pkg: Couldn't open database /home/simonpj/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/package.conf.d for modification: {handle: /home/simonpj/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/package.conf.d/package.cache.lock}: hLock: invalid argument (Invalid argument)

ghc.mk:967: recipe for target 'install_packages' failed

make[1]: *** [install_packages] Error 1

Makefile:51: recipe for target 'install' failed

make: *** [install] Error 2
So I seem to be stuck.  Any ideas?  I feel embarrassed not to be able to install GHC 😊.
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20210602/3f67896c/attachment.html>


More information about the ghc-devs mailing list