clashのインストール (Mac成功 / Windows失敗)
clash
のインストールをしています。
Mac
ではインストールができましたが、Windows
ではできませんでした。
インストール方法は、clash
のgithub
のwiki
のgetting started
通りです。
$ git clone https://github.com/clash-lang/clash-compiler.git $ cd clash-compiler $ git submodule update --init $ stack build
Macの場合
(root)blender:clash-compiler ogawanaoto$ stack build Preparing to install GHC to an isolated location. This will not interfere with any system-level installation. Downloaded ghc-8.2.1. Installed GHC. ... clash-prelude-0.99: copy/register clash-lib-0.99: configure (lib) clash-lib-0.99: build (lib) clash-lib-0.99: copy/register Building all executables for `clash-ghc' once. After a successful build of all of them, only specified executables will be rebuilt. clash-ghc-0.99: configure (lib + exe) clash-ghc-0.99: build (lib + exe) clash-ghc-0.99: copy/register Completed 90 action(s). Log files have been written to: /Users/foo/work11/fpga01/clash-compiler/.stack-work/logs/
問題なく終了しました。
Windowsの場合
$ stack build ... fgl-5.5.4.0: configure fgl-5.5.4.0: build optparse-applicative-0.14.0.0: configure optparse-applicative-0.14.0.0: build ghc-tcplugins-extra-0.2.1: configure ghc-tcplugins-extra-0.2.1: build aeson-1.2.1.0: configure aeson-1.2.1.0: build ghc-tcplugins-extra-0.2.1: copy/register -- While building custom Setup.hs for package aeson-1.2.1.0 using: C:\Users\User\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.0.0.2_ghc-8.2.1.exe --builddir=.stack-work\dist\e53504d9 build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 3 Logs have been written to: C:\Program Files\Haskell Platform\8.2.2\msys\home\User\work02\work03\clash-compiler\.stack-work\logs\aeson-1.2.1.0.log Configuring aeson-1.2.1.0... Preprocessing library for aeson-1.2.1.0.. Building library for aeson-1.2.1.0.. [ 1 of 23] Compiling Data.Aeson.Internal.Functions ( Data\Aeson\Internal\Functions.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Internal\Functions.o ) [ 2 of 23] Compiling Data.Aeson.Parser.UnescapePure ( pure\Data\Aeson\Parser\UnescapePure.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Parser\UnescapePure.o ) [ 3 of 23] Compiling Data.Aeson.Parser.Unescape ( Data\Aeson\Parser\Unescape.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Parser\Unescape.o ) [ 4 of 23] Compiling Data.Aeson.Types.Generic ( Data\Aeson\Types\Generic.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Types\Generic.o ) [ 5 of 23] Compiling Data.Aeson.Types.Internal ( Data\Aeson\Types\Internal.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Types\Internal.o ) [ 6 of 23] Compiling Data.Aeson.Parser.Internal ( Data\Aeson\Parser\Internal.hs, .stack-work\dist\e53504d9\build\Data\Aeson\Parser\Internal.o ) ghc.EXE: internal error: mkPath failed converting char* to wchar_t* (GHC version 8.2.1 for x86_64_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. -- While building custom Setup.hs for package optparse-applicative-0.14.0.0 using: C:\Users\User\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.0.0.2_ghc-8.2.1.exe --builddir=.stack-work\dist\e53504d9 build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 3 Logs have been written to: C:\Program Files\Haskell Platform\8.2.2\msys\home\User\work02\work03\clash-compiler\.stack-work\logs\optparse-applicative-0.14.0.0.log Configuring optparse-applicative-0.14.0.0... Preprocessing library for optparse-applicative-0.14.0.0.. Building library for optparse-applicative-0.14.0.0.. [ 1 of 16] Compiling Options.Applicative.Help.Levenshtein ( Options\Applicative\Help\Levenshtein.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Levenshtein.o ) [ 2 of 16] Compiling Options.Applicative.Help.Pretty ( Options\Applicative\Help\Pretty.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Pretty.o ) [ 3 of 16] Compiling Options.Applicative.Help.Chunk ( Options\Applicative\Help\Chunk.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Chunk.o ) [ 4 of 16] Compiling Options.Applicative.Help.Types ( Options\Applicative\Help\Types.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Types.o ) [ 5 of 16] Compiling Options.Applicative.Types ( Options\Applicative\Types.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Types.o ) [ 6 of 16] Compiling Options.Applicative.Internal ( Options\Applicative\Internal.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Internal.o ) [ 7 of 16] Compiling Options.Applicative.Common ( Options\Applicative\Common.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Common.o ) [ 8 of 16] Compiling Options.Applicative.Help.Core ( Options\Applicative\Help\Core.hs, .stack-work\dist\e53504d9\build\Options\Applicative\Help\Core.o ) ghc.EXE: internal error: mkPath failed converting char* to wchar_t* (GHC version 8.2.1 for x86_64_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. -- While building custom Setup.hs for package fgl-5.5.4.0 using: C:\Users\User\AppData\Roaming\stack\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.0.0.2_ghc-8.2.1.exe --builddir=.stack-work\dist\e53504d9 build --ghc-options " -ddump-hi -ddump-to-file" Process exited with code: ExitFailure 3 Logs have been written to: C:\Program Files\Haskell Platform\8.2.2\msys\home\User\work02\work03\clash-compiler\.stack-work\logs\fgl-5.5.4.0.log Configuring fgl-5.5.4.0... Preprocessing library for fgl-5.5.4.0.. Building library for fgl-5.5.4.0.. [ 1 of 29] Compiling Data.Graph.Inductive.Graph ( Data\Graph\Inductive\Graph.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Graph.o ) [ 2 of 29] Compiling Data.Graph.Inductive.Internal.Heap ( Data\Graph\Inductive\Internal\Heap.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Internal\Heap.o ) [ 3 of 29] Compiling Data.Graph.Inductive.Internal.Queue ( Data\Graph\Inductive\Internal\Queue.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Internal\Queue.o ) [ 4 of 29] Compiling Data.Graph.Inductive.Internal.RootPath ( Data\Graph\Inductive\Internal\RootPath.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Internal\RootPath.o ) [ 5 of 29] Compiling Data.Graph.Inductive.Internal.Thread ( Data\Graph\Inductive\Internal\Thread.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Internal\Thread.o ) [ 6 of 29] Compiling Data.Graph.Inductive.Basic ( Data\Graph\Inductive\Basic.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Basic.o ) [ 7 of 29] Compiling Data.Graph.Inductive.Monad ( Data\Graph\Inductive\Monad.hs, .stack-work\dist\e53504d9\build\Data\Graph\Inductive\Monad.o ) ghc.EXE: internal error: mkPath failed converting char* to wchar_t* (GHC version 8.2.1 for x86_64_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. MSYS ~/work02/work03/clash-compiler $
このようなエラーがでてしまいます。コマンドプロンプトからstack build
しても同様でした。
ghc.EXE: internal error: mkPath failed converting char to wchar_t
次の情報がありました。
#14398 (Fail to install haskell platform on Windows) – GHC
ghc
のコードの該当箇所は下記のようです。
ghc/PathUtils.c at master · ghc/ghc · GitHub
mkPath
とあるのでパスにスペースがある部分がよくないのかもしれないと思い、スペースがないフォルダにて試しましたが、同じエラーが出ました。(ただしエラー対象になるパッケージは別)
せっかくWindowsマシンを買ったのにHaskell
が使えないのはちょっと残念です。