CMake doesn't handle the case when multiple `opencl-c.h` are found
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- cmake
- Domain
- build-system
Research direction
Start at IGC/BiFModule/CMakeLists.txt:48 and inspect how the opencl-c.h search result is passed to get_filename_component. Reproduce configuration with an LLVM installation containing both headers, then verify that configuration succeeds and selects a valid opencl-c.h path without requiring the other header to be renamed.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- C++
- Stars
- 718
- Forks
- 191
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intel/intel-graphics-compiler
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
intel/intel-graphics-compiler#422 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
intel/intel-graphics-compiler#373 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
intel/intel-graphics-compiler#445 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
intel/intel-graphics-compiler#432 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
intel/intel-graphics-compiler#431 ·
All issues in intel/intel-graphics-compiler
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·