Cython failed to build from source in Fedora rawhide/f42 https://koji.fedoraproject.org/koji/taskinfo?taskID=127924095 For details on the mass rebuild see: https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild Please fix Cython at your earliest convenience and set the bug's status to ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks, Cython will be orphaned. Before branching of Fedora 43, Cython will be retired, if it still fails to build. For more details on the FTBFS policy, please visit: https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
Created attachment 2068136 [details] build.log file build.log too big, will only attach last 32768 bytes
Created attachment 2068137 [details] root.log file root.log too big, will only attach last 32768 bytes
Created attachment 2068138 [details] state.log
*** Bug 2339442 has been marked as a duplicate of this bug. ***
This happens on i686 only. I suspect new GCC. [1/1] Cythonizing /builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/TEST_TMP/13/run/cpp/test_coroutines_pep492/_cython_inline_6247805861fdc161ed9e93cb512f8014515f9160.pyx Sharded tests run in 1283 seconds (21.4 minutes) Errors found in shards 2 Errors from shard 2: ====================================================================== ERROR: test_many_expressions (test_fstring.TestCase.test_many_expressions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn subprocess.check_call(cmd, env=_inject_macos_ver(env)) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/subprocess.py", line 419, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/gcc', '-fno-strict-overflow', '-Wsign-compare', '-DDYNAMIC_ANNOTATIONS_ENABLED=1', '-DNDEBUG', '-fexceptions', '-fexceptions', '-fexceptions', '-O3', '-O2', '-flto=auto', '-ffat-lto-objects', '-fexceptions', '-g', '-grecord-gcc-switches', '-pipe', '-Wall', '-Werror=format-security', '-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3', '-Wp,-D_GLIBCXX_ASSERTIONS', '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', '-fstack-protector-strong', '-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1', '-m32', '-march=i686', '-mtune=generic', '-msse2', '-mfpmath=sse', '-mstackrealign', '-fasynchronous-unwind-tables', '-fstack-clash-protection', '-fPIC', '-I/usr/include/python3.13', '-c', '/builddir/.cython/inline/_cython_inline_fae520cf9f4445569fc04a9d01e2ace99b92765c.c', '-o', '/builddir/.cython/inline/builddir/.cython/inline/_cython_inline_fae520cf9f4445569fc04a9d01e2ace99b92765c.o']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/setuptools/_distutils/unixccompiler.py", line 200, in _compile self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/ccompiler.py", line 1044, in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/spawn.py", line 76, in spawn raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "tests/run/test_fstring.pyx", line 536, in test_fstring.TestCase.test_many_expressions (test_fstring.c:27603) self.assertEqual(cy_eval(build_fstr(255)*3, x=x, width=width), (x+' ')*(255*3)) # CPython uses 255*256 File "tests/run/test_fstring.pyx", line 23, in test_fstring.cy_eval (test_fstring.c:7587) return cython_inline('return ' + s, force=True, **kwargs) File "/builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Build/Inline.py", line 294, in cython_inline build_extension.run() ~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run self.build_extensions() ~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions self._build_extensions_serial() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial self.build_extension(ext) ~~~~~~~~~~~~~~~~~~~~^^^^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 557, in build_extension objects = self.compiler.compile( sources, ...<5 lines>... depends=ext.depends, ) File "/usr/lib/python3.13/site-packages/setuptools/_distutils/ccompiler.py", line 605, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/unixccompiler.py", line 202, in _compile raise CompileError(msg) distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1 ====================================================================== ERROR: test_many_expressions (test_fstring.TestCase.test_many_expressions) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn subprocess.check_call(cmd, env=_inject_macos_ver(env)) ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/subprocess.py", line 419, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/usr/bin/gcc', '-fno-strict-overflow', '-Wsign-compare', '-DDYNAMIC_ANNOTATIONS_ENABLED=1', '-DNDEBUG', '-fexceptions', '-fexceptions', '-fexceptions', '-O3', '-O2', '-flto=auto', '-ffat-lto-objects', '-fexceptions', '-g', '-grecord-gcc-switches', '-pipe', '-Wall', '-Werror=format-security', '-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3', '-Wp,-D_GLIBCXX_ASSERTIONS', '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', '-fstack-protector-strong', '-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1', '-m32', '-march=i686', '-mtune=generic', '-msse2', '-mfpmath=sse', '-mstackrealign', '-fasynchronous-unwind-tables', '-fstack-clash-protection', '-fPIC', '-I/usr/include/python3.13', '-c', '/builddir/.cython/inline/_cython_inline_fae520cf9f4445569fc04a9d01e2ace99b92765c.c', '-o', '/builddir/.cython/inline/builddir/.cython/inline/_cython_inline_fae520cf9f4445569fc04a9d01e2ace99b92765c.o']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/setuptools/_distutils/unixccompiler.py", line 200, in _compile self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/ccompiler.py", line 1044, in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/spawn.py", line 76, in spawn raise DistutilsExecError( f"command {_debug(cmd)!r} failed with exit code {err.returncode}" ) from err distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "tests/run/test_fstring.pyx", line 536, in test_fstring.TestCase.test_many_expressions (test_fstring.cpp:27615) self.assertEqual(cy_eval(build_fstr(255)*3, x=x, width=width), (x+' ')*(255*3)) # CPython uses 255*256 File "tests/run/test_fstring.pyx", line 23, in test_fstring.cy_eval (test_fstring.cpp:7599) return cython_inline('return ' + s, force=True, **kwargs) File "/builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Build/Inline.py", line 294, in cython_inline build_extension.run() ~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run self.build_extensions() ~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions self._build_extensions_serial() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial self.build_extension(ext) ~~~~~~~~~~~~~~~~~~~~^^^^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/command/build_ext.py", line 557, in build_extension objects = self.compiler.compile( sources, ...<5 lines>... depends=ext.depends, ) File "/usr/lib/python3.13/site-packages/setuptools/_distutils/ccompiler.py", line 605, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/setuptools/_distutils/unixccompiler.py", line 202, in _compile raise CompileError(msg) distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1
Upstream says this is most likely caused by <4GB RAM per process. I suppose we should skip the test(s) on 32bit.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle. Changing version to 42.
(In reply to Miro Hrončok from comment #6) > Upstream says this is most likely caused by <4GB RAM per process. I suppose > we should skip the test(s) on 32bit. I tried an experiment to try to confirm this. First, $ fedpkg mockbuild --root fedora-rawhide-i386 which reproduced the problem. Then I added this at the beginning of %check to reduce the debuginfo level and therefore the memory usage: export CFLAGS="${CFLAGS} -g1" Then I repeated $ fedpkg mockbuild --root fedora-rawhide-i386 and observed that the build succeeded. So an alternative could be something like %check %ifarch %{ix86} export CFLAGS="${CFLAGS} -g1" %endif or %check %if 0%{?__isa_bits} < 64 export CFLAGS="${CFLAGS} -g1" %endif but given the problem is only in one test, adding that test to the list of ix86-specific skips that we already have would be perfectly reasonable too. In any case, the experiment seems to support the diagnosis.
Thank you! I like the %{?__isa_bits} version with -g1. It's "portable" and would fix this problem for future tests with the same issue. Would you like to open PR, so the fix is attributed to you? (If you don't want to, I can do that for you.)
(In reply to Miro Hrončok from comment #9) > Thank you! > > I like the %{?__isa_bits} version with -g1. It's "portable" and would fix > this problem for future tests with the same issue. > > Would you like to open PR, so the fix is attributed to you? (If you don't > want to, I can do that for you.) Sure! Here it is: https://src.fedoraproject.org/rpms/Cython/pull-request/68
FEDORA-2025-de498e89f1 (Cython-3.0.11-4.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2025-de498e89f1
FEDORA-2025-de498e89f1 (Cython-3.0.11-4.fc43) has been pushed to the Fedora 43 stable repository. If problem still persists, please make note of it in this bug report.
> %if 0%{?__isa_bits} < 64 > export CFLAGS="${CFLAGS} -g1" Nice fix, it makes sense, thank you!