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

オープン 初心者向け
#314 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

@pvelesko がすでに取り組んでいます。

2026年8月28日 から。

  • #436 @pvelesko による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
cmake
領域
build-system

調査の方向性

IGC/BiFModule/CMakeLists.txt:48 から始め、opencl-c.h の検索結果が get_filename_component にどのように渡されるかを確認します。両方のヘッダーを含む LLVM インストールで構成を再現し、構成が成功して有効な opencl-c.h のパスが選択されることを、もう一方のヘッダーの名前を変更せずに確認します。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C++
スター
725
フォーク
200
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

intel/intel-graphics-compiler のほかの issue

intel/intel-graphics-compiler の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。