Skip to content
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

Build errors on ubuntu 23.10 #311

Closed
hector-cao opened this issue Dec 12, 2023 · 4 comments
Closed

Build errors on ubuntu 23.10 #311

hector-cao opened this issue Dec 12, 2023 · 4 comments

Comments

@hector-cao
Copy link

hector-cao commented Dec 12, 2023

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 -jnproc

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

@hector-cao hector-cao changed the title Build error on Build errors on ubuntu 23.10 Dec 12, 2023
@pszymich
Copy link
Contributor

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.

@eero-t
Copy link

eero-t commented May 10, 2024

@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).

@eero-t
Copy link

eero-t commented Jul 22, 2024

@pszymich I think this can be closed:

  • Ubuntu does not support 23.10 any more
  • LLVM does not support mixing use of different LLVM versions (is not ABI/API compatible between them)

@pszymich
Copy link
Contributor

Closing after 3 months of no response from ticket reporter.

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

3 participants