Bug#996241: glm: FTBFS with GCC-11 (test-core_func_integer)
Lukas Märdian
slyon at ubuntu.com
Tue Oct 12 14:04:04 BST 2021
Package: glm
Version: 0.9.9.8+ds-1
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu impish ubuntu-patch
X-Debbugs-Cc: slyon at ubuntu.com
Dear Maintainer,
Unit-tests are failing if built using GCC-11.
```
99% tests passed, 2 tests failed out of 188
Total Test time (real) = 3.86 sec
The following tests FAILED:
39 - test-core_func_integer (Child aborted)
97 - test-ext_vector_integer (Child aborted)
```
test-ext_vector_integer seems to be flaky, while test-core_func_integer fails consistently.
If built with -Wall this warning shows up, which seems to be relevant:
cd /home/user/glm-gu/obj-x86_64-linux-gnu/test/core && /usr/bin/cmake -E cmake_link_script CMakeFiles/test-core_func_matrix.dir/link.txt --verbose=1
/usr/bin/c++ -g -O2 -ffile-prefix-map=/home/user/glm-gu=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wno-error -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -flto=auto -Wl,-z,relro -rdynamic CMakeFiles/test-core_func_matrix.dir/core_func_matrix.cpp.o -o test-core_func_matrix
In function ‘bitCount::bitCount_bitfield<int>(int)int’,
inlined from ‘bitCount::test()’ at /home/user/glm-gu/test/core/core_func_integer.cpp:1515:35,
inlined from ‘main’ at /home/user/glm-gu/test/core/core_func_integer.cpp:1533:27:
/home/user/glm-gu/test/core/core_func_integer.cpp:1442:41: warning: ‘<anonymous>’ may be used uninitialized [-Wmaybe-uninitialized]
1442 | return bitCount_bitfield(glm::vec<1, genType, glm::defaultp>(x)).x;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/glm-gu/test/core/core_func_integer.cpp: In function ‘main’:
/home/user/glm-gu/test/core/core_func_integer.cpp:1427:36: note: by argument 1 of type ‘const struct vec &’ to ‘bitCount::bitCount_bitfield<1, int, (glm::qualifier)0>(glm::vec<1, int, (glm::qualifier)0> const&)glm::vec<1, int, (glm::qualifier)0>’ declared here
1427 | static glm::vec<L, int, Q> bitCount_bitfield(glm::vec<L, T, Q> const& v)
| ^~~~~~~~~~~~~~~~~
/home/user/glm-gu/test/core/core_func_integer.cpp:1442:47: note: ‘<anonymous>’ declared here
1442 | return bitCount_bitfield(glm::vec<1, genType, glm::defaultp>(x)).x;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/glm-gu/test/core/core_func_common.cpp: In function ‘int test_constexpr()’:
/home/user/glm-gu/test/core/core_func_common.cpp:1306:35: warning: variable ‘A’ set but not used [-Wunused-but-set-variable]
1306 | constexpr glm::vec1 const A = glm::abs(glm::vec1(1.0f));
| ^
/home/user/glm-gu/test/core/core_func_common.cpp:1307:35: warning: variable ‘B’ set but not used [-Wunused-but-set-variable]
1307 | constexpr glm::vec2 const B = glm::abs(glm::vec2(1.0f));
| ^
/home/user/glm-gu/test/core/core_func_common.cpp:1308:35: warning: variable ‘C’ set but not used [-Wunused-but-set-variable]
1308 | constexpr glm::vec3 const C = glm::abs(glm::vec3(1.0f));
| ^
/home/user/glm-gu/test/core/core_func_common.cpp:1309:35: warning: variable ‘D’ set but not used [-Wunused-but-set-variable]
1309 | constexpr glm::vec4 const D = glm::abs(glm::vec4(1.0f));
| ^
In Ubuntu, the attached patch was applied as debian/patches/tests-no-optimization.patch to fix the build/unit-tests.
Thanks for considering the patch.
-- System Information:
Debian Release: 11.0
APT prefers impish
APT policy: (500, 'impish')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.13.0-16-generic (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru glm-0.9.9.8+ds/debian/patches/series glm-0.9.9.8+ds/debian/patches/series
--- glm-0.9.9.8+ds/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ glm-0.9.9.8+ds/debian/patches/series 2021-10-12 14:35:17.000000000 +0200
@@ -0,0 +1 @@
+tests-no-optimization.patch
diff -Nru glm-0.9.9.8+ds/debian/patches/tests-no-optimization.patch glm-0.9.9.8+ds/debian/patches/tests-no-optimization.patch
--- glm-0.9.9.8+ds/debian/patches/tests-no-optimization.patch 1970-01-01 01:00:00.000000000 +0100
+++ glm-0.9.9.8+ds/debian/patches/tests-no-optimization.patch 2021-10-12 14:52:16.000000000 +0200
@@ -0,0 +1,19 @@
+Description: Fix FTBFS (unit-tests) with GCC-11
+Author: Lukas Märdian <slyon at ubuntu.com>
+Origin: vendor, Ubuntu
+Bug: https://github.com/g-truc/glm/pull/1087
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/glm/+bug/1946750
+Forwarded: https://github.com/g-truc/glm/pull/1087
+Last-Update: 2021-10-12
+
+--- glm-0.9.9.8+ds.orig/test/CMakeLists.txt
++++ glm-0.9.9.8+ds/test/CMakeLists.txt
+@@ -206,7 +206,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "GN
+ message("GLM: GCC - ${CMAKE_CXX_COMPILER_ID} compiler")
+ endif()
+
+- add_compile_options(-O2)
++ add_compile_options(-O0)
+ add_compile_options(-Wno-long-long)
+
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
More information about the debian-science-maintainers
mailing list