[Agda] Compilation of Parser.y depends on the locale on Debian too

Eduardo Ochs eduardoochs at gmail.com
Fri Jul 2 16:46:15 CEST 2021


Hi list,

the latest version of the Agda Manual from

  https://readthedocs.org/projects/agda/downloads/pdf/latest/

mentions a certain error as something that can only happen on M$
Windows. It says:

  Warning: If you are installing Agda using Cabal on Windows,
  depending on your system locale setting, cabal install Agda may fail
  with an error message:

  hGetContents: invalid argument (invalid byte sequence)

  If this happens, you can try changing the console code page to UTF-8
  using the command:

  CHCP 65001

I'm on Debian stable and I got something similar. I tried to install
Agda with

  cabal update
  cabal install Agda

and it failed with:

  happy: src/full/Agda/Syntax/Parser/Parser.y: hGetContents: invalid
  argument (invalid byte sequence)
  cabal: Failed to build Agda-2.6.2. See the build log above for
  details.

My default value for $LC_ALL is "C" and the only uncommented line in
my /etc/locale.gen is this one:

  en_GB.UTF-8 UTF-8

If I run this

  export LC_ALL=en_GB.UTF-8
  cabal install Agda

instead of just "cabal install Agda" the compilation succeeds.

  Cheers,
    Eduardo Ochs
    http://angg.twu.net/#eev
    http://angg.twu.net/math-b.html


More information about the Agda mailing list