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.

classification
Title: DTrace on RHEL7, generated Include/pydtrace_probes.h fails to build: error: impossible constraint in ‘asm’
Type: Stage: resolved
Components: Build Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cstratak, hroncok, vstinner
Priority: normal Keywords:

Created on 2021-09-09 22:37 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg401526 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-09-09 22:37
I modified RHEL7 configuration to build Python using --with-dtrace:

 argv: [b'./configure', b'--prefix', b'$(PWD)/target', b'--with-pydebug', b'--with-platlibdir=lib64', b'--enable-ipv6', b'--enable-shared', b'--with-computed-gotos=yes', b'--with-dbmliborder=gdbm:ndbm:bdb', b'--enable-loadable-sqlite-extensions', b'--with-dtrace', b'--with-lto', b'--with-ssl-default-suites=openssl', b'--without-static-libpython', b'--with-valgrind']

Problem: the generated Include/pydtrace_probes.h failed to build :-(

---
/usr/bin/dtrace  -o Include/pydtrace_probes.h -h -s Include/pydtrace.d
sed 's/PYTHON_/PyDTrace_/' Include/pydtrace_probes.h > Include/pydtrace_probes.h.tmp
mv Include/pydtrace_probes.h.tmp Include/pydtrace_probes.h
(...)
In file included from ./Include/pydtrace_probes.h:10:0,
                 from ./Include/pydtrace.h:11,
                 from Modules/gcmodule.c:33:
Modules/gcmodule.c: In function ‘gc_collect_main’:
./Include/pydtrace_probes.h:98:1: error: impossible constraint in ‘asm’
 DTRACE_PROBE1 (python, gc__start, arg1)
 ^
./Include/pydtrace_probes.h:109:1: error: impossible constraint in ‘asm’
 DTRACE_PROBE1 (python, gc__done, arg1)
 ^
---

Full logs of AMD64 RHEL7 3.x:
https://buildbot.python.org/all/#/builders/15/builds/761

In the meantime, I disabled --with-dtrace since other buildbot workers failed when dtrace was no installed. See:
https://github.com/python/buildmaster-config/pull/264

Maybe it's a problem on RHEL7. Maybe the problem is that Python is built with LTO?
msg401527 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-09-09 22:37
Similar error with Python 3.10, AMD64 RHEL7 3.10 logs:
https://buildbot.python.org/all/#/builders/666/builds/344
msg401733 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-09-13 20:53
Issue worked around by disabling LTO on RHEL7 buildbots:
https://github.com/python/buildmaster-config/commit/b8e56c0a545b8f5176c6984dd38a4e2630f21306
History
Date User Action Args
2022-04-11 14:59:49adminsetgithub: 89320
2021-09-13 20:53:52vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg401733

stage: resolved
2021-09-09 22:37:56vstinnersetmessages: + msg401527
2021-09-09 22:37:07vstinnercreate