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

Matthias Klose doko at debian.org
Tue Jul 19 17:54:41 BST 2022


Package: src:libcifpp
Version: 2.0.5-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/libcifpp_2.0.5-1_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCACHE_DIR=\"/var/cache/libcifpp\" -DCIFPP_USE_RSRC -DDATA_DIR=\"/usr/share/libcifpp\" -Dcifpp_EXPORTS -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>>/PRIVATE -I/<<PKGBUILDDIR>>/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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fPIC -std=gnu++17 -MD -MT CMakeFiles/cifpp.dir/src/Point.cpp.o -MF CMakeFiles/cifpp.dir/src/Point.cpp.o.d -o CMakeFiles/cifpp.dir/src/Point.cpp.o -c /<<PKGBUILDDIR>>/src/Point.cpp
[ 48%] Building CXX object CMakeFiles/cifpp.dir/src/Secondary.cpp.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCACHE_DIR=\"/var/cache/libcifpp\" -DCIFPP_USE_RSRC -DDATA_DIR=\"/usr/share/libcifpp\" -Dcifpp_EXPORTS -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>>/PRIVATE -I/<<PKGBUILDDIR>>/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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fPIC -std=gnu++17 -MD -MT CMakeFiles/cifpp.dir/src/Secondary.cpp.o -MF CMakeFiles/cifpp.dir/src/Secondary.cpp.o.d -o CMakeFiles/cifpp.dir/src/Secondary.cpp.o -c /<<PKGBUILDDIR>>/src/Secondary.cpp
[ 52%] Building CXX object CMakeFiles/cifpp.dir/src/Structure.cpp.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCACHE_DIR=\"/var/cache/libcifpp\" -DCIFPP_USE_RSRC -DDATA_DIR=\"/usr/share/libcifpp\" -Dcifpp_EXPORTS -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>>/PRIVATE -I/<<PKGBUILDDIR>>/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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fPIC -std=gnu++17 -MD -MT CMakeFiles/cifpp.dir/src/Structure.cpp.o -MF CMakeFiles/cifpp.dir/src/Structure.cpp.o.d -o CMakeFiles/cifpp.dir/src/Structure.cpp.o -c /<<PKGBUILDDIR>>/src/Structure.cpp
[ 56%] Building CXX object CMakeFiles/cifpp.dir/src/Symmetry.cpp.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCACHE_DIR=\"/var/cache/libcifpp\" -DCIFPP_USE_RSRC -DDATA_DIR=\"/usr/share/libcifpp\" -Dcifpp_EXPORTS -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>>/PRIVATE -I/<<PKGBUILDDIR>>/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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fPIC -std=gnu++17 -MD -MT CMakeFiles/cifpp.dir/src/Symmetry.cpp.o -MF CMakeFiles/cifpp.dir/src/Symmetry.cpp.o.d -o CMakeFiles/cifpp.dir/src/Symmetry.cpp.o -c /<<PKGBUILDDIR>>/src/Symmetry.cpp
[ 60%] Building CXX object CMakeFiles/cifpp.dir/src/TlsParser.cpp.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCACHE_DIR=\"/var/cache/libcifpp\" -DCIFPP_USE_RSRC -DDATA_DIR=\"/usr/share/libcifpp\" -Dcifpp_EXPORTS -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>>/PRIVATE -I/<<PKGBUILDDIR>>/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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fPIC -std=gnu++17 -MD -MT CMakeFiles/cifpp.dir/src/TlsParser.cpp.o -MF CMakeFiles/cifpp.dir/src/TlsParser.cpp.o.d -o CMakeFiles/cifpp.dir/src/TlsParser.cpp.o -c /<<PKGBUILDDIR>>/src/TlsParser.cpp
[ 64%] Linking CXX shared library libcifpp.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/cifpp.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -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-missing-field-initializers -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libcifpp.so.2 -o libcifpp.so.2.0.5 CMakeFiles/cifpp.dir/src/AtomType.cpp.o CMakeFiles/cifpp.dir/src/BondMap.cpp.o CMakeFiles/cifpp.dir/src/Cif++.cpp.o CMakeFiles/cifpp.dir/src/Cif2PDB.cpp.o CMakeFiles/cifpp.dir/src/CifParser.cpp.o CMakeFiles/cifpp.dir/src/CifUtils.cpp.o CMakeFiles/cifpp.dir/src/CifValidator.cpp.o CMakeFiles/cifpp.dir/src/Compound.cpp.o CMakeFiles/cifpp.dir/src/PDB2Cif.cpp.o CMakeFiles/cifpp.dir/src/PDB2CifRemark3.cpp.o CMakeFiles/cifpp.dir/src/Point.cpp.o CMakeFiles/cifpp.dir/src/Secondary.cpp.o CMakeFiles/cifpp.dir/src/Structure.cpp.o CMakeFiles/cifpp.dir/src/Symmetry.cpp.o CMakeFiles/cifpp.dir/src/TlsParser.cpp.o  /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.74.0 -lpthread 
/usr/bin/cmake -E cmake_symlink_library libcifpp.so.2.0.5 libcifpp.so.2 libcifpp.so
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[ 64%] Built target cifpp
make  -f CMakeFiles/rename-compound-test.dir/build.make CMakeFiles/rename-compound-test.dir/depend
make  -f CMakeFiles/structure-test.dir/build.make CMakeFiles/structure-test.dir/depend
make  -f CMakeFiles/unit-test.dir/build.make CMakeFiles/unit-test.dir/depend
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'
[ 76%] Generating unit-test_rsrc.obj
[ 76%] Generating structure-test_rsrc.obj
[ 76%] Generating rename-compound-test_rsrc.obj
/usr/bin/mrc -o /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/rename-compound-test_rsrc.obj /<<PKGBUILDDIR>>/rsrc/mmcif_pdbx_v50.dic
/usr/bin/mrc -o /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/structure-test_rsrc.obj /<<PKGBUILDDIR>>/rsrc/mmcif_pdbx_v50.dic
/usr/bin/mrc -o /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/unit-test_rsrc.obj /<<PKGBUILDDIR>>/rsrc/mmcif_pdbx_v50.dic
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /<<PKGBUILDDIR>> /<<PKGBUILDDIR>> /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/structure-test.dir/DependInfo.cmake --color=
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /<<PKGBUILDDIR>> /<<PKGBUILDDIR>> /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/unit-test.dir/DependInfo.cmake --color=
cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /<<PKGBUILDDIR>> /<<PKGBUILDDIR>> /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles/rename-compound-test.dir/DependInfo.cmake --color=
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make  -f CMakeFiles/structure-test.dir/build.make CMakeFiles/structure-test.dir/build
make  -f CMakeFiles/unit-test.dir/build.make CMakeFiles/unit-test.dir/build
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make  -f CMakeFiles/rename-compound-test.dir/build.make CMakeFiles/rename-compound-test.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'
[ 84%] Building CXX object CMakeFiles/unit-test.dir/test/unit-test.cpp.o
[ 88%] Building CXX object CMakeFiles/rename-compound-test.dir/test/rename-compound-test.cpp.o
[ 88%] Building CXX object CMakeFiles/structure-test.dir/test/structure-test.cpp.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCACHE_DIR=\"/var/cache/libcifpp\" -DCIFPP_USE_RSRC -DDATA_DIR=\"/usr/share/libcifpp\" -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>>/PRIVATE -I/<<PKGBUILDDIR>>/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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=gnu++17 -MD -MT CMakeFiles/rename-compound-test.dir/test/rename-compound-test.cpp.o -MF CMakeFiles/rename-compound-test.dir/test/rename-compound-test.cpp.o.d -o CMakeFiles/rename-compound-test.dir/test/rename-compound-test.cpp.o -c /<<PKGBUILDDIR>>/test/rename-compound-test.cpp
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCACHE_DIR=\"/var/cache/libcifpp\" -DCIFPP_USE_RSRC -DDATA_DIR=\"/usr/share/libcifpp\" -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>>/PRIVATE -I/<<PKGBUILDDIR>>/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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=gnu++17 -MD -MT CMakeFiles/structure-test.dir/test/structure-test.cpp.o -MF CMakeFiles/structure-test.dir/test/structure-test.cpp.o.d -o CMakeFiles/structure-test.dir/test/structure-test.cpp.o -c /<<PKGBUILDDIR>>/test/structure-test.cpp
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCACHE_DIR=\"/var/cache/libcifpp\" -DCIFPP_USE_RSRC -DDATA_DIR=\"/usr/share/libcifpp\" -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/<<PKGBUILDDIR>>/PRIVATE -I/<<PKGBUILDDIR>>/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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -std=gnu++17 -MD -MT CMakeFiles/unit-test.dir/test/unit-test.cpp.o -MF CMakeFiles/unit-test.dir/test/unit-test.cpp.o.d -o CMakeFiles/unit-test.dir/test/unit-test.cpp.o -c /<<PKGBUILDDIR>>/test/unit-test.cpp
[ 92%] Linking CXX executable rename-compound-test
/usr/bin/cmake -E cmake_link_script CMakeFiles/rename-compound-test.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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now "CMakeFiles/rename-compound-test.dir/test/rename-compound-test.cpp.o" "rename-compound-test_rsrc.obj" -o rename-compound-test  -Wl,-rpath,/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu libcifpp.so.2.0.5 -lpthread /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.74.0 
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[ 92%] Built target rename-compound-test
[ 96%] Linking CXX executable structure-test
/usr/bin/cmake -E cmake_link_script CMakeFiles/structure-test.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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now "CMakeFiles/structure-test.dir/test/structure-test.cpp.o" "structure-test_rsrc.obj" -o structure-test  -Wl,-rpath,/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu libcifpp.so.2.0.5 -lpthread /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.74.0 
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
[ 96%] Built target structure-test
[100%] Linking CXX executable unit-test
/usr/bin/cmake -E cmake_link_script CMakeFiles/unit-test.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 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now "CMakeFiles/unit-test.dir/test/unit-test.cpp.o" "unit-test_rsrc.obj" -o unit-test  -Wl,-rpath,/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu libcifpp.so.2.0.5 -lpthread /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.74.0 
/usr/bin/ld: /tmp/ccd0f1aV.ltrans3.ltrans.o: in function `d1_invoker() [clone .lto_priv.0]':
./obj-x86_64-linux-gnu/./include/cif++/Cif++.hpp:2006: undefined reference to `std::tuple<cif::Row, bool> cif::Category::emplace<cif::Item const*>(cif::Item const*, cif::Item const*)'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/unit-test.dir/build.make:109: unit-test] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:981: CMakeFiles/unit-test.dir/all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[1]: *** [Makefile:149: 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:12: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2



More information about the Debian-med-packaging mailing list