doe300 / VC4CL

OpenCL implementation running on the VideoCore IV GPU of the Raspberry Pi models
MIT License
728 stars 80 forks source link

Failed to download dependencies when compiling VC4C #115

Closed Zenitur closed 1 year ago

Zenitur commented 1 year ago
pi@raspberrypi:~/opencl-vc4 $ cd VC4C
pi@raspberrypi:~/opencl-vc4/VC4C $ ls
check_all_files.sh  collect_coverage.sh  include    scripts  testing
cmake               doc                  LICENSE    src      tools
CMakeLists.txt      example              Readme.md  test
pi@raspberrypi:~/opencl-vc4/VC4C $ mkdir build && cd build
pi@raspberrypi:~/opencl-vc4/VC4C/build $ cmake ..
CMake Deprecation Warning at CMakeLists.txt:4 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- VC4CL standard library headers found: /home/pi/opencl-vc4/VC4C/../VC4CLStdLib/include/
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CMake 3.14+ FetchContent to include dependencies...
Scanning dependencies of target spirv-headers-populate
[ 11%] Creating directories for 'spirv-headers-populate'
[ 22%] Performing download step (git clone) for 'spirv-headers-populate'
Cloning in "spirv-headers-src"...
fatal: irregular link: master
CMake Error at spirv-headers-subbuild/spirv-headers-populate-prefix/tmp/spirv-headers-populate-gitclone.cmake:40 (message):
  Failed to checkout tag: 'master'

make[2]: *** [CMakeFiles/spirv-headers-populate.dir/build.make:92: spirv-headers-populate-prefix/src/spirv-headers-populate-stamp/spirv-headers-populate-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/spirv-headers-populate.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

CMake Error at /usr/share/cmake-3.16/Modules/FetchContent.cmake:915 (message):
  Build step for spirv-headers failed: 2
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate)
  /usr/share/cmake-3.16/Modules/FetchContent.cmake:1047 (FetchContent_Populate)
  cmake/spirv-headers.cmake:9 (FetchContent_MakeAvailable)
  CMakeLists.txt:110 (include)

-- Configuring incomplete, errors occurred!
See also "/home/pi/opencl-vc4/VC4C/build/CMakeFiles/CMakeOutput.log".
doe300 commented 1 year ago

Looks like the master branch in https://github.com/KhronosGroup/SPIRV-Headers was renamed to main. You should be able to fix this by adding GIT_TAG main to https://github.com/doe300/VC4C/blob/master/cmake/spirv-headers.cmake#L8, e.g. so that the line looks something like this:

FetchContent_Declare(SPIRV-Headers GIT_REPOSITORY https://github.com/KhronosGroup/SPIRV-Headers.git GIT_TAG main)
Zenitur commented 1 year ago

Yeah, that was a fix.

doe300 commented 1 year ago

Fixed by https://github.com/doe300/VC4C/pull/164