<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">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 class=""><br class=""></div><div class="">Richard<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 23, 2020, at 1:37 PM, Neophytos Michael <<a href="mailto:nmichael@gmail.com" class="">nmichael@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><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" class="">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 class=""></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 class=""></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif;font-size:small"><br class=""></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 class=""></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 class=""></div><div class="gmail_default" style="font-size:small"><span style="font-family:"comic sans ms",sans-serif" class=""></span><font face="monospace" class="">===========================</font></div><div class="gmail_default" style=""></div><div class="gmail_default" style=""><font face="monospace" class="">Exit code: 1<br class="">Stderr and Stdout:<br class="">_build/stage1/compiler/build/GHC/Parser/Lexer.hs:3495:3: error:<br class=""> Variable not in scope: int16ToInt# :: Int# -> Int#<br class=""> |<br class="">3495 | int16ToInt#<br class=""> | ^^^^^^^^^^^<br class=""><br class="">_build/stage1/compiler/build/GHC/Parser/Lexer.hs:3520:3: error:<br class=""> Variable not in scope: int32ToInt# :: Int# -> Int#<br class=""> |<br class="">3520 | int32ToInt#<br class=""> | ^^^^^^^^^^^<br class=""></font></div><div class="gmail_default" style=""><font face="monospace" class="">===========================</font></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif"></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"></div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small">On that line (in Lexer.hs) we see:</div><div class="gmail_default" style="font-family:"comic sans ms",sans-serif;font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small"><font face="monospace" class="">#if __GLASGOW_HASKELL__ >= 901<br class=""> int16ToInt#<br class="">#endif<br class=""> (indexInt16OffAddr# arr off)<br class="">#endif<br class=""></font></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif;font-size:small"><br class=""></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 class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><font face="comic sans ms, sans-serif" class="">Neo<br class=""></font><div class=""><br class=""></div></div></div></div>
_______________________________________________<br class="">ghc-devs mailing list<br class=""><a href="mailto:ghc-devs@haskell.org" class="">ghc-devs@haskell.org</a><br class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs<br class=""></div></blockquote></div><br class=""></div></body></html>