Cannot get PyOpenCL installed *with GL sharing* on Linux #554
-
I see this has replaced the mailing list, so I shall try here to get help. I tried installing PyOpenCL with GL support on my laptop with an Intel iGPU and it didn't work, so I chalked it up as a driver issue. Well now I'm trying it on my desktop with a Nvidia GPU and it's still not working.
Traceback (most recent call last):
File "PyOpenCL_GL.py", line 9, in <module>
import pyopencl as cl
File "/home/aweso/.local/lib/python3.8/site-packages/pyopencl/__init__.py", line 28, in <module>
import pyopencl.cltypes # noqa: F401
File "/home/aweso/.local/lib/python3.8/site-packages/pyopencl/cltypes.py", line 22, in <module>
from pyopencl.tools import get_or_register_dtype
File "/home/aweso/.local/lib/python3.8/site-packages/pyopencl/tools.py", line 36, in <module>
from pyopencl._cl import bitlog2 # noqa: F401
ImportError: /home/aweso/.local/lib/python3.8/site-packages/pyopencl/_cl.cpython-38-x86_64-linux-gnu.so: undefined symbol: clSetProgramSpecializationConstant
I am on Ubuntu Linux 20.04 LTS., This machine has a Core i5-7600k and MSI/Nvidia GTX1650. If anyone can point me to solving this, I would greatly appreciate it! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Try the following: Add This is needed because (at least at one point) ocl-icd included headers declaring CL 2.2 functions (like |
Beta Was this translation helpful? Give feedback.
Try the following:
Add
--cl-pretend-version=2.1
to yourconfigure.py
line. Runrm -Rf build
to ensure the package actually gets recompiled. Reinstall.This is needed because (at least at one point) ocl-icd included headers declaring CL 2.2 functions (like
clSetProgramSpecializationConstant
) but did not actually define them.