OS X Lionでhmatrix libraryをビルドできません。 .cabalファイルを見ると、gsl
ライブラリが必要なので、私はそれをmacportsでインストールしました。 .aファイルは/ opt/local/libにあり、.hファイルは/ opt/local/include/gslにあります。ハスケルパッケージにCライブラリがありません
私は組み込みタイプをカスタムからシンプルに変更しました。 (そのような変更がなければ私は似たようなエラーになります)。
私はcabal configure
を使用すると、私は次のような出力が得られます。
* Missing C library: gsl
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
だから私はcabal --extra-include-dirs=/opt/local/include --extra-lib-dirs=/opt/local/lib configure
を試してみましたが、私はまだ同じエラーを取得します。私はgslを含むcプログラムをコンパイルしてリンクすることができます。カバールはどのファイルを探していますか?適切なファイルがある場合、どのようにファイルを見つけるかを教えてください。
libgsl.aはユニバーサルバイナリである:それは64ビットだよう
$ file /opt/local/lib/libgsl.a
/opt/local/lib/libgsl.a: Mach-O universal binary with 2 architectures
/opt/local/lib/libgsl.a (for architecture x86_64): current ar archive random library
/opt/local/lib/libgsl.a (for architecture i386): current ar archive random library
GHCはなります
$ ghc --info
[("Project name","The Glorious Glasgow Haskell Compilation System")
,("GCC extra via C opts"," -fwrapv")
,("C compiler command","/usr/bin/llvm-gcc")
,("C compiler flags"," -m64 -fno-stack-protector -m64")
,("ar command","/usr/bin/ar")
,("ar flags","clqs")
,("ar supports at file","NO")
,("touch command","touch")
,("dllwrap command","/bin/false")
,("windres command","/bin/false")
,("perl command","/usr/bin/perl")
,("target os","OSDarwin")
,("target arch","ArchX86_64")
,("target word size","8")
,("target has GNU nonexec stack","False")
,("target has subsections via symbols","True")
,("Project version","7.4.2")
,("Booter version","7.4.2")
,("Stage","2")
,("Build platform","x86_64-apple-darwin")
,("Host platform","x86_64-apple-darwin")
,("Target platform","x86_64-apple-darwin")
,("Have interpreter","YES")
,("Object splitting supported","NO")
,("Have native code generator","YES")
,("Support SMP","YES")
,("Unregisterised","NO")
,("Tables next to code","YES")
,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn")
,("Leading underscore","YES")
,("Debug on","False")
,("LibDir","/usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2")
,("Global Package DB","/usr/local/Cellar/ghc/7.4.2/lib/ghc-7.4.2/package.conf.d")
,("Gcc Linker flags","[\"-m64\"]")
,("Ld Linker flags","[\"-arch\",\"x86_64\"]")
]
暗闇での完全な撮影:g ++がインストールされていますか?私は別のライブラリをインストールして奇妙なエラーメッセージを受け取ったことを覚えています(それは明確にインストールされたCライブラリを見つけられませんでした)。後でg ++が必要であることが判明しました。 –
g ++がインストールされています。 – munk
'cabal install -v hmatrix'を試して失敗したステップを見ましたか?それは問題の絞り込みに役立つかもしれません。 –