This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients cstratak, hroncok, pablogsal, petr.viktorin, vstinner
Date 2020-10-26.22:34:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1603751687.99.0.243163164232.issue42164@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-10-26 22:34:48pablogsalsetrecipients: + pablogsal, vstinner, petr.viktorin, cstratak, hroncok
2020-10-26 22:34:47pablogsalsetmessageid: <1603751687.99.0.243163164232.issue42164@roundup.psfhosted.org>
2020-10-26 22:34:47pablogsallinkissue42164 messages
2020-10-26 22:34:47pablogsalcreate