#1015601 python-pylibacl: ftbfs with LTO (link time optimization) enabled

#1015601#5
Date:
2022-07-19 16:58:41 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/python-pylibacl_0.6.0-2_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
dpkg-buildpackage: info: host architecture amd64
dpkg-source: info: using options from python-pylibacl-0.6.0/debian/source/options: --extend-diff-ignore=^[^/]+\.egg-info/
 debian/rules clean
dh clean --with python3,sphinxdoc --buildsystem=pybuild
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_clean
I: pybuild base:239: python3.9 setup.py clean
running clean
removing '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pylibacl/build' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.9' does not exist -- can't clean it
I: pybuild base:239: python3.10 setup.py clean
running clean
removing '/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_pylibacl/build' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.10' does not exist -- can't clean it
/usr/bin/make clean
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -rf doc/html doc/doctrees
rm -f doc/readme.md doc/news.rst
rm -f posix1e.so
rm -f *.so
rm -rf build
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 debian/rules binary
dh binary --with python3,sphinxdoc --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:239: python3.9 setup.py config
running config
I: pybuild base:239: python3.10 setup.py config
running config
   debian/rules override_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_build
I: pybuild base:239: /usr/bin/python3.9 setup.py build
running build
running build_ext
building 'posix1e' extension
creating build
creating build/temp.linux-x86_64-3.9
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_LINUX -DHAVE_LEVEL2 -DHAVE_ACL_COPY_EXT -I/usr/include/python3.9 -c acl.c -o build/temp.linux-x86_64-3.9/acl.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -flto=auto -ffat-lto-objects -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-z,now -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.9/acl.o -lacl -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_pylibacl/build/posix1e.cpython-39-x86_64-linux-gnu.so
/usr/bin/ld: /tmp/ccbqySFR.ltrans0.ltrans.o: relocation R_X86_64_32 against undefined symbol `PyUnicode_FSConverter' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
E: pybuild pybuild:369: build: plugin distutils failed with: exit code=1: /usr/bin/python3.9 setup.py build
I: pybuild base:239: /usr/bin/python3 setup.py build
running build
running build_ext
building 'posix1e' extension
creating build/temp.linux-x86_64-3.10
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_LINUX -DHAVE_LEVEL2 -DHAVE_ACL_COPY_EXT -I/usr/include/python3.10 -c acl.c -o build/temp.linux-x86_64-3.10/acl.o
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -flto=auto -ffat-lto-objects -specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-z,now -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.10/acl.o -lacl -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_pylibacl/build/posix1e.cpython-310-x86_64-linux-gnu.so
/usr/bin/ld: /tmp/cckri8oM.ltrans0.ltrans.o: relocation R_X86_64_32 against undefined symbol `PyUnicode_FSConverter' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
E: pybuild pybuild:369: build: plugin distutils failed with: exit code=1: /usr/bin/python3 setup.py build
dh_auto_build: error: pybuild --build -i python{version} -p "3.9 3.10" returned exit code 13
make[1]: *** [debian/rules:21: override_dh_auto_build] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:17: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1015601#10
Date:
2023-01-20 13:19:46 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-pylibacl, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1015601@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Iustin Pop <iustin@debian.org> (supplier of updated python-pylibacl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 20 Jan 2023 14:01:09 +0100
Source: python-pylibacl
Architecture: source
Version: 0.6.0-3
Distribution: unstable
Urgency: medium
Maintainer: Iustin Pop <iustin@debian.org>
Changed-By: Iustin Pop <iustin@debian.org>
Closes: 986190 1015601
Changes:
 python-pylibacl (0.6.0-3) unstable; urgency=medium
 .
   * Re-enable PIE (builds just fine nowadays) (Closes: #986190).
   * Enable LTO builds (Closes: #1015601).
   * Bump standars version to 4.6.2 (no changes).
Checksums-Sha1:
 2e8303e41da57a0e8c32ea261dd56cdf050df7a1 2407 python-pylibacl_0.6.0-3.dsc
 04b9e46b8ed9ccc970ab8154e82a036eac5b6673 9008 python-pylibacl_0.6.0-3.debian.tar.xz
 0a1678480837ed13d21f8598342e2800291bc7ca 9319 python-pylibacl_0.6.0-3_source.buildinfo
Checksums-Sha256:
 4db00d74e26094f0089c4868821ffab5efa963d76cdf1fdb9ed96641aee586a3 2407 python-pylibacl_0.6.0-3.dsc
 9d1f1bc91f82c612fae99f96f72dda65b613afe18d5a17a9109416ee96739761 9008 python-pylibacl_0.6.0-3.debian.tar.xz
 81ef41e372714a445573f8647f0b69ca148111087b3e776bc3db886afc208339 9319 python-pylibacl_0.6.0-3_source.buildinfo
Files:
 9b5cf9f8eeaf34a12a909523f13ba7bf 2407 python optional python-pylibacl_0.6.0-3.dsc
 4bc22ea74fa9868b21b8ac8a5cb3e6f8 9008 python optional python-pylibacl_0.6.0-3.debian.tar.xz
 fd6f3380c8760cb31ec947e40f93cb5c 9319 python optional python-pylibacl_0.6.0-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEy5TjqjsXVdYeuxml9m4+QZ+E9N4FAmPKkocSHGl1c3RpbkBk
ZWJpYW4ub3JnAAoJEPZuPkGfhPTe6u4P/RswOS6YRC0uIPnjOmCqPPgg3L5CjnM6
iTQrOTDlS9m+1gCO966QN0QPj92eD6q7iN3L6pe6tFcVAgtW0uO1X5eHZIjJPG0Y
MCpHIut+GBQdhtJgS+gSz2p2aqM/uIiCi9XLBBCqp1C/OTpU+ywN4bjvWGw08LAh
61vQS0ES9MTcf8omyCg+/8CiPPnMOeBIoxBGvzDzWQWnoDOxkcVXyxJocxcH0jqX
LblRvNcRg/ha5y2LDAtrIZRNztlazU2z0U9SWN74mxXlozAzQkBx9r94YVvzEkrb
MWNIGahKVyTH70Gvln82XGf325WMyUTwRvbscUeuCBzWw0MtDyaEN9J97+pc4oIX
jRx2W3sc7/REM4+xtNkmfin7aIr+OBo2zgFVH2V9T++20rhnZSlrmU9Gcm+3op1m
YlqauDxwM+LNmgDeV62fYYMtbc59f9eH375zVfek3oDzTYz2nS0TnVZUu5w58Z1k
MvfKHcpqfT5dlytciI9UJTJGIgsGzlL6P+Z+1Q2tELgxqmi/kPEVfxACkvBDeWgd
XlOpyfFzRH+PtsPepdUaYv7c7SCzsgiS0+qaHDWOVZQJKIaWg2YwA2OiDMP+ZoBb
SaJKVeMn61QW+2ATUpFTYoqDa5mAymiqnCfPrlMGwCRHZOMFjnKFS1NH5c8itwd7
rLFMb3uJu9Vs
=ikFw
-----END PGP SIGNATURE-----