Bug#1015369: clhep: ftbfs with LTO (link time optimization) enabled

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


Package: src:clhep
Version: 2.1.4.1+dfsg-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/clhep_2.1.4.1+dfsg-1_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
cp -p BoostY.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/BoostY.icc
cp -p BoostZ.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/BoostZ.h
cp -p BoostZ.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/BoostZ.icc
cp -p EulerAngles.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/EulerAngles.h
cp -p EulerAngles.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/EulerAngles.icc
cp -p LorentzRotation.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/LorentzRotation.h
cp -p LorentzRotation.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/LorentzRotation.icc
cp -p LorentzVector.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/LorentzVector.h
cp -p LorentzVector.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/LorentzVector.icc
cp -p Rotation.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/Rotation.h
cp -p Rotation.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/Rotation.icc
cp -p RotationInterfaces.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/RotationInterfaces.h
cp -p RotationInterfaces.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/RotationInterfaces.icc
cp -p RotationX.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/RotationX.h
cp -p RotationX.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/RotationX.icc
cp -p RotationY.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/RotationY.h
cp -p RotationY.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/RotationY.icc
cp -p RotationZ.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/RotationZ.h
cp -p RotationZ.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/RotationZ.icc
cp -p Sqr.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/Sqr.h
cp -p ThreeVector.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/ThreeVector.h
cp -p ThreeVector.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/ThreeVector.icc
cp -p TwoVector.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/TwoVector.h
cp -p TwoVector.icc /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/TwoVector.icc
cp -p ZMxpv.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/ZMxpv.h
cp -p defs.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Vector/defs.h
make[5]: Leaving directory '/<<PKGBUILDDIR>>/Vector/Vector'
make[5]: Entering directory '/<<PKGBUILDDIR>>/Utility/Utility'
 install headers in /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Utility 
cp -p keywords.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Utility/keywords.h
cp -p memory.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Utility/memory.h
cp -p noncopyable.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Utility/noncopyable.h
cp -p type_traits.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Utility/type_traits.h
cp -p defs.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Utility/defs.h
make[5]: Leaving directory '/<<PKGBUILDDIR>>/Utility/Utility'
make[5]: Entering directory '/<<PKGBUILDDIR>>/Units/Units'
 install headers in /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Units 
cp -p GlobalPhysicalConstants.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Units/GlobalPhysicalConstants.h
cp -p GlobalSystemOfUnits.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Units/GlobalSystemOfUnits.h
cp -p PhysicalConstants.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Units/PhysicalConstants.h
cp -p SystemOfUnits.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Units/SystemOfUnits.h
cp -p defs.h /<<PKGBUILDDIR>>/RandomObjects/CLHEP/Units/defs.h
make[5]: Leaving directory '/<<PKGBUILDDIR>>/Units/Units'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/RandomObjects'
Making all in src
make[4]: Entering directory '/<<PKGBUILDDIR>>/RandomObjects/src'
g++ -DHAVE_CONFIG_H -I. -I../RandomObjects -I.. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -O -ansi -pedantic -Wall -D_GNU_SOURCE -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o RandMultiGauss.o RandMultiGauss.cc
g++ -DHAVE_CONFIG_H -I. -I../RandomObjects -I.. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -O -ansi -pedantic -Wall -D_GNU_SOURCE -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o RandomVector.o RandomVector.cc
test -d shared || mkdir shared
g++ -DHAVE_CONFIG_H -I. -I../RandomObjects -I.. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -O -ansi -pedantic -Wall -D_GNU_SOURCE -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPIC -c -o shared/RandMultiGauss.o RandMultiGauss.cc
g++ -DHAVE_CONFIG_H -I. -I../RandomObjects -I.. -I..  -Wdate-time -D_FORTIFY_SOURCE=2 -O -ansi -pedantic -Wall -D_GNU_SOURCE -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPIC -c -o shared/RandomVector.o RandomVector.cc
rm -f libCLHEP-RandomObjects-2.1.4.1.a
g++ -O -ansi -pedantic -Wall -D_GNU_SOURCE -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security  -flto=auto -ffat-lto-objects -Wl,-z,relro -o libCLHEP-RandomObjects-2.1.4.1.so -shared -Wl,--no-undefined -Wl,--as-needed -Wl,-soname,libCLHEP-RandomObjects-2.1.4.1.so shared/RandMultiGauss.o shared/RandomVector.o -L../../Random/src -lCLHEP-Random-2.1.4.1 -L../../Matrix/src -lCLHEP-Matrix-2.1.4.1 -L../../Vector/src -lCLHEP-Vector-2.1.4.1
ar cru libCLHEP-RandomObjects-2.1.4.1.a RandMultiGauss.o RandomVector.o 
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libCLHEP-RandomObjects-2.1.4.1.a
/usr/bin/ld: /tmp/ccNW0Os8.ltrans0.ltrans.o: in function `CLHEP::HepRandomVector::operator()()':
./RandomObjects/src/../CLHEP/RandomObjects/RandomVector.icc:48: undefined reference to `CLHEP::HepVector::num_row() const'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:598: libCLHEP-RandomObjects-2.1.4.1.so] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/RandomObjects/src'
make[3]: *** [Makefile:457: all-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/RandomObjects'
make[2]: *** [Makefile:466: all-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j8 returned exit code 2
make[1]: *** [debian/rules:34: override_dh_auto_build-indep] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:38: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2



More information about the debian-science-maintainers mailing list