<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI Emoji";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.Code, li.Code, div.Code
        {mso-style-name:Code;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:14.2pt;
        font-size:10.0pt;
        font-family:"Courier New";
        font-weight:bold;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1342201283;
        mso-list-type:hybrid;
        mso-list-template-ids:-1211320136 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Once we’d unravelled that, the error went away.  So it seems that WSL1 is to blame, not ghcup, happily.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">I wonder if someone might add to this page
</span><a href="https://www.haskell.org/ghcup/">https://www.haskell.org/ghcup/</a>
<o:p></o:p></p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">a prominent notice saying “Does not work with WLS1”,
<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">explaining how to find out how to know what version you are running (wsl -l -v in Powershell)<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">pointing to the instructions for upgrading to WSL2
<a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">https://docs.microsoft.com/en-us/windows/wsl/install-win10</a><o:p></o:p></li></ul>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin:0cm"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> ghc-devs <ghc-devs-bounces@haskell.org>
<b>On Behalf Of </b>Simon Peyton Jones via ghc-devs<br>
<b>Sent:</b> 02 June 2021 20:07<br>
<b>To:</b> GHC <ghc-devs@haskell.org><br>
<b>Cc:</b> Julian Ospald <hasufell@posteo.de><br>
<b>Subject:</b> ghcup failed<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Dear devs<o:p></o:p></p>
<p class="MsoNormal">I wanted to install GHC 8.10 on my WSL2 (Windows Subsystem for Linux) computer.  So I went here<o:p></o:p></p>
<p class="MsoNormal"><a href="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">https://www.haskell.org/ghcup/</a><o:p></o:p></p>
<p class="MsoNormal">and followed the instructions (the curl … command).  There was a long pause then<o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">[ Info  ] verifying digest of: ghc-8.10.4-x86_64-deb9-linux.tar.xz</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">[ Info  ] Unpacking: ghc-8.10.4-x86_64-deb9-linux.tar.xz to /tmp/ghcup-khiegA</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">[ Info  ] Installing GHC (this may take a while)</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">[ Error ] BuildFailed failed in dir "/tmp/ghcup-khiegA": NonZeroExit 2 "make" ["install"]</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">    Check the logs at "/home/simonpj/.ghcup/logs" and the build directory "/tmp/ghcup-khiegA" for more clues.</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">    Make sure to clean up "/tmp/ghcup-khiegA" afterwards.</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">"_eghcup --cache install ghc recommended" failed!</span><o:p></o:p></p>
<p class="MsoNormal">I looked in the logs as suggested, and found this in the tail of ghc-make.log<o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">Installing library in /home/simonpj/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/libiserv-8.10.4</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">"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'</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">Installing library in /home/simonpj/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/ghc-8.10.4</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">"/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</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">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)</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">ghc.mk:967: recipe for target 'install_packages' failed</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">make[1]: *** [install_packages] Error 1</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">Makefile:51: recipe for target 'install' failed</span><o:p></o:p></p>
<p class="Code"><span style="font-size:9.0pt">make: *** [install] Error 2</span><o:p></o:p></p>
<p class="MsoNormal">So I seem to be stuck.  Any ideas?  I feel embarrassed not to be able to install GHC
<span style="font-family:"Segoe UI Emoji",sans-serif">😊</span>.<o:p></o:p></p>
<p class="MsoNormal">Simon<o:p></o:p></p>
</div>
</div>
</body>
</html>