Skip to content

CMake cannot find SPIRV-Tools.pc #29

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

Closed
godfrey-cw opened this issue Nov 14, 2018 · 10 comments
Closed

CMake cannot find SPIRV-Tools.pc #29

godfrey-cw opened this issue Nov 14, 2018 · 10 comments

Comments

@godfrey-cw
Copy link

Installation failed with the following message:

CMake Error at AdaptorOCL/SPIRV/SPIRV-Tools/cmake_install.cmake:50 (file):
  file INSTALL cannot find
  "/home/charles/intel_graphics_compiler/build/AdaptorOCL/SPIRV/SPIRV-Tools/SPIRV-Tools.pc".
Call Stack (most recent call first):
  cmake_install.cmake:132 (include)

When I open cmake_install.cmake and go to line 50 I see


 file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" TYPE FILE FILES
    "/home/charles/intel_graphics_compiler/build/AdaptorOCL/SPIRV/SPIRV-Tools/SPIRV-Tools.pc"
    "/home/charles/intel_graphics_compiler/build/AdaptorOCL/SPIRV/SPIRV-Tools/SPIRV-Tools-shared.pc"
    )

Then when I look for those .pc files they are indeed missing from the SPIRV-Tools directory.

@godfrey-cw
Copy link
Author

Just an update: I tried a fresh make/install and reproduced the same error.

@iwwu
Copy link
Contributor

iwwu commented Nov 15, 2018

Hi cgodfreyUW,

Can you try again using tag 'igc_release_2018-11-15' ? The build went fine for me, and I can't reproduce the reported issue.

@EricksonLu
Copy link

I used 'igc_release_2018-11-15', the same problem as cgodfreyUW encountered.

CMake Error at AdaptorOCL/SPIRV/SPIRV-Tools/cmake_install.cmake:45 (file):
  file INSTALL cannot find
  "/home/shan/Music/OpenCL_Open_Intel/build/AdaptorOCL/SPIRV/SPIRV-Tools/SPIRV-Tools.pc".
Call Stack (most recent call first):
  cmake_install.cmake:127 (include)

@iwwu
Copy link
Contributor

iwwu commented Nov 16, 2018

I tried the build again today in a fresh workarea on my ubuntu, but I still couldn't reproduce the issue.

I followed the exact steps as mentioned in the README, except igc folder.
$ git clone -b igc_release_2018-11-15 https://github.com/intel/intel-graphics-compiler igc

Can you please additional information, such as your system configuration or steps (if it's different) to assist our analysis? Thanks

@EricksonLu
Copy link

I enabled SKIP_SPIRV_TOOLS_INSTALL. So I can use "sudo make install".

@godfrey-cw
Copy link
Author

Sorry, I know this is lame/unhelpful but I ended up using the prebuilt packages from releases and they worked just fine - since everything is working now I probably won't build/install again.

@ruiling
Copy link

ruiling commented Nov 21, 2018

I met the same issue on Ubuntu 16.04 and I follow the same way as @EricksonLu. I have a quick look at IGC/AdaptorOCL/SPIRV/SPIRV-Tools/CMakeLists.txt. Line 254 through line 264 which was used to generate the SPIRV-Tools.pc were commented. And I didn't find the SPIRV-Tools.pc in the repo. And option ENABLE_SPIRV_TOOLS_INSTALL was set to ON by default. Am I missing something?

@georgeokelly
Copy link

my steps are like:

$ sudo apt-get install flex bison clang-4.0 libz-dev cmake
$ git clone -b release_40 https://github.com/llvm-mirror/clang clang_source
$ git clone https://github.com/intel/opencl-clang common_clang
$ git clone https://github.com/intel/llvm-patches llvm_patches
$ git clone -b release_40 https://github.com/llvm-mirror/llvm llvm_source
$ git clone -b release_70 https://github.com/llvm-mirror/llvm llvm7.0.0_source
$ git clone https://github.com/intel/intel-graphics-compiler igc
$ git clone https://github.com/KhronosGroup/OpenCL-Headers opencl_headers
$ mkdir build
$ cd build
$ cmake -DIGC_OPTION__OUTPUT_DIR=../igc-install/Release \
    -DCMAKE_BUILD_TYPE=Release -DIGC_OPTION__ARCHITECTURE_TARGET=Linux64 \
    ../igc/IGC
$ make -j`nproc`
$ sudo make install

then I got the same error.

CMake Error at AdaptorOCL/SPIRV/SPIRV-Tools/cmake_install.cmake:45 (file):
  file INSTALL cannot find
  "/home/glow/igc-w/build/AdaptorOCL/SPIRV/SPIRV-Tools/SPIRV-Tools.pc".
Call Stack (most recent call first):
  cmake_install.cmake:127 (include)
Makefile:104: recipe for target 'install' failed
make: *** [install] Error 1

I also tried with this instead of the original one:
$ git clone -b igc_release_2018-11-15 https://github.com/intel/intel-graphics-compiler igc
and I got

CMake Error at /home/glow/igc-workspace/llvm_patches/CMakeLists.txt:210 (message):
  Expected LLVM version 7.0.0 but found 4.0.0.
-- Configuring incomplete, errors occurred!

@iwwu

@iwwu
Copy link
Contributor

iwwu commented Dec 12, 2018

I was able to reproduce the error using older checkout. There is a recent fix on SPIRV-Tools Cmake file. I can no longer see the issue.

Please update to latest IGC repo or use 'igc_release_2018-12-12' or new tag

@iwwu
Copy link
Contributor

iwwu commented Dec 17, 2018

Closing the issue since the fix is already merged.

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

5 participants