0

I'm trying to get an OpenCL application to run on an ARM. Therefore I'm trying to install the pocl implementation of OpenCL. (and the Khronos ICD loader) I'm running a Linaro 12.11. Both programs seem to require GL/gl.h header files. Where do I get them from?

Do I really have to install OpenGL for that?

I tried add-apt-repository ppa:xorg-edgers/ppa since there is a package at http://www.ubuntuupdates.org/package/xorg-edgers/precise/main/base/mesa-common-dev. But apt-get install mesa-common-dev returned "Package 'mesa-common-dev' has no installation candidate". So where would I get it?

maZZZu
  • 3,585
  • 2
  • 17
  • 21
random
  • 47
  • 1
  • 7
  • Need to know your GPU. You could possibly use a CPU alternative though. – RamblingMad Aug 12 '15 at 14:35
  • As far as I know I don't have a GPU. The CPU is a Cortex A-9 (hf) – random Aug 12 '15 at 14:59
  • Try `libgl1-mesa-dev` – Colonel Thirty Two Aug 12 '15 at 15:01
  • @random try compiling `pocl` from source. Maybe the Ubuntu repositories version of POCL unnecessarily depends on libgl? – RamblingMad Aug 12 '15 at 15:03
  • Same result. "Package 'libgl1-mesa-dev' has no installation candidate" – random Aug 12 '15 at 15:03
  • @CoffeeandCode maybe I wasn't very clear. Building from source is what I'm trying to do. But when I run make for the ICD loader, they complain about missing gl.h header files. Also if I try `../configure --host=armv7l-unknown-linux-gnueabihf --disable-icd --enable-debug --enable-testsuites=all` for pocl it complains about missing openGL implementation and their header files. – random Aug 12 '15 at 15:09

1 Answers1

1

pocl shouldn't require GL. The only thing that might require it is the cl.hpp header from Khronos that is shipped with pocl. For that mesa headers should do.

  • The master himself, that's service :-) But if cl.hpp required headers the error would occour at pocl - make not at ./configure, right? The following error occurs at configure of pocl-0.11 `./configure --host=armv7l-unknown-linux-gnueabihf --disable-icd --enable-debug --enable-testsuites=all` `... checking for OpenGL/OpenGL.h... no configure: error: in `/usr/local/pocl-0.11': configure: error: Please install an OpenGL implementation with gl.h or OpenGL.h. It is required by the C++ bindings. See `config.log' for more details` So for me it looks like pocl is asking for it :O – random Aug 13 '15 at 07:20
  • And in the config.log I found: `configure:18191: checking OpenGL/OpenGL.h usability configure:18191: gcc -c -g -O2 conftest.c >&5 conftest.c:60:27: fatal error: OpenGL/OpenGL.h: No such file or directory compilation terminated. configure:18191: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "pocl" | #define PACKAGE_TARNAME "pocl" | #define PACKAGE_VERSION "0.11"` – random Aug 13 '15 at 07:21
  • Okay, so I put the mesa headers to both `/usr/local/pocl-0.11/GL/gl.h` and `/usr/local/pocl-0.11/OpenGL/OpenGL.h`. But it doesn't seem to be the right place since the configure output stays the same. I also tried the `/usr/local/pocl-0.11/include/OpenGL/OpenGL.h` version and `/etc/OpenGL/OpenGL.h` with setting & exporting the PATH variable without any success. Could you give me a hint where they are expected to be? – random Aug 13 '15 at 09:31
  • I just found out the header files are expected to be at `/usr/include/GL/*`, `/usr/include/CL/*`. This might be obvious for an experienced Linux user but for the next noob stumbling over that this bit of information might be significant... Thanks @Pekka for showing me the direction!! – random Aug 13 '15 at 12:49