O2 building fails in CentOS7

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

The full log is available here: https://www.dropbox.com/s/4e37fbanae4gyib/log

Any hint?

Thanks, best regards
Antonio

Hello,

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.

Best Regards,
Artur Furs.

Hello @afurs ,

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?

Thanks, cheers
Antonio

Hello @auras,

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:

alice-analysis-operations (ALICE operational analysis issues)

alice-project-analysis-task-force (ALICE offline analysis task force)

Best Regards,
Artur Furs.

Thanks @afurs , I checked as you suggested and it seems that the library is installed in a path included in the LD_LIBRARY_PATH:

[auras@lyoui4 ~]$ yum provides */libOpenCL.so
Loaded plugins: langpacks, priorities, versionlock
1093 packages excluded due to repository priority protections
ocl-icd-devel-2.2.12-1.el7.x86_64 : Development files for ocl-icd
Repo : el7_epel
Matched from:
Filename : /usr/lib64/libOpenCL.so

[auras@lyoui4 ~]$ echo $LD_LIBRARY_PATH
/usr/lib64/classads:/usr/lib64:/usr/lib:/usr/lpp/mmfs/lib:/usr/lpp/mmfs/lib/crypto

I’ll try to send a message to the mailing lists…

Cheers,
Antonio