Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake doesn't handle the case when multiple opencl-c.h are found #314

Open
pvelesko opened this issue Jan 30, 2024 · 0 comments
Open

CMake doesn't handle the case when multiple opencl-c.h are found #314

pvelesko opened this issue Jan 30, 2024 · 0 comments

Comments

@pvelesko
Copy link

pvelesko commented Jan 30, 2024

get_filename_component invocation fails because it's being done on a list (since multiple opencl-c.h can exist in a single LLVM installation)

-- =============================================================================
-- [IGC] : opencl-clang will be taken from prebuilds
-- [IGC] : Find CLANG_TOOL in : /home/pvelesko/install/llvm/14.0/dynamic/bin/clang
-- [IGC] : Find opencl-clang-lib in : /home/pvelesko/install/llvm/14.0/dynamic/lib/libopencl-clang.so
-- [CMFE] CM Frontend headers are taken from: /home/pvelesko/intel-compute-runtime-build/igc/IGC/CMFE/AdaptorCM
-- [CMFE] Using CMFE library name: libclangFEWrapper.so
-- +++ Source/IGC/VectorCompiler +++
-- [VC] Build proj: VectorCompiler
-- [VC] Using vc-intrinsics source from: /home/pvelesko/intel-compute-runtime-build/igc/IGC/VectorCompiler/../../../vc-intrinsics/GenXIntrinsics
 >>/home/pvelesko/intel-compute-runtime-build/igc/build/IGC/VectorCompiler/lib/GenXCodeGen/Utils/../<<  ->  /home/pvelesko/intel-compute-runtime-build/igc/build/IGC/VectorCompiler/lib/GenXCodeGen/Utils
 COMMAND ->  /usr/bin/python3 /home/pvelesko/intel-compute-runtime-build/igc/IGC/VectorCompiler/lib/GenXCodeGen/Utils/cisa_gen_intrinsics.py /home/pvelesko/intel-compute-runtime-build/igc/IGC/VectorCompiler/lib/GenXCodeGen/Utils/cisa_gen_intrinsics.json /home/pvelesko/intel-compute-runtime-build/igc/build/IGC/VectorCompiler/lib/GenXCodeGen/Utils/../ <-
 /home/pvelesko/intel-compute-runtime-build/igc/IGC/VectorCompiler/lib/GenXCodeGen/Utils
vc_build_bif - VCBiFPrintfOCL32 has extra dependencies: /home/pvelesko/intel-compute-runtime-build/igc/IGC/VectorCompiler/lib/BiF/printf_not_cm_common.h
vc_build_bif - VCBiFPrintfOCL64 has extra dependencies: /home/pvelesko/intel-compute-runtime-build/igc/IGC/VectorCompiler/lib/BiF/printf_not_cm_common.h
vc_build_bif - VCBiFPrintfZE32 has extra dependencies: /home/pvelesko/intel-compute-runtime-build/igc/IGC/VectorCompiler/lib/BiF/printf_not_cm_common.h
vc_build_bif - VCBiFPrintfZE64 has extra dependencies: /home/pvelesko/intel-compute-runtime-build/igc/IGC/VectorCompiler/lib/BiF/printf_not_cm_common.h
[IGC\BiFModuleCache] - IGC_BUILD__BIF_ROOT_DIR: /home/pvelesko/intel-compute-runtime-build/igc/build/IGC/Release/bif/
[IGC\BiFModuleCache] - Looking for files inside /home/pvelesko/install/llvm/14.0/dynamic/lib/clang/14.0.5/include/opencl-c.h
[IGC\BiFModuleCache] - BiFModule_SRC: /home/pvelesko/intel-compute-runtime-build/igc/IGC/BiFModule/cmake/../
CMake Error at IGC/BiFModule/CMakeLists.txt:48 (get_filename_component):
  get_filename_component unknown component
  /home/pvelesko/install/llvm/14.0/dynamic/lib/clang/14.0.5/include/opencl-c.h
╭─pvelesko@aurora-uan-0011 ~/install/llvm/14.0
╰─$ find ./ -name "opencl-c.h"
./include/cclang/opencl-c.h
./lib/clang/14.0.6/include/opencl-c.h

As a workaround I was able rename: ./include/cclang/opencl-c.h_BACKUP
or edit CMakeLists.txt to use the first found opencl-c.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant