[Debian-mobcom-maintainers] Bug#1015563: openbsc: ftbfs with LTO (link time optimization) enabled
Matthias Klose
doko at debian.org
Tue Jul 19 17:57:30 BST 2022
Package: src:openbsc
Version: 1.4.1+dfsg1-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/openbsc_1.4.1+dfsg1-2_unstable_dpkglto.log
The last lines of the build log are at the end of this report.
[...]
967 | for (trx_nr = 0; trx_nr < bts->num_trx; trx_nr++) {
| ^
../libbsc/bsc_vty.c:967:46: error: potential null pointer dereference [-Werror=null-dereference]
../libbsc/bsc_vty.c: In function 'cfg_bts':
../libbsc/../../include/openbsc/acc_ramp.h:90:39: error: potential null pointer dereference [-Werror=null-dereference]
90 | acc_ramp->acc_ramping_enabled = enable;
| ^
../libbsc/acc_ramp.c:279:29: error: potential null pointer dereference [-Werror=null-dereference]
279 | acc_ramp->step_size = ACC_RAMP_STEP_SIZE_DEFAULT;
| ^
../libbsc/acc_ramp.c:280:37: error: potential null pointer dereference [-Werror=null-dereference]
280 | acc_ramp->step_interval_sec = ACC_RAMP_STEP_INTERVAL_MIN;
| ^
../libbsc/acc_ramp.c:281:42: error: potential null pointer dereference [-Werror=null-dereference]
281 | acc_ramp->step_interval_is_fixed = false;
| ^
../libbsc/acc_ramp.c:277:23: error: potential null pointer dereference [-Werror=null-dereference]
277 | acc_ramp->bts = bts;
| ^
../libbsc/../../include/openbsc/acc_ramp.h:90:39: error: potential null pointer dereference [-Werror=null-dereference]
90 | acc_ramp->acc_ramping_enabled = enable;
| ^
../libbsc/acc_ramp.c:279:29: error: potential null pointer dereference [-Werror=null-dereference]
279 | acc_ramp->step_size = ACC_RAMP_STEP_SIZE_DEFAULT;
| ^
../libbsc/acc_ramp.c:280:37: error: potential null pointer dereference [-Werror=null-dereference]
280 | acc_ramp->step_interval_sec = ACC_RAMP_STEP_INTERVAL_MIN;
| ^
../libbsc/acc_ramp.c:281:42: error: potential null pointer dereference [-Werror=null-dereference]
281 | acc_ramp->step_interval_is_fixed = false;
| ^
../libbsc/acc_ramp.c:277:23: error: potential null pointer dereference [-Werror=null-dereference]
277 | acc_ramp->bts = bts;
| ^
../libbsc/bsc_init.c: In function 'bsc_network_alloc':
../libbsc/net_init.c:49:23: error: potential null pointer dereference [-Werror=null-dereference]
49 | net->bsc_data = talloc_zero(net, struct osmo_bsc_data);
| ^
../libbsc/net_init.c:49:23: error: potential null pointer dereference [-Werror=null-dereference]
../libbsc/net_init.c:49:23: error: potential null pointer dereference [-Werror=null-dereference]
../libbsc/net_init.c:49:23: error: potential null pointer dereference [-Werror=null-dereference]
../libmsc/gsm_04_08.c: In function 'gsm0408_dispatch.isra':
../libmsc/gsm_04_08.c:1464:9: error: 'mi_type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
1464 | switch (mi_type) {
| ^
../libmsc/gsm_04_08.c:1451:17: note: 'mi_type' was declared here
1451 | uint8_t mi_type;
| ^
lto1: some warnings being treated as errors
make[5]: *** [/tmp/cceb1pEu.mk:2: /tmp/cc8G5mLN.ltrans0.ltrans.o] Error 1
make[5]: *** Waiting for unfinished jobs....
lto1: some warnings being treated as errors
make[5]: *** [/tmp/cceb1pEu.mk:5: /tmp/cc8G5mLN.ltrans1.ltrans.o] Error 1
lto1: some warnings being treated as errors
make[5]: *** [/tmp/cceb1pEu.mk:20: /tmp/cc8G5mLN.ltrans6.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:471: osmo-nitb] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/openbsc/src/osmo-nitb'
make[3]: *** [Makefile:430: all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/openbsc/src'
make[2]: *** [Makefile:457: all-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>/openbsc'
make[1]: *** [Makefile:389: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>/openbsc'
dh_auto_build: error: cd openbsc && make -j8 returned exit code 2
make: *** [debian/rules:16: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
More information about the Debian-mobcom-maintainers
mailing list