Bug#1015602: python-sfml: ftbfs with LTO (link time optimization) enabled

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


Package: src:python-sfml
Version: 2.2~git20150611.196c88+dfsg-7
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/python-sfml_2.2~git20150611.196c88+dfsg-7_unstable_dpkglto.log
The last lines of the build log are at the end of this report.

[...]
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 -Iinclude -I/usr/include/python3.9 -c src/sfml/system.cpp -o build/temp.linux-x86_64-3.9/src/sfml/system.o -fpermissive
src/sfml/system.cpp:11254:18: warning: ‘PyObject* __pyx_pf_4sfml_6system_7Vector3_7__div___3genexpr(PyObject*)’ defined but not used [-Wunused-function]
11254 | static PyObject *__pyx_pf_4sfml_6system_7Vector3_7__div___3genexpr(PyObject *__pyx_self) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sfml/system.cpp:9525:18: warning: ‘PyObject* __pyx_pf_4sfml_6system_7Vector3_7__div___genexpr(PyObject*)’ defined but not used [-Wunused-function]
 9525 | static PyObject *__pyx_pf_4sfml_6system_7Vector3_7__div___genexpr(PyObject *__pyx_self) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sfml/system.cpp:5781:18: warning: ‘PyObject* __pyx_pf_4sfml_6system_7Vector2_8__idiv___genexpr(PyObject*)’ defined but not used [-Wunused-function]
 5781 | static PyObject *__pyx_pf_4sfml_6system_7Vector2_8__idiv___genexpr(PyObject *__pyx_self) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sfml/system.cpp:4280:18: warning: ‘PyObject* __pyx_pf_4sfml_6system_7Vector2_7__div___genexpr(PyObject*)’ defined but not used [-Wunused-function]
 4280 | static PyObject *__pyx_pf_4sfml_6system_7Vector2_7__div___genexpr(PyObject *__pyx_self) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-g++ -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/src/sfml/error.o build/temp.linux-x86_64-3.9/src/sfml/system.o -lsfml-system -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_sfml/build/sfml/system.cpython-39-x86_64-linux-gnu.so
/usr/bin/ld: /tmp/ccfwRXs5.ltrans0.ltrans.o: relocation R_X86_64_32 against `.bss' 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-g++' 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 
/<<PKGBUILDDIR>>/setup.py:5: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.core import setup, Command, Extension
running build
running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_sfml/build/sfml
copying src/sfml/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_sfml/build/sfml
copying src/sfml/sf.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_sfml/build/sfml
running build_ext
cythoning src/sfml/system.pyx to src/sfml/system.cpp
/usr/lib/python3/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /<<PKGBUILDDIR>>/src/sfml/system.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
cythoning src/sfml/window.pyx to src/sfml/window.cpp
/usr/lib/python3/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /<<PKGBUILDDIR>>/src/sfml/window.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
cythoning src/sfml/graphics.pyx to src/sfml/graphics.cpp
/usr/lib/python3/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /<<PKGBUILDDIR>>/src/sfml/graphics.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
cythoning src/sfml/audio.pyx to src/sfml/audio.cpp
/usr/lib/python3/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /<<PKGBUILDDIR>>/src/sfml/audio.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
cythoning src/sfml/network.pyx to src/sfml/network.cpp
/usr/lib/python3/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /<<PKGBUILDDIR>>/src/sfml/network.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
building 'sfml.system' extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/src
creating build/temp.linux-x86_64-3.10/src/sfml
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 -Iinclude -I/usr/include/python3.10 -c src/sfml/error.cpp -o build/temp.linux-x86_64-3.10/src/sfml/error.o -fpermissive
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 -Iinclude -I/usr/include/python3.10 -c src/sfml/system.cpp -o build/temp.linux-x86_64-3.10/src/sfml/system.o -fpermissive
src/sfml/system.cpp:11254:18: warning: ‘PyObject* __pyx_pf_4sfml_6system_7Vector3_7__div___3genexpr(PyObject*)’ defined but not used [-Wunused-function]
11254 | static PyObject *__pyx_pf_4sfml_6system_7Vector3_7__div___3genexpr(PyObject *__pyx_self) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sfml/system.cpp:9525:18: warning: ‘PyObject* __pyx_pf_4sfml_6system_7Vector3_7__div___genexpr(PyObject*)’ defined but not used [-Wunused-function]
 9525 | static PyObject *__pyx_pf_4sfml_6system_7Vector3_7__div___genexpr(PyObject *__pyx_self) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sfml/system.cpp:5781:18: warning: ‘PyObject* __pyx_pf_4sfml_6system_7Vector2_8__idiv___genexpr(PyObject*)’ defined but not used [-Wunused-function]
 5781 | static PyObject *__pyx_pf_4sfml_6system_7Vector2_8__idiv___genexpr(PyObject *__pyx_self) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/sfml/system.cpp:4280:18: warning: ‘PyObject* __pyx_pf_4sfml_6system_7Vector2_7__div___genexpr(PyObject*)’ defined but not used [-Wunused-function]
 4280 | static PyObject *__pyx_pf_4sfml_6system_7Vector2_7__div___genexpr(PyObject *__pyx_self) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x86_64-linux-gnu-g++ -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/src/sfml/error.o build/temp.linux-x86_64-3.10/src/sfml/system.o -lsfml-system -o /<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_sfml/build/sfml/system.cpython-310-x86_64-linux-gnu.so
/usr/bin/ld: /tmp/cc48rTCm.ltrans0.ltrans.o: relocation R_X86_64_32 against `.bss' 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-g++' 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: *** [debian/rules:10: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2



More information about the Pkg-games-devel mailing list