Skip to content

Failure to build with LLVM15 #368

@Bidski

Description

@Bidski

Following the build instructions here fails to allow CMake to finish configuring the project.

Specifically, I perform the following actions

BUILD_FOLDER="/var/tmp/build"
mkdir -p "${BUILD_FOLDER}/build"

cd "${BUILD_FOLDER}"
git clone --branch v2.15.3 https://github.com/intel/intel-graphics-compiler igc
git clone https://github.com/intel/vc-intrinsics vc-intrinsics
git clone --branch llvmorg-15.0.7 https://github.com/llvm/llvm-project llvm-project
git clone --branch ocl-open-150 https://github.com/intel/opencl-clang llvm-project/llvm/projects/opencl-clang
git clone --branch llvm_release_150 https://github.com/KhronosGroup/SPIRV-LLVM-Translator llvm-project/llvm/projects/llvm-spirv
git clone https://github.com/KhronosGroup/SPIRV-Tools.git SPIRV-Tools
git clone https://github.com/KhronosGroup/SPIRV-Headers.git SPIRV-Headers

git config --global user.email "[email protected]"
git config --global user.name "Builder"

cd "${BUILD_FOLDER}/build"
cmake -S "${BUILD_FOLDER}/igc" \
      -B "${BUILD_FOLDER}/build" \
      -DCMAKE_BUILD_TYPE=Release \
      -Wno-dev

This produces the following output

-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at IGC/CMakeLists.txt:168 (message):
  IGC_OPTION__ARCHITECTURE_TARGET: Target architecture is not specified.
  Trying to deduce it from context.


CMake Warning at IGC/CMakeLists.txt:178 (message):
  IGC_OPTION__ARCHITECTURE_HOST: Host architecture is not specified.  Trying
  to deduce it from context.


-- ================================ IGC Project ================================
-- Build type:  Release (single-configuration generator)
-- Build tools: OFF
-- 
-- Output directory:
--    "/var/tmp/build/build/IGC/Release"
-- Install root directory:
--    "/usr/local"
-- Architecture:
--  - target: Linux64    (detected: Linux64)
--  - host:   Linux64    (detected: Linux64)
-- 
-- Cross-compilation needed: NO
-- Cross-compilation set:    TRUE
-- 
-- Advanced:
--  - Link BiF resources:              ON
--  - Building Windows Universal:      
-- =============================================================================
-- [IGC] IGC_OPTION__LLVM_INTERIM = OFF
-- [LLVM] Current value of CMAKE_CURRENT_SOURCE_DIR : /var/tmp/build/igc/IGC
-- [Clang] No mode was specified, searching for Clang
-- [Clang] No mode was specified and the default IGC Clang source dir not exist. Try take Clang from system
-- IGC_LLVM_SPIRV_PATHS: /var/tmp/build/igc/external/llvm/../../../SPIRV-LLVM-Translator_15.0.7;/var/tmp/build/igc/external/llvm/../../../../SPIRV-LLVM-Translator_15.0.7;/var/tmp/build/igc/external/llvm/../../../llvm-spirv;/var/tmp/build/igc/external/llvm/../../../../llvm-spirv
-- [SPIRV] Using default procedure to determine SPIRV mode
-- [SPIRV] No mode was specified for SPIRV. Clang is trying to be taken from the system, so the SPIRV translator not will be built from the source
-- [LLVM] Current value of CMAKE_CURRENT_SOURCE_DIR : /var/tmp/build/igc/IGC
-- [lld] No mode was specified, searching for lld
-- [LLVM] Current value of CMAKE_CURRENT_SOURCE_DIR : /var/tmp/build/igc/IGC
-- [LLVM] No LLVM mode was selected explicitly
-- [LLVM] Search will be performed for LLVM sources first, then for prebuilds (including system LLVM)
-- [IGC] IGC will take prebuilt LLVM
-- [IGC] Searching for prebuilt LLVM in /llvm_prebuilt_windows_15.0.7;/prebuild-llvm;/opt/intel-llvm-static-15.0.7 and system directories
CMake Error at IGC/cmake/igc_llvm.cmake:14 (find_package):
  Could not find a package configuration file provided by "LLVM" (requested
  version 15.0.7) with any of the following names:

    LLVMConfig.cmake
    llvm-config.cmake

  Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
  "LLVM_DIR" to a directory containing one of the above files.  If "LLVM"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  IGC/CMakeLists.txt:1394 (include)


-- Configuring incomplete, errors occurred!

Following #338, if I instead do this

cmake -S "${BUILD_FOLDER}/igc" \
      -B "${BUILD_FOLDER}/build" \
      -DCMAKE_POLICY_DEFAULT_CMP0002="OLD" \
      -DCMAKE_POLICY_DEFAULT_CMP0079="NEW" \
      -DIGC_OPTION__LLVM_MODE="Source" \
      -DIGC_OPTION__LLD_MODE="Source" \
      -DIGC_OPTION__CLANG_MODE="Source" \
      -DIGC_OPTION__SPIRV_TOOLS_MODE="Source" \
      -DIGC_OPTION__SPIRV_TRANSLATOR_MODE="Source" \
      -DDEFAULT_IGC_LLVM_SOURCES_DIR:PATH="${BUILD_FOLDER}/llvm-project" \
      -DDEFAULT_SPIRV_TRANSLATOR_SOURCE_DIR:PATH="${BUILD_FOLDER}/llvm-project/llvm/projects/llvm-spirv" \
      -DIGC_OPTION__CLANG_SOURCES_DIR:PATH="${BUILD_FOLDER}/llvm-project/clang" \
      -DIGC_OPTION__LLD_SOURCES_DIR:PATH="${BUILD_FOLDER}/llvm-project/lld" \
      -DIGC_OPTION__LLVM_SOURCES_DIR:PATH="${BUILD_FOLDER}/llvm-project" \
      -DIGC_OPTION__VC_INTRINSICS_SOURCES_DIR:PATH="${BUILD_FOLDER}/vc-intrinsics" \
      -DIGC_OPTION__lld_SOURCES_DIR:PATH="${BUILD_FOLDER}/llvm-project/lld" \
      -DSPIRV-Headers_SOURCE_DIR:PATH="${BUILD_FOLDER}/SPIRV-Headers" \
      -DSPIRV-Tools_SOURCE_DIR:PATH="${BUILD_FOLDER}/SPIRV-Tools" \
      -DCMAKE_BUILD_TYPE=Release \
      -Wno-dev

I instead get the following output.

-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at IGC/CMakeLists.txt:178 (message):
  IGC_OPTION__ARCHITECTURE_HOST: Host architecture is not specified.  Trying
  to deduce it from context.


-- ================================ IGC Project ================================
-- Build type:  Release (single-configuration generator)
-- Build tools: OFF
-- 
-- Output directory:
--    "/var/tmp/build/build/IGC/Release"
-- Install root directory:
--    "/usr/local"
-- Architecture:
--  - target: Linux64    (detected: Linux64)
--  - host:   Linux64    (detected: Linux64)
-- 
-- Cross-compilation needed: NO
-- Cross-compilation set:    TRUE
-- 
-- Advanced:
--  - Link BiF resources:              ON
--  - Building Windows Universal:      
-- =============================================================================
-- [IGC] IGC_OPTION__LLVM_INTERIM = OFF
-- [Clang] Clang will be built from sources
-- [Clang] Copying stock Clang sources /var/tmp/build/llvm-project/clang to /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/clang
-- IGC_LLVM_SPIRV_PATHS: /var/tmp/build/igc/external/llvm/../../../SPIRV-LLVM-Translator_15.0.7;/var/tmp/build/igc/external/llvm/../../../../SPIRV-LLVM-Translator_15.0.7;/var/tmp/build/igc/external/llvm/../../../llvm-spirv;/var/tmp/build/igc/external/llvm/../../../../llvm-spirv
-- [SPIRV] SPIRV translator will be built from sources
-- [SPIRV] Using SPIRV sources: /var/tmp/build/llvm-project/llvm/projects/llvm-spirv
-- [lld] lld will be built from sources
-- [lld] Copying stock lld sources /var/tmp/build/llvm-project/lld to /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/lld
-- [LLVM] Current value of CMAKE_CURRENT_SOURCE_DIR : /var/tmp/build/igc/IGC
-- [LLVM] LLVM will be built from sources
-- [LLVM] LLVM sources folder: /var/tmp/build/llvm-project
-- [LLVM] LLVM sources in stock version: OFF
-- Found Python3: /usr/local/bin/python3.12 (found version "3.12.6") found components: Interpreter
-- Found Patch: /usr/sbin/patch
-- [LLVM] : LLVM_SOURCE_URL   = /var/tmp/build/llvm-project
-- [LLVM] : LLVM_OPTIONS      = -DLLVM_TARGETS_TO_BUILD=;-DLLVM_INCLUDE_TOOLS=ON;-DLLVM_BUILD_TOOLS=OFF;-DLLVM_INCLUDE_UTILS=ON;-DLLVM_BUILD_UTILS=OFF;-DLLVM_INCLUDE_BENCHMARKS=OFF;-DLLVM_INCLUDE_EXAMPLES=OFF;-DLLVM_INCLUDE_TESTS=OFF;-DLLVM_APPEND_VC_REV=OFF;-DLLVM_ENABLE_THREADS=ON;-DLLVM_ENABLE_PIC=ON;-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF;-DLLVM_ENABLE_DUMP=ON;-DLLVM_ENABLE_TERMINFO=OFF;-DLLVM_ENABLE_EH=ON;-DLLVM_ENABLE_RTTI=ON;-DLLVM_ENABLE_EH=ON;-DLLVM_ENABLE_RTTI=ON;-DLLVM_BUILD_32_BITS=OFF;-DLLVM_EXTERNAL_PROJECTS=clang;spirv;lld;-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=/var/tmp/build/build/IGC/llvm-deps-15.0.7/src/clang;-DLLVM_EXTERNAL_SPIRV_SOURCE_DIR=/var/tmp/build/llvm-project/llvm/projects/llvm-spirv;-DLLVM_EXTERNAL_LLD_SOURCE_DIR=/var/tmp/build/build/IGC/llvm-deps-15.0.7/src/lld
-- [LLVM] : Copying stock LLVM sources /var/tmp/build/llvm-project to /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm
-- [LLVM] : Copying LLVM common CMake utils /var/tmp/build/llvm-project/cmake to /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/cmake
-- [LLVM] : Applying patches for LLVM from version 
Applying 15.0.0/patches_external/0001-SCEV-Cache-ZExt-SCEV-expressions.patch file
Applying 15.0.0/patches_external/0002-SCEV-Cache-ZExt-SCEV-expressions.patch file
Applying 15.0.0/patches_external/0003-SCEV-Cache-ZExt-SCEV-expressions.patch file
Applying 15.0.0/patches_external/0004-SCEV-Cache-ZExt-SCEV-expressions.patch file
Applying 15.0.0/patches_external/0005-SCEV-Cache-ZExt-SCEV-expressions.patch file
Applying 15.0.0/patches_external/Backport-When-creating-a-stack-space-for-inlined-byv.patch file
Applying 15.0.0/patches_external/Don-t-emit-bitreverse-or-bswap-intrinsics-of-illegal.patch file
Applying 15.0.0/patches_external/InstCombine-Only-fold-bitcast-fptrunc-if-destination.patch file
Applying 15.0.0/patches_external/LowerSwitch-RemoveUnreachableBBs.patch file
Applying 15.0.0/patches_external/Remove-too-strict-restrictions-in-LICM-pass.patch file
Applying 15.0.0/patches_external/alter-unroll-max-upperbound-command-line-option-value.patch file
Applying 15.0.0/patches_external/check-for-NaN-before-folding-select-for-FP.patch file
Applying 15.0.0/patches_external/fix_DebugTypeInfoRemoval-remap_eval-ambiguity.patch file
Applying 15.0.0/patches_external/make-getPreviousDefRecursive-iterative.patch file
Applying 15.0.0/patches_external/no-autoupgrader-igc-struct-typed-intrinsic.patch file
Applying 15.0.0/patches_external/no-extra-BBs-in-JumpThreading-pass.patch file
Applying 15.0.0/patches_external/no-instcombine-code-sinking.patch file
Applying 15.0.0/patches_external/unify-max-alignment-with-generic-max.patch file
-- [LLVM_PATCHER] : LLVM_BUILD_TYPE   = Release
-- [LLVM] Clearing build system compilation flags
-- [LLVM] PYTHON_EXECUTABLE = /usr/local/bin/python3.12
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/gcc
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sysexits.h
-- Looking for sysexits.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- 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 clock_gettime in rt
-- Looking for clock_gettime 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/local/lib/libz.so (found version "1.3.1")
-- Looking for compress2
-- Looking for compress2 - found
-- Found LibXml2: /usr/lib/libxml2.so (found version "2.13.4")
-- 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 xar_open in xar
-- Looking for xar_open in xar - not found
-- 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 setrlimit
-- Looking for setrlimit - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for futimens
-- Looking for futimens - found
-- Looking for futimes
-- Looking for futimes - found
-- Looking for sigaltstack
-- Looking for sigaltstack - found
-- Looking for lseek64
-- Looking for lseek64 - 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 getrlimit
-- Looking for getrlimit - 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
-- Looking for strerror - 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
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for dladdr
-- Looking for dladdr - not 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 __GLIBC__
-- Looking for __GLIBC__ - found
-- Looking for pthread_getname_np
-- Looking for pthread_getname_np - found
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - found
-- Looking for proc_pid_rusage
-- Looking for proc_pid_rusage - not found
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE - Success
-- 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
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Failed
-- Performing Test HAS_MAYBE_UNINITIALIZED
-- Performing Test HAS_MAYBE_UNINITIALIZED - Success
-- Native target X86 is not selected; lli will not JIT code
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- 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 host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- 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_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_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 C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG - Success
-- Performing Test CXX_SUPPORTS_REDUNDANT_MOVE_FLAG
-- Performing Test CXX_SUPPORTS_REDUNDANT_MOVE_FLAG - Success
-- Performing Test CXX_SUPPORTS_PESSIMIZING_MOVE_FLAG
-- Performing Test CXX_SUPPORTS_PESSIMIZING_MOVE_FLAG - Success
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG - Success
-- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR
-- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR - 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_STRING_CONVERSION_FLAG
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Failed
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Failed
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS
-- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS - Success
-- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS
-- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS - Success
-- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS
-- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS - Success
-- Performing Test C_SUPPORTS_FDATA_SECTIONS
-- Performing Test C_SUPPORTS_FDATA_SECTIONS - Success
-- Performing Test CXX_SUPPORTS_FDATA_SECTIONS
-- Performing Test CXX_SUPPORTS_FDATA_SECTIONS - Success
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - not found
-- Found Python3: /usr/local/bin/python3.12 (found suitable version "3.12.6", minimum required is "3.0") found components: Interpreter
-- Linker detection: GNU ld
-- Setting native build dir to /var/tmp/build/build/IGC/llvm-deps-15.0.7/build/src/NATIVE
-- 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/sbin/git (found version "2.46.2")
-- Found PkgConfig: /usr/sbin/pkg-config (found version "2.1.1")
-- SPIR-V Headers location is not specified. Will try to download
          spirv.hpp from https://github.com/KhronosGroup/SPIRV-Headers into
          /var/tmp/build/build/IGC/llvm-deps-15.0.7/build/src/projects/llvm-spirv/SPIRV-Headers
-- Checking for one of the modules 'SPIRV-Tools'
-- SPIRV-Tools not found; project will be built without --spirv-tools-dis support.
-- [OPENCL-CLANG] Using Clang source code direcotry: /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/clang
-- [OPENCL-CLANG] Using SPIRV-LLVM-Translator source code directory: /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/projects/llvm-spirv
-- APPLY_PATCHES is enabled.
-- [OPENCL-CLANG] Patching repository /var/tmp/build/build/IGC/llvm-deps-15.0.7/src
-- [OPENCL-CLANG] Validating release/15.x in repository
fatal: ambiguous argument 'release/15.x': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
-- [OPENCL-CLANG] ref release/15.x not exists in repository, using current HEAD:8dfdcc7b7bf66834a761bd8de445840ef68e4d1a
-- [OPENCL-CLANG] Switched to a new branch 'ocl-open-150' which starts from ref : 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a
-- [OPENCL-CLANG] Checking if patch 1ca45b5f5725a447ded14c0096df39f2751c4e9a is present in repository
fatal: Not a valid commit name 1ca45b5f5725a447ded14c0096df39f2751c4e9a
-- [OPENCL-CLANG] Not present - Applying: Remove __IMAGE_SUPPORT__ macro for SPIR

-- [OPENCL-CLANG] Checking if patch 9780cc0e044c73dcd549c67a1278a4ff7daf3b01 is present in repository
fatal: Not a valid commit name 9780cc0e044c73dcd549c67a1278a4ff7daf3b01
-- [OPENCL-CLANG] Not present - Applying: Remove wrong check of __opencl_c_images feature macro

-- [OPENCL-CLANG] Checking if patch bb5e22800857f7dda9a2491a4f2fc7387d4205b0 is present in repository
fatal: Not a valid commit name bb5e22800857f7dda9a2491a4f2fc7387d4205b0
-- [OPENCL-CLANG] Not present - Applying: Fix checking mechanism for read_write Image type

-- [OPENCL-CLANG] Checking if patch a60b8f468119065f8a6cb4a16598263cb00de0b5 is present in repository
-- [OPENCL-CLANG] Not present - Applying: Allow undefining header-only features

-- [OPENCL-CLANG] Checking if patch 62267fec4a0d74472bc64695597f2477cc8c11df is present in repository
fatal: Not a valid commit name 62267fec4a0d74472bc64695597f2477cc8c11df
-- [OPENCL-CLANG] Not present - Applying: Enable use of GNU C extension - const statement expression as array size

-- [OPENCL-CLANG] Applied patch successfully!
-- [OPENCL-CLANG] No patches in /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/projects/opencl-clang/patches/spirv
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Clang version: 15.0.7
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed
-- Looking for include file sys/inotify.h
-- Looking for include file sys/inotify.h - found
-- Not building amdgpu-arch: hsa-runtime64 not found
-- LLD version: 15.0.7
-- SPIR-V Headers location is not specified. Will try to download
          spirv.hpp from https://github.com/KhronosGroup/SPIRV-Headers into
          /var/tmp/build/build/IGC/llvm-deps-15.0.7/build/src/tools/spirv/SPIRV-Headers
-- Checking for one of the modules 'SPIRV-Tools'
-- SPIRV-Tools not found; project will be built without --spirv-tools-dis support.
CMake Error at /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/cmake/modules/AddLLVM.cmake:559 (add_library):
  add_library cannot create target "LLVMSPIRVLib" because another target with
  the same name already exists.  The existing target is a static library
  created in source directory
  "/var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/projects/llvm-spirv/lib/SPIRV".
  See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/cmake/modules/AddLLVM.cmake:819 (llvm_add_library)
  /var/tmp/build/llvm-project/llvm/projects/llvm-spirv/lib/SPIRV/CMakeLists.txt:1 (add_llvm_library)


CMake Error at /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/cmake/modules/AddLLVM.cmake:735 (add_custom_target):
  add_custom_target cannot create target "install-LLVMSPIRVLib" because
  another target with the same name already exists.  The existing target is a
  custom target created in source directory
  "/var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/projects/llvm-spirv/lib/SPIRV".
  See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/cmake/modules/AddLLVM.cmake:853 (add_llvm_install_targets)
  /var/tmp/build/llvm-project/llvm/projects/llvm-spirv/lib/SPIRV/CMakeLists.txt:1 (add_llvm_library)


CMake Error at /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/cmake/modules/AddLLVM.cmake:931 (add_executable):
  add_executable cannot create target "llvm-spirv" because another target
  with the same name already exists.  The existing target is an executable
  created in source directory
  "/var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/projects/llvm-spirv/tools/llvm-spirv".
  See documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/cmake/modules/AddLLVM.cmake:1297 (add_llvm_executable)
  /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/llvm/cmake/modules/AddLLVM.cmake:1322 (llvm_add_tool)
  /var/tmp/build/llvm-project/llvm/projects/llvm-spirv/tools/llvm-spirv/CMakeLists.txt:12 (add_llvm_tool)


-- [SPIRV] Translator is built with LLVM
OPT OpaquePtrs Status: -opaque-pointers=0
Clang OpaquePtrs Status: -no-opaque-pointers
-- [lld] option = ON
-- [lldELF] from sources: ON
-- [lldELF] include dir: /var/tmp/build/build/IGC/llvm-deps-15.0.7/src/lld/ELF/../include
-- [IGC] Using LLVMSPIRVLib that comes with LLVM
CMake Warning at IGC/cmake/igc_find_protobuf.cmake:25 (message):
  Cannot find Protoc program or library for Protobuf, please visit
  https://github.com/protocolbuffers/protobuf/releases and install - disable
  of IGC Metrics
Call Stack (most recent call first):
  IGC/CMakeLists.txt:1537 (include)


-- ============================ SPIRV-Tools project ============================
-- [SPIRV-Tools] : IGC_OPTION__SPIRV_TOOLS_MODE set to Source
-- [SPIRV-Tools] : IGC_OPTION__USE_PREINSTALLED_SPRIV_HEADERS set to OFF
-- [SPIRV-Tools] : Building from source
-- [SPIRV-Tools] : Current source dir: /var/tmp/build/igc/IGC
-- SPIRV-Tools source directory: /var/tmp/build/igc/IGC/../../SPIRV-Tools
-- SPIRV-Headers source directory: /var/tmp/build/igc/IGC/../../SPIRV-Headers
-- SPIRV-Tools output directory: /var/tmp/build/build/IGC/Release/external/SPIRV-Tools/build
-- Option SKIP_SPIRV_TOOLS_INSTALL: ON
-- Option SPIRV_SKIP_TESTS: ON
-- Option SPIRV_SKIP_EXECUTABLES: ON
-- Option SPIRV_HEADERS_SKIP_INSTALL: ON
-- Option SPIRV_HEADERS_SKIP_EXAMPLES: ON
-- Found Python3: /usr/local/bin/python3.12 (found version "3.12.6") found components: Interpreter
-- =============================================================================
Prebuild OpenCL Clang Linux Path: prebuild-opencl-clang-linux/linux//
-- [IGC] : opencl-clang will be taken from sources
-- [IGC] : opencl-clang will be taken from sources
-- [CMFE] CM Frontend headers are taken from: /var/tmp/build/igc/IGC/CMFE/AdaptorCM
-- [CMFE] Using CMFE library name: libclangFEWrapper.so
[IGC\BiFModuleCache] - IGC_BUILD__BIF_ROOT_DIR: /var/tmp/build/build/IGC/Release/bif/
[IGC\BiFModuleCache] - Looking for files inside /var/tmp/build/igc/IGC/BiFModule/cmake/../
[IGC\BiFModuleCache] - BiFModule_SRC: /var/tmp/build/igc/IGC/BiFModule/cmake/../
-- +++ Source/IGC/VectorCompiler +++
-- [VC] Build proj: VectorCompiler
-- [VC] Using vc-intrinsics source from: /var/tmp/build/igc/IGC/VectorCompiler/../../../vc-intrinsics/GenXIntrinsics
vc_build_bif - VCBiFPrintfOCL32 has extra dependencies: /var/tmp/build/igc/IGC/VectorCompiler/lib/BiF/Print/common.h
vc_build_bif - VCBiFPrintfOCL32 has extra dependencies: /var/tmp/build/igc/IGC/VectorCompiler/lib/BiF/Print/common.h
vc_build_bif - VCBiFPrintfOCL64 has extra dependencies: /var/tmp/build/igc/IGC/VectorCompiler/lib/BiF/Print/common.h
vc_build_bif - VCBiFPrintfOCL64 has extra dependencies: /var/tmp/build/igc/IGC/VectorCompiler/lib/BiF/Print/common.h
vc_build_bif - VCBiFPrintfZE32 has extra dependencies: /var/tmp/build/igc/IGC/VectorCompiler/lib/BiF/Print/common.h
vc_build_bif - VCBiFPrintfZE32 has extra dependencies: /var/tmp/build/igc/IGC/VectorCompiler/lib/BiF/Print/common.h
vc_build_bif - VCBiFPrintfZE64 has extra dependencies: /var/tmp/build/igc/IGC/VectorCompiler/lib/BiF/Print/common.h
vc_build_bif - VCBiFPrintfZE64 has extra dependencies: /var/tmp/build/igc/IGC/VectorCompiler/lib/BiF/Print/common.h
-- IGC\Metrics - metrics are disabled
-- Configuring Intel Gen Assembler (IGA) Component
--  - GED_BRANCH:           GED_external
--  - CMAKE_CXX_COMPILER:   /usr/bin/g++
--  - IGA_VERSION_SUFFIX:    -a58477b8e
-- Found BISON: /usr/sbin/bison (found version "3.8.2")
-- Found FLEX: /usr/sbin/flex (found version "2.6.4")
-- Configuring incomplete, errors occurred!

What is the correct way to build this project?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions