Test fail when building with GCC 13.2.1
Closed this issue · 10 comments
FabioLolix commented
Hello, I have enabled tests on my local pkgbuilds, building with GCC 13.2.1 there is a fail then the sequence is interrupted, with Clang is fine
[22/32] cpp util::tests::init
[23/32] cpp util::tests::matrix
/usr/include/c++/13.2.1/array:202: constexpr std::array<_Tp, _Nm>::value_type& std::array<_Tp, _Nm>::operator[](size_type) [with _Tp = float; long unsigned int _Nm = 3; reference = float&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
/home/fabio/Dev/Github/PKGBUILD/openage-git/PKGBUILD: line 42: 136096 Aborted (core dumped) ./run.py test --run-all-tests
==> ERROR: A failure occurred in check().
``
heinezen commented
Can't reproduce this on gcc 13.1
FabioLolix commented
I'm on 13.2.1
heinezen commented
Do you have _GLIBCXX_DEBUG
or _GLIBCXX_ASSERTIONS
defined in your setup?
FabioLolix commented
-D_GLIBCXX_ASSERTIONS
is present, from /etc/makepkg.conf
~/.makepkg.conf
#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"
#-- Compiler and Linker Flags
#CPPFLAGS=""
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
#RUSTFLAGS="-C opt-level=2"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
MAKEFLAGS="-j20"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
#DEBUG_RUSTFLAGS="-C debuginfo=2"
#########################################################################
heinezen commented
Okay that could explain why I don't see the error. I'll build with _GLIBCXX_DEBUG
and check back.
heinezen commented
Now I get the same error with _GLIBCXX_DEBUG
. I'll see what I can do about that tomorrow. Thanks for the input so far!
FabioLolix commented
I have applied the 2 patches but get the (same?) error, but I'm also going to sleep now
[23/32] cpp util::tests::matrix
/usr/include/c++/13.2.1/array:202: constexpr std::array<_Tp, _Nm>::value_type& std::array<_Tp, _Nm>::operator[](size_type) [with _Tp = float; long unsigned int _Nm = 3; reference = float&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
/home/fabio/Dev/Github/PKGBUILD/openage-git/PKGBUILD: line 52: 68316 Aborted (core dumped) ./run.py test --run-all-tests
==> ERROR: A failure occurred in check().
FabioLolix commented
1 It is working with the new patch