Dear experts, building O2 in CentOS7 (CentOS 7.6.1810) fails with the errors:
CMake Error at cmake/O2AddLibrary.cmake:75 (add_library):
Target “O2lib-GPUTrackingOpenCLCommon” links to target “OpenCL::OpenCL” but
the target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
GPU/GPUTracking/Base/opencl-common/CMakeLists.txt:17 (o2_add_library)
CMake Error at cmake/O2AddLibrary.cmake:75 (add_library):
Target “O2lib-GPUTrackingOCL2” links to target “OpenCL::OpenCL” but the
target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
GPU/GPUTracking/Base/opencl2/CMakeLists.txt:153 (o2_add_library)
I saw from other topics that this may be due to the possible missing of the glfw package, so I verified that it is indeed installed:
[root@lyoui1 ~]# yum list glfw-devel
Loaded plugins: langpacks, priorities, versionlock
1093 packages excluded due to repository priority protections
Installed Packages
glfw-devel.x86_64 1:3.2.1-2.el7 @el7_epel
From your Log:
– Could NOT find OpenCL (missing: OpenCL_LIBRARY) (found version “2.2”)
– Could NOT find ROCM (missing: ROCM_DIR)
– Found OpenCL 2 (2.2 ; AMD CLANG_OCL-NOTFOUND ; SPIR-V LLVM_SPIRV-NOTFOUND with CLANG 11.0.0)
And according to the last lines of your log file, it looks like find_package() cannot correctly find OpenCL library and linker triggers error message.
P.S. Try aliDoctor, it could help to find the problem.
thanks for your feedback: unfortunately, the alidoctor output (available here: Dropbox - alidoctor.log - Simplify your life) didn’t help me in finding out what’s wrong or missing. Do you find anything suspicious there?
Your alidoctor log doesn’t look suspicious for me. Did you try to install or check OpenCL libs? As I sad, it looks like that cmake cannot find them, for linking with project.
Try to locate libOpenCL.so, maybe your environment doesn’t contain path to location of this lib(LD_LIBRARY_PATH) or it is not installed. This could help to find packages with openCL lib:
yum provides ‘*/libOpenCL.so’
This is only assumption, I hope it helps you.
BTW, your can also write to e-groups: