#1015557 nng: ftbfs with LTO (link time optimization) enabled

#1015557#5
Date:
2022-07-19 16:57:17 UTC
From:
To:
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/nng_1.5.2-2_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
52: 96 assertions thus far
52:
52: --- PASS: MultiProtocol/Transport Stress (0.00s)
52: PASS
52: ok      /<<PKGBUILDDIR>>/build-static/tests/multistress  30.073s
85/86 Test #52: nng.multistress .............................   Passed   30.08 sec
69: DOING reqrep0 (req 2 rep 1) address: ws://127.0.0.1:26500/nng_reqstress
69: DOING reqrep0 (req 4 rep 3) address: ws://127.0.0.1:26501/nng_reqstress
69: DOING reqrep0 (req 6 rep 5) address: ws://127.0.0.1:26502/nng_reqstress
69: DOING reqrep0 (req 8 rep 7) address: ws://127.0.0.1:26503/nng_reqstress
69: DOING reqrep0 (req 9 rep 7) address: inproc://nng_reqstress_26504
69: DOING reqrep0 (req 11 rep 10) address: tcp://127.0.0.1:26505
69: DOING reqrep0 (req 12 rep 10) address: tcp://127.0.0.1:26506
69: DOING reqrep0 (req 14 rep 13) address: ipc:///tmp/nng_reqstress_26507
69: DOING reqrep0 (req 16 rep 15) address: inproc://nng_reqstress_26508
69: DOING reqrep0 (req 18 rep 17) address: tcp://127.0.0.1:26509
69: DOING reqrep0 (req 19 rep 17) address: ws://127.0.0.1:26510/nng_reqstress
69: DOING reqrep0 (req 21 rep 20) address: ws://127.0.0.1:26511/nng_reqstress
69: DOING reqrep0 (req 23 rep 22) address: ws://127.0.0.1:26512/nng_reqstress
69: WAITING for 30 sec...
69: === RUN: Req/Rep Stress
69:
69:   All tests worked RESULT socket 1 (rep) sent 3378 recd 3378 fail 0
69: ✔✔RESULT socket 2 (req) sent 3378 recd 3378 fail 0
69: ✔✔RESULT socket 3 (rep) sent 3239 recd 3239 fail 0
69: ✔✔RESULT socket 4 (req) sent 3239 recd 3239 fail 0
69: ✔✔RESULT socket 5 (rep) sent 3211 recd 3211 fail 0
69: ✔✔RESULT socket 6 (req) sent 3211 recd 3211 fail 0
69: ✔✔RESULT socket 7 (rep) sent 7598 recd 7598 fail 0
69: ✔✔RESULT socket 8 (req) sent 3153 recd 3153 fail 0
69: ✔✔RESULT socket 9 (req) sent 4445 recd 4445 fail 0
69: ✔✔RESULT socket 10 (rep) sent 7458 recd 7458 fail 0
69: ✔✔RESULT socket 11 (req) sent 3707 recd 3707 fail 0
69: ✔✔RESULT socket 12 (req) sent 3751 recd 3751 fail 0
69: ✔✔RESULT socket 13 (rep) sent 3800 recd 3800 fail 0
69: ✔✔RESULT socket 14 (req) sent 3800 recd 3800 fail 0
69: ✔✔RESULT socket 15 (rep) sent 4298 recd 4298 fail 0
69: ✔✔RESULT socket 16 (req) sent 4298 recd 4298 fail 0
69: ✔✔RESULT socket 17 (rep) sent 7198 recd 7198 fail 0
69: ✔✔RESULT socket 18 (req) sent 3776 recd 3776 fail 0
69: ✔✔RESULT socket 19 (req) sent 3422 recd 3422 fail 0
69: ✔✔RESULT socket 20 (rep) sent 3157 recd 3157 fail 0
69: ✔✔RESULT socket 21 (req) sent 3157 recd 3157 fail 0
69: ✔✔RESULT socket 22 (rep) sent 3183 recd 3183 fail 0
69: ✔✔RESULT socket 23 (req) sent 3183 recd 3183 fail 0
69: ✔✔
69:
69:
69: 46 assertions thus far
69:
69: --- PASS: Req/Rep Stress (0.00s)
69: PASS
69: ok      /<<PKGBUILDDIR>>/build-static/tests/reqstress  30.148s
86/86 Test #69: nng.reqstress ...............................   Passed   30.15 sec

98% tests passed, 2 tests failed out of 86

Total Test time (real) =  37.34 sec

The following tests FAILED:
	 51 - nng.ipcwinsec (Failed)
	 53 - nng.nonblock (Failed)
Errors while running CTest
make[2]: *** [Makefile:94: test] Error 8
make[2]: Leaving directory '/<<PKGBUILDDIR>>/build-static'
dh_auto_test: error: cd build-static && make -j8 test ARGS\+=--verbose ARGS\+=-j8 returned exit code 2
make[1]: *** [debian/rules:23: override_dh_auto_test] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:31: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2