[Debian-mobcom-maintainers] Bug#1015571: osmo-fl2k: ftbfs with LTO (link time optimization) enabled

Matthias Klose doko at debian.org
Tue Jul 19 17:57:45 BST 2022


Package: src:osmo-fl2k
Version: 0.1.1-1
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/osmo-fl2k_0.1.1-1_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make  -f src/CMakeFiles/fl2k_test.dir/build.make src/CMakeFiles/fl2k_test.dir/build
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make  -f src/CMakeFiles/fl2k_tcp.dir/build.make src/CMakeFiles/fl2k_tcp.dir/build
make  -f src/CMakeFiles/fl2k_file.dir/build.make src/CMakeFiles/fl2k_file.dir/build
make[3]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[3]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[3]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make  -f src/CMakeFiles/fl2k_fm.dir/build.make src/CMakeFiles/fl2k_fm.dir/build
make[3]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[ 35%] Building C object src/CMakeFiles/fl2k_tcp.dir/fl2k_tcp.c.o
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cc -DHAVE_LIBUSB_ERROR_NAME=1 -DHAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1 -I/<<PKGBUILDDIR>>/include -I/usr/include/libusb-1.0 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wall -Wextra -Wno-unused-parameter -Wno-unused -Wsign-compare -Wdeclaration-after-statement -fvisibility=hidden -MD -MT src/CMakeFiles/fl2k_tcp.dir/fl2k_tcp.c.o -MF CMakeFiles/fl2k_tcp.dir/fl2k_tcp.c.o.d -o CMakeFiles/fl2k_tcp.dir/fl2k_tcp.c.o -c /<<PKGBUILDDIR>>/src/fl2k_tcp.c
[ 42%] Building C object src/CMakeFiles/fl2k_file.dir/fl2k_file.c.o
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cc -DHAVE_LIBUSB_ERROR_NAME=1 -DHAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1 -I/<<PKGBUILDDIR>>/include -I/usr/include/libusb-1.0 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wall -Wextra -Wno-unused-parameter -Wno-unused -Wsign-compare -Wdeclaration-after-statement -fvisibility=hidden -MD -MT src/CMakeFiles/fl2k_file.dir/fl2k_file.c.o -MF CMakeFiles/fl2k_file.dir/fl2k_file.c.o.d -o CMakeFiles/fl2k_file.dir/fl2k_file.c.o -c /<<PKGBUILDDIR>>/src/fl2k_file.c
[ 50%] Building C object src/CMakeFiles/fl2k_test.dir/fl2k_test.c.o
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cc -DHAVE_LIBUSB_ERROR_NAME=1 -DHAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1 -I/<<PKGBUILDDIR>>/include -I/usr/include/libusb-1.0 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wall -Wextra -Wno-unused-parameter -Wno-unused -Wsign-compare -Wdeclaration-after-statement -fvisibility=hidden -MD -MT src/CMakeFiles/fl2k_test.dir/fl2k_test.c.o -MF CMakeFiles/fl2k_test.dir/fl2k_test.c.o.d -o CMakeFiles/fl2k_test.dir/fl2k_test.c.o -c /<<PKGBUILDDIR>>/src/fl2k_test.c
[ 57%] Building C object src/CMakeFiles/fl2k_fm.dir/fl2k_fm.c.o
[ 64%] Building C object src/CMakeFiles/fl2k_fm.dir/rds_mod.c.o
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cc -DHAVE_LIBUSB_ERROR_NAME=1 -DHAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1 -I/<<PKGBUILDDIR>>/include -I/usr/include/libusb-1.0 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wall -Wextra -Wno-unused-parameter -Wno-unused -Wsign-compare -Wdeclaration-after-statement -fvisibility=hidden -MD -MT src/CMakeFiles/fl2k_fm.dir/fl2k_fm.c.o -MF CMakeFiles/fl2k_fm.dir/fl2k_fm.c.o.d -o CMakeFiles/fl2k_fm.dir/fl2k_fm.c.o -c /<<PKGBUILDDIR>>/src/fl2k_fm.c
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cc -DHAVE_LIBUSB_ERROR_NAME=1 -DHAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1 -I/<<PKGBUILDDIR>>/include -I/usr/include/libusb-1.0 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wall -Wextra -Wno-unused-parameter -Wno-unused -Wsign-compare -Wdeclaration-after-statement -fvisibility=hidden -MD -MT src/CMakeFiles/fl2k_fm.dir/rds_mod.c.o -MF CMakeFiles/fl2k_fm.dir/rds_mod.c.o.d -o CMakeFiles/fl2k_fm.dir/rds_mod.c.o -c /<<PKGBUILDDIR>>/src/rds_mod.c
[ 71%] Building C object src/CMakeFiles/fl2k_fm.dir/rds_waveforms.c.o
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cc -DHAVE_LIBUSB_ERROR_NAME=1 -DHAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1 -I/<<PKGBUILDDIR>>/include -I/usr/include/libusb-1.0 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -Wall -Wextra -Wno-unused-parameter -Wno-unused -Wsign-compare -Wdeclaration-after-statement -fvisibility=hidden -MD -MT src/CMakeFiles/fl2k_fm.dir/rds_waveforms.c.o -MF CMakeFiles/fl2k_fm.dir/rds_waveforms.c.o.d -o CMakeFiles/fl2k_fm.dir/rds_waveforms.c.o -c /<<PKGBUILDDIR>>/src/rds_waveforms.c
In file included from /usr/include/string.h:519,
                 from /<<PKGBUILDDIR>>/src/rds_mod.c:28:
In function ‘strncpy’,
    inlined from ‘set_rds_rt’ at /<<PKGBUILDDIR>>/src/rds_mod.c:279:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: ‘strncpy’ specified bound 64 equals destination size [-Wstringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘set_rds_ps’ at /<<PKGBUILDDIR>>/src/rds_mod.c:291:2:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:95:10: warning: ‘strncpy’ specified bound 8 equals destination size [-Wstringop-truncation]
   95 |   return __builtin___strncpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   96 |                                   __glibc_objsize (__dest));
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~
[ 78%] Linking C executable fl2k_tcp
[ 85%] Linking C executable fl2k_file
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/fl2k_tcp.dir/link.txt --verbose=1
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/fl2k_file.dir/link.txt --verbose=1
[ 92%] Linking C executable fl2k_test
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/fl2k_test.dir/link.txt --verbose=1
/usr/bin/cc -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/fl2k_tcp.dir/fl2k_tcp.c.o -o fl2k_tcp  -Wl,-rpath,/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src: libosmo-fl2k.so.0.1.1 -lusb-1.0 -lpthread 
/usr/bin/cc -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/fl2k_test.dir/fl2k_test.c.o -o fl2k_test  -Wl,-rpath,/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src: libosmo-fl2k.so.0.1.1 -lusb-1.0 -lpthread -lm 
/usr/bin/cc -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/fl2k_file.dir/fl2k_file.c.o -o fl2k_file  -Wl,-rpath,/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src: libosmo-fl2k.so.0.1.1 -lusb-1.0 -lpthread 
[100%] Linking C executable fl2k_fm
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/fl2k_fm.dir/link.txt --verbose=1
/usr/bin/cc -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/fl2k_fm.dir/fl2k_fm.c.o CMakeFiles/fl2k_fm.dir/rds_waveforms.c.o CMakeFiles/fl2k_fm.dir/rds_mod.c.o -o fl2k_fm  -Wl,-rpath,/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src: libosmo-fl2k.so.0.1.1 -lusb-1.0 -lpthread -lm 
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[100%] Built target fl2k_file
[100%] Built target fl2k_test
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[100%] Built target fl2k_tcp
/usr/bin/ld: /tmp/cc1wh0mz.ltrans0.ltrans.o: in function `dds_init.constprop.0':
./obj-x86_64-linux-gnu/src/./src/fl2k_fm.c:185: undefined reference to `dds_set_freq'
collect2: error: ld returned 1 exit status
make[3]: *** [src/CMakeFiles/fl2k_fm.dir/build.make:134: src/fl2k_fm] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:286: src/CMakeFiles/fl2k_fm.dir/all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[1]: *** [Makefile:139: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j8 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2
make: *** [debian/rules:7: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2



More information about the Debian-mobcom-maintainers mailing list