Closed hector-cao closed 1 month ago
Hi @hector-cao, this is most likely unrelated, but mixing LLVM versions (libllvmspirvlib-15
vs llvm-14
) won't work. Can you retry building using all components on version 14? We also don't fully support building against system LLVM; building from sources is the preferred option.
@hector-cao Please provide version of IGC you're building, as IGC has been building fine for me on 23.10.
mixing LLVM versions (libllvmspirvlib-15 vs llvm-14) won't work.
Yep. To build IGC on 23.10, I install following packages:
$ sudo apt install \
libc-dev libz-dev libpng-dev libboost-all-dev \
libnl-genl-3-dev ocl-icd-opencl-dev \
git ca-certificates gcc g++ \
pkg-config make cmake ninja-build \
flex bison patch swig python3-mako valgrind \
llvm-spirv-14 libllvmspirvlib-14-dev \
clang-14 llvm-14-dev liblld-14-dev libopencl-clang-14-dev
(Valgrind is for optional Valgrind annotations.)
We also don't fully support building against system LLVM; building from sources is the preferred option.
It has worked fine for me, as long as I make sure that everything is built with the same LLVM version (as LLVM changes ABI between versions).
@pszymich I think this can be closed:
Closing after 3 months of no response from ticket reporter.
OS
Ubuntu 23.10
Instructions:
sudo apt-get install -y flex bison libz-dev cmake
sudo apt-get install llvm-14 \ llvm-14-dev \ clang-14 \ liblld-16 \ liblld-16-dev \ libllvmspirvlib15 \ libllvmspirvlib-15-dev
sudo apt-get install -y libopencl-clang-14-dev
git clone https://github.com/intel/vc-intrinsics vc-intrinsics git clone https://github.com/KhronosGroup/SPIRV-Tools.git SPIRV-Tools git clone https://github.com/KhronosGroup/SPIRV-Headers.git SPIRV-Headers git clone https://github.com/intel/intel-graphics-compiler igc
mkdir build cd build cmake ../igc make -j
nproc
Error
intel-graphics-compiler/igc/IGC/../../inc/common/secure_mem.h:35:16: error: redefinition of ‘errno_t fopen_s(FILE, const char, const char)’ 35 | inline errno_t fopen_s( FILE pFile, const char filename, const char mode )
Note
There are also a bunch of similar errors for other functions in secure_mem.h and secure_string.h