fpco / streaming-commons

Common lower-level functions needed by various streaming data libraries
MIT License
36 stars 39 forks source link

Failed to install on Windows 10, non-latin username folder #56

Open epogrebnyak opened 4 years ago

epogrebnyak commented 4 years ago
>cabal install streaming-commons
Resolving dependencies...
Configuring streaming-commons-0.2.1.2...
Building streaming-commons-0.2.1.2...
Failed to install streaming-commons-0.2.1.2
Build log ( C:\Users\Евгений\AppData\Roaming\cabal\logs\ghc-8.4.3\streaming-commons-0.2.1.2-G851nvy6NzgFfFYN4qliit.log ):
Preprocessing library for streaming-commons-0.2.1.2..
Building library for streaming-commons-0.2.1.2..
[ 1 of 17] Compiling Data.Streaming.ByteString.Builder.Buffer ( Data\Streaming\ByteString\Builder\Buffer.hs, dist\build\Data\Streaming\ByteString\Builder\Buffer.o )
[ 2 of 17] Compiling Data.Streaming.ByteString.Builder ( Data\Streaming\ByteString\Builder.hs, dist\build\Data\Streaming\ByteString\Builder.o )
[ 3 of 17] Compiling Data.Streaming.Filesystem ( Data\Streaming\Filesystem.hs, dist\build\Data\Streaming\Filesystem.o )
[ 4 of 17] Compiling Data.Streaming.Network.Internal ( Data\Streaming\Network\Internal.hs, dist\build\Data\Streaming\Network\Internal.o )
[ 5 of 17] Compiling Data.Streaming.Network ( Data\Streaming\Network.hs, dist\build\Data\Streaming\Network.o )
[ 6 of 17] Compiling Data.Streaming.Process.Internal ( Data\Streaming\Process\Internal.hs, dist\build\Data\Streaming\Process\Internal.o )
[ 7 of 17] Compiling Data.Streaming.Process ( Data\Streaming\Process.hs, dist\build\Data\Streaming\Process.o )
[ 8 of 17] Compiling Data.Streaming.Zlib.Lowlevel ( Data\Streaming\Zlib\Lowlevel.hs, dist\build\Data\Streaming\Zlib\Lowlevel.o )
[ 9 of 17] Compiling Data.Streaming.Zlib ( Data\Streaming\Zlib.hs, dist\build\Data\Streaming\Zlib.o )
[10 of 17] Compiling Data.Text.Internal.Encoding.Utf16 ( Data\Text\Internal\Encoding\Utf16.hs, dist\build\Data\Text\Internal\Encoding\Utf16.o )
[11 of 17] Compiling Data.Text.Internal.Encoding.Utf32 ( Data\Text\Internal\Encoding\Utf32.hs, dist\build\Data\Text\Internal\Encoding\Utf32.o )
[12 of 17] Compiling Data.Text.Internal.Unsafe.Shift ( Data\Text\Internal\Unsafe\Shift.hs, dist\build\Data\Text\Internal\Unsafe\Shift.o )
[13 of 17] Compiling Data.Text.Internal.Unsafe.Char ( Data\Text\Internal\Unsafe\Char.hs, dist\build\Data\Text\Internal\Unsafe\Char.o )
[14 of 17] Compiling Data.Text.Internal.Encoding.Utf8 ( Data\Text\Internal\Encoding\Utf8.hs, dist\build\Data\Text\Internal\Encoding\Utf8.o )
[15 of 17] Compiling Data.Streaming.Text ( Data\Streaming\Text.hs, dist\build\Data\Streaming\Text.o )
[16 of 17] Compiling System.Win32File ( dist\build\System\Win32File.hs, dist\build\System\Win32File.o )
[17 of 17] Compiling Data.Streaming.FileRead ( Data\Streaming\FileRead.hs, dist\build\Data\Streaming\FileRead.o )
C:\Users\B7E3~1\AppData\Local\Temp\ghc3976_0\ghc_2.rsp: commitBuffer: invalid argument (invalid character)
cabal: Leaving directory 'C:\Users\B7E3~1\AppData\Local\Temp\cabal-tmp-1296\streaming-commons-0.2.1.2'
cabal: Error: some packages failed to install:
streaming-commons-0.2.1.2-G851nvy6NzgFfFYN4qliit failed during the building
phase. The exception was:
ExitFailure 1
snoyberg commented 4 years ago

This looks like a bug in GHC, not streaming-commons. Is there some reason to believe that streaming-commons is doing something specific to trigger this?

You may be able to work around this by changing your code page with (IIRC) chcp 65001

epogrebnyak commented 4 years ago

Is there some reason to believe that streaming-commons is doing something specific to trigger this?

My only clue is that other dependencies of pandoc do install and streaming-commons fails in that installation.

epogrebnyak commented 4 years ago

With chcp 65001 the error comes even faster, unfortunately. Making things work on Windows is tedious (

λ chcp 65001
Active code page: 65001

C:\Users\Евгений\Desktop
λ cabal install streaming-commons
C:\Users\Евгений\AppData\Roaming\cabal\config: hGetContents: invalid argument (invalid byte sequence)
snoyberg commented 4 years ago

Out of curiosity, what versions of GHC and cabal-install are you using? Have you tried building this with Stack instead?