我有一个cabal项目,当我发出cabal build
时,我得到了这个:
Building phjava-0.1.0.0...
Preprocessing executable 'phjava' for phjava-0.1.0.0...
[2 of 3] Compiling CodeGen ( src/CodeGen.hs, dist/build/phjava/phjava-tmp/CodeGen.o )
<no location info>: error:
<command line>: can't load .so/.DLL for: /usr/lib/libcurses.so (-lncursesw: cannot open shared object file: No such file or directory)
这是--verbose=3
的输出:verbose output
这是我的cabal文件:
name: phjava
version: 0.1.0.0
synopsis:
-- description:
-- license:
-- license-file:
homepage:
author: abnud1
maintainer: ahmad13932013@hotmail.com
category: Language
-- copyright:
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
executable phjava
main-is: Main.hs
-- other-modules:
-- other-extensions:
build-depends: base >= 4.7 && < 5 , parsec < 4, containers < 1 , regex-pcre < 1 , parsec-permutation < 1 , transformers < 1 , logfloat < 0.14, llvm-general-pure < 4, llvm-general, mtl < 3
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall
我有ghc 8.0.1,cabal 1.24,llvm-3.8.1。我通过克隆llvm-3.8分支并使用-fshared-llvm运行cabal安装来安装llvm-general。
我向你保证我安装了ncurses,libcurses.so
文件是/usr/lib/libncurses.so
的符号链接,我也有/usr/lib/libncursesw.so
(这也是/usr/lib/libncursesw.so.6
的符号链接)。
最后我的操作系统是Arch Linux 64位,我也有从AUR安装的ncurses5-compat-libs(卸载它没有帮助)。