Bug 2339845 - Cython: FTBFS in Fedora rawhide/f42 i686
Summary: Cython: FTBFS in Fedora rawhide/f42 i686
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Cython
Version: 42
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2339442 (view as bug list)
Depends On:
Blocks: F42FTBFS 2337588 2341179 2344778
TreeView+ depends on / blocked
 
Reported: 2025-01-22 18:36 UTC by Fedora Release Engineering
Modified: 2025-02-28 09:34 UTC (History)
8 users (show)

Fixed In Version: Cython-3.0.11-4.fc43
Clone Of:
Environment:
Last Closed: 2025-02-27 21:08:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log (32.00 KB, text/plain)
2025-01-22 18:36 UTC, Fedora Release Engineering
no flags Details
root.log (32.00 KB, text/plain)
2025-01-22 18:36 UTC, Fedora Release Engineering
no flags Details
state.log (1.63 KB, text/plain)
2025-01-22 18:36 UTC, Fedora Release Engineering
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github cython cython issues 6667 0 None open [BUG] test_fstring.TestCase.test_many_expressions fails with GCC 15 on 32 bits 2025-02-13 02:52:22 UTC

Description Fedora Release Engineering 2025-01-22 18:36:31 UTC
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/

Comment 1 Fedora Release Engineering 2025-01-22 18:36:42 UTC
Created attachment 2068136 [details]
build.log

file build.log too big, will only attach last 32768 bytes

Comment 2 Fedora Release Engineering 2025-01-22 18:36:48 UTC
Created attachment 2068137 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2025-01-22 18:36:52 UTC
Created attachment 2068138 [details]
state.log

Comment 4 Fedora Release Engineering 2025-01-22 20:33:29 UTC
*** Bug 2339442 has been marked as a duplicate of this bug. ***

Comment 5 Miro Hrončok 2025-01-23 07:56:10 UTC
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

Comment 6 Miro Hrončok 2025-02-26 13:19:59 UTC
Upstream says this is most likely caused by <4GB RAM per process. I suppose we should skip the test(s) on 32bit.

Comment 7 Aoife Moloney 2025-02-26 13:25:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 8 Ben Beasley 2025-02-26 19:28:59 UTC
(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.

Comment 9 Miro Hrončok 2025-02-26 21:20:26 UTC
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.)

Comment 10 Ben Beasley 2025-02-27 13:13:26 UTC
(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

Comment 11 Fedora Update System 2025-02-27 20:10:48 UTC
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

Comment 12 Fedora Update System 2025-02-27 21:08:51 UTC
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.

Comment 13 Victor Stinner 2025-02-28 09:34:00 UTC
> %if 0%{?__isa_bits} < 64
> export CFLAGS="${CFLAGS} -g1"

Nice fix, it makes sense, thank you!


Note You need to log in before you can comment on or make changes to this bug.