2017-04-03 30 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