unknown symbol `clGetDeviceIDs' when trying to use OpenCL #29

Closed
ktosiek opened this Issue Jun 7, 2012 · 7 comments

Comments

Projects
None yet
3 participants

ktosiek commented Jun 7, 2012

When I'm trying to build any code using OpenCL with:

ghc -lOpenCL --make Test.hs

I'm getting:

ghc: /home/tomek/.cabal/lib/OpenCL-1.0.3.0/ghc-7.4.1/HSOpenCL-1.0.3.0.o: unknown symbol `clGetDeviceIDs'

It's the same for cabal-ghci in project using OpenCL, still, it works with runhaskell -lOpenCL Test.hs

it looks like adding "extra-libraries: OpenCL" in Library section of cabal file fixes this issue.

Member

zhensydow commented Jun 9, 2012

I'm outside until next week, when I'll be able to test it. But, I seems to me that its one of the differences between platforms. What platform are you using? I test it on Linux, and I apply several changes to allow Windows and Macos build, but I don't test it.

ktosiek commented Jun 9, 2012

I'm using Linux, and can't test on any other platform right now. If on
other platforms there are no problems with building packages depending
on OpenCL, just adding it as a Linux-specific quirk should work.

Tomasz Kontusz
tel.: +48 502 539 918
Jabber: tomasz.kontusz@gmail.com

Contributor

mgajda commented Jul 1, 2012

Please check out my branch, I have just added patch mgajda/opencl@6843b74 that fixes it.
The symptom is correct linking with ghci -lOpenCL, but unable to compile executable.

ktosiek commented Jul 2, 2012

@mgajda So it's not just me having this problem :-) I'm using a fix similar to yours.
@zhensydow this looks like a show-stopper on Linux, will you make a minor release to get this fixed on hackage?

Member

zhensydow commented Jul 2, 2012

@roverorna I like to, but currently I have no computer to test it. As soon as posible I put it in a release.
@mgajda i'll try to get this change in own branch

Contributor

mgajda commented Jul 2, 2012

@zhensydow I tested it works on both Linux and Mac. Now GHCi needs -lOpenCL no more.

zhensydow closed this in 4143882 Jul 2, 2012

Member

zhensydow commented Jul 2, 2012

@roverorna I just put the changes in hackage 1.0.3.1
@mgajda thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment