Haskell OpenCL on Windows

To try running OpenCL bindings in Haskell (https://github.com/HIPERFIT/hopencl) I had installed Intel SDK for OpenCL (https://software.intel.com/en-us/intel-opencl) on Windows 8.1 64 bit machine.

To install hopencl, the instructions is :

cabal install c2hs
cabal install

The first command to install c2hs succeeded.
The second command to install hopencl failed with :

Resolving dependencies...
In order, the following will be installed:
hopencl-0.2.1 (reinstall)
Configuring hopencl-0.2.1...
Failed to install hopencl-0.2.1
Build log ( C:\Users\...\AppData\Roaming\cabal\logs\hopencl-0.2.1.log ):
Configuring hopencl-0.2.1...
setup.exe: Missing dependency on a foreign library:
* Missing C library: OpenCL
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.

To make it compile sepcify the OpenCL include and lib like :

C:\>cabal install --ext
ra-include-dirs="c:\Program Files (x86)\Intel\OpenCL SDK\include" --extra-lib-di
rs="c:\Program Files (x86)\Intel\OpenCL SDK\lib\x64"

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s