clvk icon indicating copy to clipboard operation
clvk copied to clipboard

Compilation fails with the given instructions because the referenced clspv produces a compilation error related to the fixupSqrt function call.

Open doruktiktiklar opened this issue 5 months ago • 0 comments

Trying to compile according to the documentation gives a compilation error

 [ 2025-08-16 21:21:42 u0@archlinux /mnt/sdcard0/external_code/clvk1 ]
$git clone --recurse-submodules https://github.com/kpet/clvk
Cloning into 'clvk'...
remote: Enumerating objects: 5069, done.
remote: Counting objects: 100% (1426/1426), done.
remote: Compressing objects: 100% (209/209), done.
remote: Total 5069 (delta 1347), reused 1229 (delta 1217), pack-reused 3643 (from 1)
Receiving objects: 100% (5069/5069), 1.97 MiB | 6.08 MiB/s, done.
Resolving deltas: 100% (3724/3724), done.
Submodule 'opencl-headers' (https://github.com/KhronosGroup/OpenCL-Headers.git) registered for path 'external/OpenCL-Headers'
Submodule 'spirv-headers' (https://github.com/KhronosGroup/SPIRV-Headers.git) registered for path 'external/SPIRV-Headers'
Submodule 'spirv-llvm-translator' (https://github.com/KhronosGroup/SPIRV-LLVM-Translator) registered for path 'external/SPIRV-LLVM-Translator'
Submodule 'spirv-tools' (https://github.com/KhronosGroup/SPIRV-Tools.git) registered for path 'external/SPIRV-Tools'
Submodule 'clspv' (https://github.com/google/clspv.git) registered for path 'external/clspv'
Cloning into '/mnt/sdcard0/external_code/clvk1/clvk/external/OpenCL-Headers'...
remote: Enumerating objects: 1519, done.
remote: Counting objects: 100% (369/369), done.
remote: Compressing objects: 100% (175/175), done.
remote: Total 1519 (delta 308), reused 198 (delta 194), pack-reused 1150 (from 3)
Receiving objects: 100% (1519/1519), 896.34 KiB | 4.17 MiB/s, done.
Resolving deltas: 100% (973/973), done.
Cloning into '/mnt/sdcard0/external_code/clvk1/clvk/external/SPIRV-Headers'...
remote: Enumerating objects: 5833, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 5833 (delta 15), reused 7 (delta 7), pack-reused 5814 (from 2)
Receiving objects: 100% (5833/5833), 3.66 MiB | 8.48 MiB/s, done.
Resolving deltas: 100% (4122/4122), done.
Cloning into '/mnt/sdcard0/external_code/clvk1/clvk/external/SPIRV-LLVM-Translator'...
remote: Enumerating objects: 44074, done.
remote: Counting objects: 100% (726/726), done.
remote: Compressing objects: 100% (330/330), done.
remote: Total 44074 (delta 628), reused 398 (delta 393), pack-reused 43348 (from 4)
Receiving objects: 100% (44074/44074), 20.84 MiB | 12.01 MiB/s, done.
Resolving deltas: 100% (32366/32366), done.
Cloning into '/mnt/sdcard0/external_code/clvk1/clvk/external/SPIRV-Tools'...
remote: Enumerating objects: 44085, done.
remote: Counting objects: 100% (80/80), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 44085 (delta 44), reused 26 (delta 26), pack-reused 44005 (from 2)
Receiving objects: 100% (44085/44085), 27.48 MiB | 12.24 MiB/s, done.
Resolving deltas: 100% (35265/35265), done.
Cloning into '/mnt/sdcard0/external_code/clvk1/clvk/external/clspv'...
remote: Enumerating objects: 25980, done.
remote: Counting objects: 100% (212/212), done.
remote: Compressing objects: 100% (100/100), done.
remote: Total 25980 (delta 153), reused 116 (delta 109), pack-reused 25768 (from 4)
Receiving objects: 100% (25980/25980), 11.63 MiB | 10.78 MiB/s, done.
Resolving deltas: 100% (22000/22000), done.
Submodule path 'external/OpenCL-Headers': checked out '8a97ebc88daa3495d6f57ec10bb515224400186f'
Submodule path 'external/SPIRV-Headers': checked out 'c8ad050fcb29e42a2f57d9f59e97488f465c436d'
Submodule path 'external/SPIRV-LLVM-Translator': checked out '1be936678fd8bbeb224470eedbd19d78a833beb7'
Submodule path 'external/SPIRV-Tools': checked out '257a227fbadf8176ea386c7d8fb9b889cbf08640'
Submodule path 'external/clspv': checked out '4b3a05ffe285c3a27de30e152b08241e33737cba'
 [ 2025-08-16 21:22:08 u0@archlinux /mnt/sdcard0/external_code/clvk1 ]
$cd clvk/
 [ 2025-08-16 21:22:34 u0@archlinux /mnt/sdcard0/external_code/clvk1/clvk ]
$python3 ./external/clspv/utils/fetch_sources.py --deps llvm
Change directory to .
Get llvm

In /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm: ['git', 'clone', 'https://github.com/llvm/llvm-project', '.']
Cloning into '.'...
remote: Enumerating objects: 6706763, done.
remote: Counting objects: 100% (423/423), done.
remote: Compressing objects: 100% (263/263), done.
remote: Total 6706763 (delta 249), reused 160 (delta 160), pack-reused 6706340 (from 4)
Receiving objects: 100% (6706763/6706763), 2.35 GiB | 12.57 MiB/s, done.
Resolving deltas: 100% (5553594/5553594), done.
Updating files: 100% (161589/161589), done.
b''
In /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm: ['git', 'remote', 'add', 'deps', 'https://github.com/llvm/llvm-project']
b''
2c440232e261746970cdf6f74d6588464eecd48b
In /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm: ['git', 'checkout', '2c440232e261746970cdf6f74d6588464eecd48b']
Updating files: 100% (22150/22150), done.
Note: switching to '2c440232e261746970cdf6f74d6588464eecd48b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 2c440232e261 [bazel][libc] Add missing deps after 51689c9df2fbb81aab1ff802f3efb86cac926853
b''
 [ 2025-08-16 21:32:39 u0@archlinux /mnt/sdcard0/external_code/clvk1/clvk ]
$mkdir build
 [ 2025-08-16 21:33:12 u0@archlinux /mnt/sdcard0/external_code/clvk1/clvk ]
$cd build/
 [ 2025-08-16 21:33:14 u0@archlinux /mnt/sdcard0/external_code/clvk1/clvk/build ]
$cmake -G "Ninja" ../
CMake Deprecation Warning at CMakeLists.txt:15 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is GNU 15.1.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type: RelWithDebInfo
-- Assertions: OFF
-- Performing Test COMPILER_SUPPORTS_COLOR_DIAGNOSTICS
-- Performing Test COMPILER_SUPPORTS_COLOR_DIAGNOSTICS - Success
-- The C compiler identification is GNU 15.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python3: /usr/bin/python3.13 (found version "3.13.5") found components: Interpreter
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
CMake Warning at external/clspv/third_party/llvm/llvm/CMakeLists.txt:208 (message):
  Using LLVM_ENABLE_PROJECTS=libclc is deprecated now, and will become a
  fatal error in the LLVM 21 release.  Please use
  -DLLVM_ENABLE_RUNTIMES=libclc or see the instructions at
  https://libclc.llvm.org/ for building the runtimes.


-- bolt project is disabled
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libclc project is enabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- polly project is disabled
-- pstl project is disabled
-- flang project is disabled
-- libc project is disabled
-- Found Python3: /usr/bin/python3.13 (found suitable version "3.13.5", minimum required is "3.8") found components: Interpreter
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Performing Test HAVE_BUILTIN_THREAD_POINTER
-- Performing Test HAVE_BUILTIN_THREAD_POINTER - Success
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Looking for linux/magic.h
-- Looking for linux/magic.h - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for pthread_rwlock_init in pthread
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for pthread_mutex_lock in pthread
-- Looking for pthread_mutex_lock in pthread - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for shm_open in rt
-- Looking for shm_open in rt - found
-- Looking for pfm_initialize in pfm
-- Looking for pfm_initialize in pfm - not found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/libz.so (found version "1.3.1")
-- Looking for compress2
-- Looking for compress2 - found
-- Found LibXml2: /usr/lib/libxml2.so (found version "2.14.5")
-- Looking for xmlReadMemory
-- Looking for xmlReadMemory - found
-- Looking for histedit.h
-- Looking for histedit.h - found
-- Found LibEdit: /usr/include (found version "2.11")
-- Looking for arc4random
-- Looking for arc4random - found
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Looking for __register_frame
-- Looking for __register_frame - found
-- Looking for __deregister_frame
-- Looking for __deregister_frame - found
-- Looking for __unw_add_dynamic_fde
-- Looking for __unw_add_dynamic_fde - not found
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - found
-- Looking for getpagesize
-- Looking for getpagesize - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for futimens
-- Looking for futimens - found
-- Looking for futimes
-- Looking for futimes - found
-- Looking for getauxval
-- Looking for getauxval - found
-- Looking for sigaltstack
-- Looking for sigaltstack - found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - found
-- Looking for mallinfo2
-- Looking for mallinfo2 - found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - not found
-- Looking for posix_spawn
-- Looking for posix_spawn - found
-- Looking for pread
-- Looking for pread - found
-- Looking for sbrk
-- Looking for sbrk - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for strerror_s
-- Looking for strerror_s - not found
-- Looking for setenv
-- Looking for setenv - found
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Success
-- Looking for pthread_getname_np
-- Looking for pthread_getname_np - found
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - found
-- Looking for pthread_get_name_np
-- Looking for pthread_get_name_np - not found
-- Looking for pthread_set_name_np
-- Looking for pthread_set_name_np - not found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for proc_pid_rusage
-- Looking for proc_pid_rusage - not found
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- LLVM host triple: x86_64-unknown-linux-gnu
-- Native target X86 is not selected; lli will not JIT code
-- Threads enabled.
-- Doxygen disabled.
-- Ninja version: 1.12.1
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Found Python module yaml
-- LLVM default target triple:
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Success
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Success
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test C_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG
-- Performing Test C_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG - Failed
-- Performing Test CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG
-- Performing Test CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG - Failed
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Failed
-- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
-- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Failed
-- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
-- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Failed
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - not found
-- Linker detection: GNU ld
-- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS
-- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS - Success
-- Performing Test HAS_WERROR_GLOBAL_CTORS
-- Performing Test HAS_WERROR_GLOBAL_CTORS - Failed
-- Looking for __x86_64__
-- Looking for __x86_64__ - found
-- Found Git: /usr/bin/git (found version "2.50.1")
-- Looking for logf128
-- Looking for logf128 - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for dladdr
-- Looking for dladdr - found
-- Clang version: 21.0.0git
-- Looking for include file sys/inotify.h
-- Looking for include file sys/inotify.h - found
-- Performing Test HAVE_LINKER_FLAG_LONG_PLT
-- Performing Test HAVE_LINKER_FLAG_LONG_PLT - Failed
-- Found Perl: /usr/bin/perl (found version "5.42.0")
-- Found Python3: /usr/bin/python3.13 (found version "3.13.5") found components: Interpreter
-- libclc target 'amdgcn--' is enabled
--   device: tahiti ( pitcairn;verde;oland;hainan;bonaire;kabini;kaveri;hawaii;mullins;tonga;tongapro;iceland;carrizo;fiji;stoney;polaris10;polaris11;gfx602;gfx705;gfx805;gfx900;gfx902;gfx904;gfx906;gfx908;gfx909;gfx90a;gfx90c;gfx942;gfx950;gfx1010;gfx1011;gfx1012;gfx1013;gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201 )
-- libclc target 'amdgcn--amdhsa' is enabled
--   device: none (  )
-- libclc target 'amdgcn-mesa-mesa3d' is enabled
--   device: tahiti ( pitcairn;verde;oland;hainan;bonaire;kabini;kaveri;hawaii;mullins;tonga;tongapro;iceland;carrizo;fiji;stoney;polaris10;polaris11;gfx602;gfx705;gfx805;gfx900;gfx902;gfx904;gfx906;gfx908;gfx909;gfx90a;gfx90c;gfx942;gfx950;gfx1010;gfx1011;gfx1012;gfx1013;gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201 )
-- libclc target 'clspv--' is enabled
--   device: none (  )
-- libclc target 'clspv64--' is enabled
--   device: none (  )
-- libclc target 'nvptx--' is enabled
--   device: none (  )
-- libclc target 'nvptx--nvidiacl' is enabled
--   device: none (  )
-- libclc target 'nvptx64--' is enabled
--   device: none (  )
-- libclc target 'nvptx64--nvidiacl' is enabled
--   device: none (  )
-- libclc target 'r600--' is enabled
--   device: cedar ( palm;sumo;sumo2;redwood;juniper )
--   device: cypress ( hemlock )
--   device: barts ( turks;caicos )
--   device: cayman ( aruba )
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
-- LLVM FileCheck Found: /usr/bin/FileCheck
-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Looking for shm_open in rt
-- Looking for shm_open in rt - found
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST
-- Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST - Success
-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE
-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS
-- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Compiling and running to test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Compiling and running to test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Compiling and running to test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Compiling and running to test HAVE_PTHREAD_AFFINITY
-- Performing Test HAVE_PTHREAD_AFFINITY -- success
-- Building with -fPIC
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.5.1")
-- Using SPIR-V Headers from
          /mnt/sdcard0/external_code/clvk1/clvk/external/SPIRV-Headers
-- Found zstd: /usr/lib/libzstd.so
-- Building with -fPIC
-- Found LLVM: 21.0.0git
-- Checking for one of the modules 'SPIRV-Tools'
-- CLVK_VULKAN_IMPLEMENTATION = system
-- Found Vulkan: /lib/libvulkan.so (found version "1.4.321") found components: glslc glslangValidator
-- Vulkan_INCLUDE_DIRS = '/usr/include'
-- Vulkan_LIBRARIES = '/lib/libvulkan.so'
CMake Deprecation Warning at tests/CMakeLists.txt:15 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Configuring done (23.0s)
-- Generating done (15.9s)
-- Build files have been written to: /mnt/sdcard0/external_code/clvk1/clvk/build
 [ 2025-08-16 21:34:13 u0@archlinux /mnt/sdcard0/external_code/clvk1/clvk/build ]
$git log
commit 8cd638b3c7c0827aa50d0c805b8e853dd7cc8945 (HEAD -> main, origin/main, origin/HEAD)
Author: Romaric Jodin <[email protected]>
Date:   Sun Aug 3 17:35:53 2025 +0200

    fix do_build_inner when compiling a program twice (#797)

    test_compiler get_linked_program_info_kernel_names is failing because
    the test tries to compile the same program twice with different build
    option (changing a define).

    The second time, clvk tries to compile it with `-x ir` because
    `m_binary_type == CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT`, which leads
    to trying to compile a CL source interpret as a IR source.

commit 40ff4ff8f7878e00d0a59747223e9ffada19edc6
Author: Kévin Petit <[email protected]>
Date:   Mon Jul 14 09:16:13 2025 +0100

    Update deps and CTS (#798)

    Change-Id: I40683aaf2d281db20bd7a544932abf3b5b06c329

commit 061c0591fd7e6d1f775cedacb6b9c774a5da676e
Author: Xueliang Zhong <[email protected]>
Date:   Mon Jul 14 09:13:00 2025 +0100

    Add support for cl_khr_subgroup_shuffle extension (#792)

    This patch enables the cl_khr_subgroup_shuffle extension.


    Change-Id: I52036b4c3fe444afc23b1a3464f997865c534aba

    Signed-off-by: Xueliang Zhong <[email protected]>

commit 826402c25dc716f9b06cc52cff4a1298830af97f
Author: Romaric Jodin <[email protected]>
Date:   Thu Jul 3 08:56:36 2025 +0200

    update cmake to build clvk with perfetto with Android build system (#794)

    Building clvk with perfetto within Android build system does not rely
    at all on the perfetto SDK.

commit 00ecae9c3d165fee9ed0a4a8c9266283c7fac0a9
 [ 2025-08-16 23:22:40 u0@archlinux /mnt/sdcard0/external_code/clvk1/clvk/build ]
$

after the cmake configuration steps above, the actual build with the ninja -j5 command gives the following error

/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/ClusterConstants.cpp:183:75: warning: ‘llvm::Instruction* llvm::BasicBlock::getFirstNonPHI()’ is deprecated: Use iterators as instruction positions instead [-Wdeprecated-declarations]
  183 |               auto InsertBefore = phi->getIncomingBlock(i)->getFirstNonPHI();
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/llvm/include/llvm/IR/Function.h:27,
                 from /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/llvm/include/llvm/IR/InstrTypes.h:28:
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/llvm/include/llvm/IR/BasicBlock.h:284:61: note: declared here
  284 |                            "getFirstNonPHIIt") Instruction *getFirstNonPHI();
      |                                                             ^~~~~~~~~~~~~~
[3062/3825] Building CXX object external/clspv/lib/CMakeFiles/clspv_passes.dir/FixupBuiltinsPass.cpp.o
FAILED: external/clspv/lib/CMakeFiles/clspv_passes.dir/FixupBuiltinsPass.cpp.o
/usr/bin/c++ -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/mnt/sdcard0/external_code/clvk1/clvk/external/OpenCL-Headers -I/mnt/sdcard0/external_code/clvk1/clvk/external/SPIRV-Headers/include -I/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/llvm/include -I/mnt/sdcard0/external_code/clvk1/clvk/build/external/clspv/third_party/llvm/include -I/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/clang/include -I/mnt/sdcard0/external_code/clvk1/clvk/build/external/clspv/third_party/llvm/tools/clang/include -I/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/include -I/mnt/sdcard0/external_code/clvk1/clvk/build/external/clspv/include -fdiagnostics-color -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -Werror=unused-variable -Werror=switch -O2 -g -DNDEBUG -fPIC -Wno-noexcept-type -MD -MT external/clspv/lib/CMakeFiles/clspv_passes.dir/FixupBuiltinsPass.cpp.o -MF external/clspv/lib/CMakeFiles/clspv_passes.dir/FixupBuiltinsPass.cpp.o.d -o external/clspv/lib/CMakeFiles/clspv_passes.dir/FixupBuiltinsPass.cpp.o -c /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupBuiltinsPass.cpp
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupBuiltinsPass.cpp: In member function ‘bool clspv::FixupBuiltinsPass::runOnFunction(llvm::Function&)’:
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupBuiltinsPass.cpp:48:21: error: cannot convert ‘<unresolved overloaded function type>’ to ‘double (*)(double)’
   48 |     return fixupSqrt(F, rsqrt);
      |            ~~~~~~~~~^~~~~~~~~~
In file included from /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupBuiltinsPass.cpp:20:
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupBuiltinsPass.h:33:46: note: initializing argument 2 of ‘bool clspv::FixupBuiltinsPass::fixupSqrt(llvm::Function&, double (*)(double))’
   33 |   bool fixupSqrt(llvm::Function &F, double (*fct)(double));
      |                                     ~~~~~~~~~^~~~~~~~~~~~
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupBuiltinsPass.cpp: At global scope:
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupBuiltinsPass.cpp:31:8: warning: ‘double {anonymous}::rsqrt(double)’ defined but not used [-Wunused-function]
   31 | double rsqrt(double input) { return 1.0 / sqrt(input); }
      |        ^~~~~
[3063/3825] Building CXX object external/clspv/lib/CMakeFiles/clspv_passes.dir/FixupStructuredCFGPass.cpp.o
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupStructuredCFGPass.cpp: In member function ‘void clspv::FixupStructuredCFGPass::isolateConvergentLatch(llvm::Function&, llvm::FunctionAnalysisManager&)’:
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupStructuredCFGPass.cpp:157:65: warning: ‘llvm::Instruction* llvm::BasicBlock::getFirstNonPHI()’ is deprecated: Use iterators as instruction positions instead [-Wdeprecated-declarations]
  157 |       for (auto iter = BB->begin(); &*iter != BB->getFirstNonPHI(); ++iter) {
      |                                               ~~~~~~~~~~~~~~~~~~^~
In file included from /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/llvm/include/llvm/IR/CFG.h:25,
                 from /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/llvm/include/llvm/IR/Instructions.h:26,
                 from /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/llvm/include/llvm/Analysis/LoopInfo.h:17,
                 from /mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupStructuredCFGPass.cpp:16:
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/llvm/include/llvm/IR/BasicBlock.h:284:61: note: declared here
  284 |                            "getFirstNonPHIIt") Instruction *getFirstNonPHI();
      |                                                             ^~~~~~~~~~~~~~
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupStructuredCFGPass.cpp: In member function ‘void clspv::FixupStructuredCFGPass::isolateContinue(llvm::Function&, llvm::FunctionAnalysisManager&)’:
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/lib/FixupStructuredCFGPass.cpp:250:52: warning: ‘llvm::Instruction* llvm::BasicBlock::getFirstNonPHI()’ is deprecated: Use iterators as instruction positions instead [-Wdeprecated-declarations]
  250 |                &*iter != exit_block->getFirstNonPHI(); ++iter) {
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/mnt/sdcard0/external_code/clvk1/clvk/external/clspv/third_party/llvm/llvm/include/llvm/IR/BasicBlock.h:284:61: note: declared here
  284 |                            "getFirstNonPHIIt") Instruction *getFirstNonPHI();
      |                                                             ^~~~~~~~~~~~~~
[3066/3825] Linking CXX executable external/clspv/third_party/llvm/bin/clang-21
ninja: build stopped: subcommand failed.

Using the clspv commit id 145d9988ebb792c3ed7d535fbe7ce79a8455e1b2 which was released at Sun Aug 10 00:26:20 2025 +0200 and using the SPIRV-LLVM-Translator commit id 09b8df81efc33dbff2c4f34977149a772014b19c which was released at Thu Aug 14 19:56:19 2025 +0530 fixes the problem

doruktiktiklar avatar Aug 16 '25 20:08 doruktiktiklar