Troubles when building ghc
Richard Eisenberg
rae at richarde.dev
Wed Dec 23 19:10:18 UTC 2020
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.
Richard
> On Dec 23, 2020, at 1:37 PM, Neophytos Michael <nmichael at gmail.com> wrote:
>
> 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: https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian <https://gitlab.haskell.org/ghc/ghc/-/wikis/building/hadrian>
>
> Building with:
> ./hadrian/build -j
>
> it builds for a long time until it finally fails with the message below. I would appreciate some advice on how to fix this.
>
> Thank you,
> Neo
>
> ===========================
> Exit code: 1
> Stderr and Stdout:
> _build/stage1/compiler/build/GHC/Parser/Lexer.hs:3495:3: error:
> Variable not in scope: int16ToInt# :: Int# -> Int#
> |
> 3495 | int16ToInt#
> | ^^^^^^^^^^^
>
> _build/stage1/compiler/build/GHC/Parser/Lexer.hs:3520:3: error:
> Variable not in scope: int32ToInt# :: Int# -> Int#
> |
> 3520 | int32ToInt#
> | ^^^^^^^^^^^
> ===========================
> On that line (in Lexer.hs) we see:
>
> #if __GLASGOW_HASKELL__ >= 901
> int16ToInt#
> #endif
> (indexInt16OffAddr# arr off)
> #endif
>
> so we are in the "then" clause and somehow "int16ToInt#" is nowhere to be found.
>
> --
> Neo
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20201223/2ef098dc/attachment.html>
More information about the ghc-devs
mailing list