haskell-ide-engine icon indicating copy to clipboard operation
haskell-ide-engine copied to clipboard

hGetContents: invalid argument (invalid byte sequence)

Open Unisay opened this issue 4 years ago • 3 comments

I am on Fedora linux and freshly cloned repo:

~/p/haskell-ide-engine (master|✔) $ stack install.hs hie-8.6.5                                                                                                                  4910ms  Sa 21 Mär 2020 10:57:55 CET
# stack (for check)
# git (for submodules)
# git (for submodules)
Options:
    Verbosity level: Info
# stack (for hie-8.6.5)
Using archive from https://github.com/jneira/cabal-helper/archive/ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2.tar.gz without a specified cryptographic hash
Cached hash is 64270e4d1c14fd1a702251cd76a4ee6fb4e6e3402cecb298cf8e6a0f2f692df2, file size 67864
For security and reproducibility, please add a hash and file size to your configuration
Diff                             > configure
Diff                             > Configuring Diff-0.3.4...
Diff                             > build
ansi-terminal                    > configure
Diff                             > Preprocessing library for Diff-0.3.4..
Diff                             > Building library for Diff-0.3.4..
Diff                             > [1 of 3] Compiling Data.Algorithm.Diff
ansi-terminal                    > Configuring ansi-terminal-0.10.2...
ansi-terminal                    > build
base-compat                      > configure
ansi-terminal                    > Preprocessing library for ansi-terminal-0.10.2..
ansi-terminal                    > Building library for ansi-terminal-0.10.2..
ansi-terminal                    > [1 of 4] Compiling System.Console.ANSI.Types
Diff                             > [2 of 3] Compiling Data.Algorithm.DiffContext
base-compat                      > Configuring base-compat-0.11.1...
Diff                             > [3 of 3] Compiling Data.Algorithm.DiffOutput
base-compat                      > build
base-prelude                     > configure
base-compat                      > Preprocessing library for base-compat-0.11.1..
base-compat                      > Building library for base-compat-0.11.1..
base-prelude                     > Configuring base-prelude-1.3...
base-prelude                     > build
bytestring-trie                  > configure
base-prelude                     > Preprocessing library for base-prelude-1.3..
base-prelude                     > Building library for base-prelude-1.3..
base-compat                      > [  1 of 116] Compiling Control.Concurrent.Compat
base-prelude                     > [1 of 1] Compiling BasePrelude
base-compat                      > [  2 of 116] Compiling Control.Concurrent.Compat.Repl
base-compat                      > [  3 of 116] Compiling Control.Concurrent.MVar.Compat
base-compat                      > [  4 of 116] Compiling Control.Concurrent.MVar.Compat.Repl
base-compat                      > [  5 of 116] Compiling Control.Exception.Compat
base-compat                      > [  6 of 116] Compiling Control.Exception.Compat.Repl
base-compat                      > [  7 of 116] Compiling Control.Monad.Compat
base-compat                      > [  8 of 116] Compiling Control.Monad.Compat.Repl
base-compat                      > [  9 of 116] Compiling Control.Monad.Fail.Compat
base-compat                      > [ 10 of 116] Compiling Control.Monad.Fail.Compat.Repl
base-prelude                     > 
base-prelude                     > /tmp/stack872852/base-prelude-1.3/library/BasePrelude.hs:12:3: warning: [-Wduplicate-exports]

********************************************************************************
Building failed, Try running `stack clean` and restart the build
If this does not work, open an issue at 
	https://github.com/haskell/haskell-ide-engine
********************************************************************************

Error when running Shake build system:
  at want, called at src/Development/Shake/Internal/Args.hs:83:69 in shake-0.18.5-AT2wsKie7GmK5OPJZ5kRVD:Development.Shake.Internal.Args
* Depends on: hie-8.6.5
* Raised the exception:
fd:14: hGetContents: invalid argument (invalid byte sequence)

Unisay avatar Mar 21 '20 09:03 Unisay

I remember seeing these kind of errors when my terminal could not understand utf-8. Maybe your locale is not using UTF-8?

fendor avatar Mar 21 '20 11:03 fendor

$ locale                                                                                                                                       13.3s  Sa 21 Mär 2020 12:36:02 CET
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Thanks for the hint, I'll try to set LC_ALL to UTF-8!

Unisay avatar Mar 21 '20 11:03 Unisay

no, that looks right already

fendor avatar Mar 21 '20 11:03 fendor