However, when I build from source, I get OpenCL errors during linking, even though the OpenCL shared library is found - OPENCL_LIBRARY=/usr/lib/x86_64-linux-gnu/libOpenCL.so. Specifically, I get (with VERBOSE=1):
Code: Select all
Linking CXX executable ../../../TestOpenCLAndersenThermostat
cd /home/marsalek/build/OpenMM6.1-Build/platforms/opencl/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/TestOpenCLAndersenThermostat.dir/link.txt --verbose=1
/usr/bin/clang++ -O3 -DNDEBUG -msse2 CMakeFiles/TestOpenCLAndersenThermostat.dir/TestOpenCLAndersenThermostat.cpp.o -o ../../../TestOpenCLAndersenThermostat -rdynamic ../../../libOpenMMOpenCL.so ../../../libOpenMM.so -ldl -lOpenCL -lpthread -Wl,-rpath,/home/marsalek/build/OpenMM6.1-Build
../../../libOpenMMOpenCL.so: undefined reference to `clRetainDevice'
../../../libOpenMMOpenCL.so: undefined reference to `clReleaseDevice'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [TestOpenCLAndersenThermostat] Error 1
make[2]: Leaving directory `/home/marsalek/build/OpenMM6.1-Build'
make[1]: *** [platforms/opencl/tests/CMakeFiles/TestOpenCLAndersenThermostat.dir/all] Error 2
make[1]: Leaving directory `/home/marsalek/build/OpenMM6.1-Build'
make: *** [all] Error 2