New submission from Pablo Galindo Salgado <pablog...@gmail.com>:

I have been trying to diagnose this failure:

https://buildbot.python.org/all/#/builders/271/builds/710/steps/3/logs/stdio

it happens on these buildbots:

x86_64 fedora stable
ppc64le fedora stable (so 32 now)

It seems that CPython cannot be compiled with --with-lto regardless of the 
version:

https://buildbot.python.org/all/#/builders/336/builds/2145
https://buildbot.python.org/all/#/builders/426/builds/641
https://buildbot.python.org/all/#/builders/294/builds/986

This seems to indicate that something has changed in these buildbots somehow. 
Maybe the gcc installation is broken?

In my investigation, it seems that Python/compile.o is miscompiled.For example

FEDORA BUILDBOT with LTO:

[buildbot@python-builder2-rawhide cpython]$ nm Python/compile.o  | grep 
_Py_Mangle
In function ‘assemble_lnotab’,
    inlined from ‘assemble_emit’ at Python/compile.c:5696:25,
    inlined from ‘assemble’ at Python/compile.c:6038:18:
Python/compile.c:5650:19: warning: writing 1 byte into a region of size 0 
[-Wstringop-overflow=]
 5650 |         *lnotab++ = k;
      |                   ^
         U _Py_Mangle


MY ARCH LINUX SYSTEM:

❯ nm Python/compile.o  | grep _Py_Mangle
00000000 T _Py_Mangle

It seems that the _Py_Mangle is not included in the object file. Is this a gcc 
bug? I have not been able to diagnose exactly where does this problem. It seems 
that the gcc version is "10.2.1" but I can correctly build CPython with LTO in 
my arch Linux machine with gcc 10.2.0.

Given that these are stable buildbots, could you investigate what is going on 
or report this to the gcc folks ar RedHat/Fedora? 

----

More interesting data:

Compiling with -O0 does not have a problem, but doing it with -O3 does.

With -O0:

[buildbot@python-builder2-rawhide cpython]$ nm Python/compile.o  | grep 
_Py_Mangle
00000000 T _Py_Mangle

With -O3:

[buildbot@python-builder2-rawhide cpython]$ nm Python/compile.o  | grep 
_Py_Mangle
         U _Py_Mangle

----------
components: Build
messages: 379696
nosy: cstratak, hroncok, pablogsal, petr.viktorin, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Python fails to compile in the Fedora Stable LTO buildbots
type: compile error
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42164>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to