cabal build for my project fails linking llvm-general package
<p>I have a cabal project, when I issue <code>cabal build</code> I get this :</p>

<pre><code>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 )

&lt;no location info&gt;: error:
    &lt;command line&gt;: can't load .so/.DLL for: /usr/lib/libcurses.so (-lncursesw: cannot open shared object file: No such file or directory)
</code></pre>

<p>This is the output with <code>--verbose=3</code> : <a href="http://pastebin.com/J7rgGDnL" rel="nofollow">verbose output</a></p>

<p>This is my cabal file : </p>

<pre><code>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:        &gt;=1.10

executable phjava
  main-is:              Main.hs
  -- other-modules:
  -- other-extensions:
  build-depends:        base &gt;= 4.7 &amp;&amp; &lt; 5 , parsec &lt; 4, containers &lt; 1 , regex-pcre &lt; 1 , parsec-permutation &lt; 1 , transformers &lt; 1 , logfloat &lt; 0.14, llvm-general-pure &lt; 4, llvm-general, mtl &lt; 3
  hs-source-dirs:       src
  default-language:     Haskell2010
  ghc-options: -Wall
</code></pre>

<p>I have ghc 8.0.1, cabal 1.24, llvm-3.8.1 . I installed llvm-general by cloning the llvm-3.8 branch and running cabal install with -fshared-llvm.</p>

<p>I assure you I have ncurses installed, also <code>libcurses.so</code> file is a symlink to <code>/usr/lib/libncurses.so</code>, I also have <code>/usr/lib/libncursesw.so</code> (which is also a symlink to <code>/usr/lib/libncursesw.so.6</code>).  </p>

<p>Last my OS is Arch Linux 64 bit and I also have ncurses5-compat-libs installed from AUR(and uninstalling it didn't help).  </p>