2017-04-03 63 views
0

當建立從haskell-stack我得到以下錯誤:哈斯克爾堆棧店 - 0.3:libz.so

store-0.3: download 
store-0.3: configure 
store-0.3: build 

-- While building package store-0.3 using: 
     /tmp/haskell-stack-20170403-52407-1rpyzwy/stack-1.4.0/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_1.22.5.0_ghc-7.10.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file" 
    Process exited with code: ExitFailure 1 
    Logs have been written to: /tmp/haskell-stack-20170403-52407-1rpyzwy/stack-1.4.0/.stack-work/logs/store-0.3.log 

    Configuring store-0.3... 
    Building store-0.3... 
    Preprocessing library store-0.3... 
    [ 1 of 11] Compiling Data.Store.Streaming.Internal (src/Data/Store/Streaming/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Streaming/Internal.o) 
    [ 2 of 11] Compiling System.IO.ByteBuffer (src/System/IO/ByteBuffer.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/System/IO/ByteBuffer.o) 
    [ 3 of 11] Compiling Data.Store.Impl (src/Data/Store/Impl.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Impl.o) 
    [ 4 of 11] Compiling Data.Store.TH (src/Data/Store/TH.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/TH.o) 
    [ 5 of 11] Compiling Data.Store.TH.Internal (src/Data/Store/TH/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/TH/Internal.o) 
    [ 6 of 11] Compiling Data.Store.Internal (src/Data/Store/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Internal.o) 
    <command line>: can't load .so/.DLL for: libz.so (libz.so: cannot open shared object file: No such file or directory) 

有誰知道可能會導致什麼呢?我的機器上安裝了zlib開發。

+0

真奇怪! zlib軟件包使用libz,這是流通公共軟件包的依賴關係。所以我希望在編譯zlib包的時候出現這個問題,而不是在編譯存儲時。如果你執行「stack exec -ghc-pkg unregister zlib」並嘗試重新構建,會發生什麼? – mgsloan

+0

您是否安裝了系統libz-dev軟件包? – epsilonhalbe

回答

0

原來我還需要增加兩個標誌來指定zlib的包括和lib:

--extra-include-dirs 
--extra-lib-dirs