OS X上的repa-devil包架构不匹配

时间:2013-04-30 03:15:42

标签: haskell cabal repa

我在使用repa-devil软件包时遇到问题,我使用cabal install repa-devil从cabal安装了该软件包。

例如,这是我的ghci成绩单的一部分:

Prelude Data.Array.Repa.IO.DevIL> :m + Data.Array.Repa.IO.DevIL 
Prelude Data.Array.Repa.IO.DevIL> let x = readImage "out1.png"
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package array-0.4.0.0 ... linking ... done.
Loading package deepseq-1.3.0.0 ... linking ... done.
Loading package extensible-exceptions-0.1.1.4 ... linking ... done.
Loading package old-locale-1.0.0.4 ... linking ... done.
Loading package time-1.4 ... linking ... done.
Loading package random-1.0.1.1 ... linking ... done.
Loading package containers-0.4.2.1 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package QuickCheck-2.4.2 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package primitive-0.5.0.1 ... linking ... done.
Loading package vector-0.10.0.1 ... linking ... done.
Loading package repa-3.2.2.201204.1 ... linking ... done.
Loading package repa-devil-0.3.2.2 ... can't load .so/.DLL for: libIL.dylib (dlopen(libIL.dylib, 9): no suitable image found.  Did find:
    /usr/local/lib/libIL.dylib: mach-o, but wrong architecture)
Prelude Data.Array.Repa.IO.DevIL> 

在指示的dylib文件上运行lipo:

edechter $ lipo -info /usr/local/lib/libIL.dylib
Non-fat file: /usr/local/lib/libIL.dylib is architecture: x86_64

uname -a 
Darwin helmholtz.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:2)

我相信你已经安装了32位版本的Haskell平台。但是,libdevil是针对64位架构编译的。

您应该安装64位版本的Haskell平台(实际上不推荐)或者以32位编译库。

我个人使用64位版本的Haskell没有太大问题(除了yesod和ghc 7.4的bug)。