<div dir="ltr"><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">Thank you for that.  After downgrading alex I was able to build ghc properly.</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">By the way, is there a way from cabal to uninstall a package?  I actually had both versions of alex on my machine but somehow ghc would always pick up the latest one.  I couldn't find a way to uninstall alex, so I just gave up and removed the entire cabal directory and reinstalled everything (which fortunately wasn't much) plus the old version of alex.</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">Neo</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 23, 2020 at 9:12 PM John Ericson <john.ericson@obsidian.systems> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Actually, your alex is <i>too</i> new. See
      <a href="https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4657" target="_blank">https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4657</a>. If you
      take the latest master, it will contain that, and your problem
      will be fixed.<br>
    </p>
    <div>On 12/23/20 2:10 PM, Richard Eisenberg
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      Without having particular knowledge about this specific error: try
      upgrading `alex`, the tool that GHC uses to produce its lexer.
      It's possible a newer version of that tool will fix this problem.
      <div><br>
      </div>
      <div>Richard<br>
        <div><br>
          <blockquote type="cite">
            <div>On Dec 23, 2020, at 1:37 PM, Neophytos Michael
              <<a href="mailto:nmichael@gmail.com" target="_blank">nmichael@gmail.com</a>> wrote:</div>
            <br>
            <div>
              <div dir="ltr">
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">I am having some
                  trouble building ghc on ubuntu.  I have ghc 8.8.4
                  installed on the machine.  I pulled from the main
                  repository and followed the instructions here: <a href="https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian" target="_blank">https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian</a></div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><br>
                </div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">Building with:</div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">./hadrian/build -j<br>
                </div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><br>
                </div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">it builds for a long
                  time until it finally fails with the message below.  I
                  would appreciate some advice on how to fix this.</div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><br>
                </div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">Thank you,</div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">Neo</div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><br>
                </div>
                <div class="gmail_default" style="font-size:small"><span></span><font face="monospace">===========================</font></div>
                <div class="gmail_default"><font face="monospace">Exit code: 1<br>
                    Stderr and Stdout:<br>
_build/stage1/compiler/build/GHC/Parser/Lexer.hs:3495:3: error:<br>
                        Variable not in scope: int16ToInt# :: Int# ->
                    Int#<br>
                         |<br>
                    3495 |   int16ToInt#<br>
                         |   ^^^^^^^^^^^<br>
                    <br>
_build/stage1/compiler/build/GHC/Parser/Lexer.hs:3520:3: error:<br>
                        Variable not in scope: int32ToInt# :: Int# ->
                    Int#<br>
                         |<br>
                    3520 |   int32ToInt#<br>
                         |   ^^^^^^^^^^^<br>
                  </font></div>
                <div class="gmail_default"><font face="monospace">===========================</font></div>
                <div class="gmail_default">On that line (in
                  Lexer.hs) we see:</div>
                <div class="gmail_default"><br>
                </div>
                <div class="gmail_default" style="font-size:small"><font face="monospace">#if __GLASGOW_HASKELL__
                    >= 901<br>
                      int16ToInt#<br>
                    #endif<br>
                        (indexInt16OffAddr# arr off)<br>
                    #endif<br>
                  </font></div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><br>
                </div>
                <div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">so we are in the "then"
                  clause and somehow "int16ToInt#" is nowhere to be
                  found.</div>
                <div><br>
                </div>
                -- <br>
                <div dir="ltr">
                  <div dir="ltr"><font face="comic
                      sans ms, sans-serif">Neo<br>
                    </font>
                    <div><br>
                    </div>
                  </div>
                </div>
              </div>
              _______________________________________________<br>
              ghc-devs mailing list<br>
              <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
              <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
ghc-devs mailing list
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a>
</pre>
    </blockquote>
  </div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><font face="comic sans ms, sans-serif">Neophytos<br></font><div><br></div></div></div>