[New-bugs-announce] [issue40505] getpath.c doesn't know about lib64

Marc-Andre Lemburg report at bugs.python.org
Mon May 4 17:51:07 EDT 2020


New submission from Marc-Andre Lemburg <mal at egenix.com>:

On platforms which configure identifies as bi-arch platform, libdir is set to $[exec_prefix}/lib64, which results in the C extensions to get installed in e.g. /usr/local/lib64/python3.8/lib-dynload/.

However, the getpath.c routines use a fixed "lib/python" VERSION (see https://github.com/python/cpython/blob/3.8/Modules/getpath.c#L1200) path to build sys.path. As a result, the built Python binary cannot load the builtin C extensions.

A work-around on OpenSUSE is to set CONFIG_SITE="" when configuring Python. This disables the bi-arch support and has libdir default to ${exec_prefix}/lib again.

Looking at the master branch, this may already have been fixed for 3.9, since a PLATLIBDIR variable is used instead. The patch would have to be backported to earlier Python versions as well.

----------
components: Interpreter Core
messages: 368086
nosy: lemburg
priority: normal
severity: normal
status: open
title: getpath.c doesn't know about lib64
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40505>
_______________________________________


More information about the New-bugs-announce mailing list