Question

I'm having trouble using the repa-devil package, which I installed from cabal with cabal install repa-devil.

For example, here is part of my ghci transcript:

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> 

Running lipo on the indicated dylib file:

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

and

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

Any help would be appreciated.

Was it helpful?

Solution

I believe you have installed the 32 bit version of Haskell platform. But, libdevil is compiled for 64 bit architecture.

You should either install the 64 bit version of Haskell platform (actually not recommended) or compile the library in 32 bits.

Personally I use the 64 bit version of Haskell without much problem (except a bug with yesod and ghc 7.4).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top