intel / compute-runtime

Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver
MIT License
1.1k stars 229 forks source link

build error with gcc13 #669

Closed tjaalton closed 9 months ago

tjaalton commented 11 months ago

Building with current Debian unstable (which defaults to gcc13) fails:

/usr/include/c++/13/bits/stl_algobase.h:398:11: error: ‘*(unsigned char (*)[7])((char*)&<unnamed> + offsetof(NEO::ArgDescValue, NEO::ArgDescValue::elements.StackVec<NEO::ArgDescValue::Element, 1, unsigned char>::onStackMemRawBytes[0]))’ may be used uninitialized [-Werror=maybe-uninitialized]
  398 |         { *__to = *__from; }
      |           ^

etc

build.txt

k1gen commented 10 months ago

same, can't compile on Arch with gcc13: https://paste.rs/G3Jhh.txt

alheinecke commented 10 months ago

have similar issues on Fedora 38 with default system compiler

matthew-olson-intel commented 10 months ago

I get the same error using GCC 13 on Arch Linux.

Installing the gcc-12 package and using the following cmake command works:

cmake -DCMAKE_BUILD_TYPE=Release -DNEO_SKIP_UNIT_TESTS=1 -DCMAKE_CXX_COMPILER=g++-12
-DCMAKE_C_COMPILER=gcc-12 ..
JablonskiMateusz commented 10 months ago

Hi folks, thanks for reporting the issue. Could you try to use https://github.com/intel/compute-runtime/commit/8b09bb855e2503e033f684da9b1fcd08802c2156 when building with gcc13? I recently added some fixes related to gcc13 compilation

tjaalton commented 10 months ago

I still get the same error

JablonskiMateusz commented 10 months ago

@tjaalton have you checkout the commit or cherry-picked it ?

JablonskiMateusz commented 10 months ago

the initial error should gone after https://github.com/intel/compute-runtime/commit/894bab05efb447d249c9f0afdbf0ca62c82395c6

tjaalton commented 10 months ago

cherry-picked on top of 23.26.26690.22

k1gen commented 10 months ago

Hi folks, thanks for reporting the issue. Could you try to use 8b09bb8 when building with gcc13? I recently added some fixes related to gcc13 compilation

fixed for me on Arch, thanks!

matthew-olson-intel commented 10 months ago

Yep, that works for me too. Thanks!

tjaalton commented 9 months ago

So there's something else missing from the current release branches that still make it fail, any idea what those might be? Building current master succeeds.

JablonskiMateusz commented 9 months ago

@kmachnik please provide ETA

tjaalton commented 9 months ago

23.35 builds fine