[Debian-med-packaging] Bug#1015687: terraphast: ftbfs with LTO (link time optimization) enabled

Matthias Klose doko at debian.org
Tue Jul 19 18:01:42 BST 2022


Package: src:terraphast
Version: 0.0+git20200413.8af2e4c-2
Severity: minor
Tags: sid bookworm
User: debian-gcc at lists.debian.org
Usertags: ftbfs-lto

This package currently fails to build (at least on the amd64
architecture) with link time optimizations enabled.  For a background
for LTO please see

https://wiki.debian.org/ToolChain/LTO

The goal is to enable this optimization by default in an upcoming
Debian release in dpkg-buildflags for 64bit architectures.  The goal
is to get this package to build with link time optimizations, or to
explicitly disable link time optimizations for this package build.

To reproduce the build failure, enable the lto optimization in
testing/unstable by adding "optimize=+lto" to DEB_BUILD_MAINT_OPTIONS
in the debian/rules file, or if this macro is unset, just set it:

export DEB_BUILD_MAINT_OPTIONS = optimize=+lto

Please try to fix the build with lto enabled, fixing the packaging or
forwarding the issue upstream. If the issue cannot be fixed,
explicitly disallow building the package with lto by adding to your
rules file:

export DEB_BUILD_MAINT_OPTIONS = optimize=-lto

or adding that string to your existing setting of DEB_BUILD_MAINT_OPTIONS.

The full build log can be found at:
http://qa-logs.debian.net/2022/06/09/dpkglto/terraphast_0.0+git20200413.8af2e4c-2_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
[ 86%] Building CXX object CMakeFiles/unittests.dir/test/rooting.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/rooting.cpp.o -MF CMakeFiles/unittests.dir/test/rooting.cpp.o.d -o CMakeFiles/unittests.dir/test/rooting.cpp.o -c /<<PKGBUILDDIR>>/test/rooting.cpp
[ 87%] Building CXX object CMakeFiles/unittests.dir/test/small_bipartition.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/small_bipartition.cpp.o -MF CMakeFiles/unittests.dir/test/small_bipartition.cpp.o.d -o CMakeFiles/unittests.dir/test/small_bipartition.cpp.o -c /<<PKGBUILDDIR>>/test/small_bipartition.cpp
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[ 87%] Built target verbose_run
[ 88%] Building CXX object CMakeFiles/unittests.dir/test/stack_allocator.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/stack_allocator.cpp.o -MF CMakeFiles/unittests.dir/test/stack_allocator.cpp.o.d -o CMakeFiles/unittests.dir/test/stack_allocator.cpp.o -c /<<PKGBUILDDIR>>/test/stack_allocator.cpp
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[ 88%] Built target validated_run
[ 89%] Building CXX object CMakeFiles/unittests.dir/test/subtree_extraction.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/subtree_extraction.cpp.o -MF CMakeFiles/unittests.dir/test/subtree_extraction.cpp.o.d -o CMakeFiles/unittests.dir/test/subtree_extraction.cpp.o -c /<<PKGBUILDDIR>>/test/subtree_extraction.cpp
[ 90%] Building CXX object CMakeFiles/unittests.dir/test/supertree.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/supertree.cpp.o -MF CMakeFiles/unittests.dir/test/supertree.cpp.o.d -o CMakeFiles/unittests.dir/test/supertree.cpp.o -c /<<PKGBUILDDIR>>/test/supertree.cpp
[ 91%] Building CXX object CMakeFiles/unittests.dir/test/trees.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/trees.cpp.o -MF CMakeFiles/unittests.dir/test/trees.cpp.o.d -o CMakeFiles/unittests.dir/test/trees.cpp.o -c /<<PKGBUILDDIR>>/test/trees.cpp
[ 93%] Building CXX object CMakeFiles/unittests.dir/test/union_find.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/union_find.cpp.o -MF CMakeFiles/unittests.dir/test/union_find.cpp.o.d -o CMakeFiles/unittests.dir/test/union_find.cpp.o -c /<<PKGBUILDDIR>>/test/union_find.cpp
[ 94%] Building CXX object CMakeFiles/unittests.dir/test/util.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/util.cpp.o -MF CMakeFiles/unittests.dir/test/util.cpp.o.d -o CMakeFiles/unittests.dir/test/util.cpp.o -c /<<PKGBUILDDIR>>/test/util.cpp
[ 95%] Building CXX object CMakeFiles/unittests.dir/test/validation.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/validation.cpp.o -MF CMakeFiles/unittests.dir/test/validation.cpp.o.d -o CMakeFiles/unittests.dir/test/validation.cpp.o -c /<<PKGBUILDDIR>>/test/validation.cpp
[ 96%] Building CXX object CMakeFiles/unittests.dir/test/simple.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/simple.cpp.o -MF CMakeFiles/unittests.dir/test/simple.cpp.o.d -o CMakeFiles/unittests.dir/test/simple.cpp.o -c /<<PKGBUILDDIR>>/test/simple.cpp
[ 97%] Building CXX object CMakeFiles/unittests.dir/test/limited.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/limited.cpp.o -MF CMakeFiles/unittests.dir/test/limited.cpp.o.d -o CMakeFiles/unittests.dir/test/limited.cpp.o -c /<<PKGBUILDDIR>>/test/limited.cpp
[ 98%] Building CXX object CMakeFiles/unittests.dir/test/c_api.cpp.o
/usr/bin/c++ -DUSE_GMP -I/<<PKGBUILDDIR>>/lib/gcc_clang -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/catch -I/<<PKGBUILDDIR>>/c_include -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -std=gnu++11 -MD -MT CMakeFiles/unittests.dir/test/c_api.cpp.o -MF CMakeFiles/unittests.dir/test/c_api.cpp.o.d -o CMakeFiles/unittests.dir/test/c_api.cpp.o -c /<<PKGBUILDDIR>>/test/c_api.cpp
[100%] Linking CXX executable unittests
/usr/bin/cmake -E cmake_link_script CMakeFiles/unittests.dir/link.txt --verbose=1
/usr/bin/c++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -rdynamic CMakeFiles/unittests.dir/test/main.cc.o CMakeFiles/unittests.dir/test/advanced.cpp.o CMakeFiles/unittests.dir/test/bipartitions.cpp.o CMakeFiles/unittests.dir/test/bitmatrix.cpp.o CMakeFiles/unittests.dir/test/bits.cpp.o CMakeFiles/unittests.dir/test/bitvector.cpp.o CMakeFiles/unittests.dir/test/clamped_uint.cpp.o CMakeFiles/unittests.dir/test/constraints.cpp.o CMakeFiles/unittests.dir/test/compile_test.cpp.o CMakeFiles/unittests.dir/test/fast_set.cpp.o CMakeFiles/unittests.dir/test/integration.cpp.o CMakeFiles/unittests.dir/test/multitree_iterator.cpp.o CMakeFiles/unittests.dir/test/parser.cpp.o CMakeFiles/unittests.dir/test/rooting.cpp.o CMakeFiles/unittests.dir/test/small_bipartition.cpp.o CMakeFiles/unittests.dir/test/stack_allocator.cpp.o CMakeFiles/unittests.dir/test/subtree_extraction.cpp.o CMakeFiles/unittests.dir/test/supertree.cpp.o CMakeFiles/unittests.dir/test/trees.cpp.o CMakeFiles/unittests.dir/test/union_find.cpp.o CMakeFiles/unittests.dir/test/util.cpp.o CMakeFiles/unittests.dir/test/validation.cpp.o CMakeFiles/unittests.dir/test/simple.cpp.o CMakeFiles/unittests.dir/test/limited.cpp.o CMakeFiles/unittests.dir/test/c_api.cpp.o -o unittests  -Wl,-rpath,/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu libterraces_c.so.0.0 libterraces.so.0.0 -lgmpxx -lgmp 
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[100%] Built target unittests
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
/usr/bin/cmake -E cmake_progress_start /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles 0
make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
   dh_auto_test
	cd obj-x86_64-linux-gnu && make -j8 test ARGS\+=--verbose ARGS\+=-j8
make[1]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
Running tests...
/usr/bin/ctest --force-new-ctest-process --verbose -j8
UpdateCTestConfiguration  from :/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/DartConfiguration.tcl
UpdateCTestConfiguration  from :/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/DartConfiguration.tcl
Test project /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
    Start 1: unittests

1: Test command: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/unittests
1: Test timeout computed to be: 10000000
1/1 Test #1: unittests ........................***Exception: SegFault  2.03 sec


0% tests passed, 1 tests failed out of 1

Total Test time (real) =   2.04 sec

The following tests FAILED:
	  1 - unittests (SEGFAULT)
Errors while running CTest
make[1]: *** [Makefile:74: test] Error 8
make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
dh_auto_test: error: cd obj-x86_64-linux-gnu && make -j8 test ARGS\+=--verbose ARGS\+=-j8 returned exit code 2
make: *** [debian/rules:17: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2



More information about the Debian-med-packaging mailing list