[New-bugs-announce] [issue11715] Building Python on multiarch Debian and Ubuntu

Barry A. Warsaw report at bugs.python.org
Tue Mar 29 23:48:20 CEST 2011

New submission from Barry A. Warsaw <barry at python.org>:

Ubuntu 11.04 introduces new directories for libraries and headers to support multiple architectures on a single machine.  E.g. 64bit and 32bit on a 64bit Ubuntu.  Here are the specs:


Unlike issue 1294959 this bug simply covers building Python and its stdlib extension modules on such systems.  For example, libsqlite3.so is no longer in /usr/lib but instead in /usr/lib/x86_64-linux-gnu on Ubuntu 11.04.  This means that a number of extension modules which depend on these 3rd party shared libraries simply won't build, because setup.py is too naive about the paths it searches.

The fix is fairly simple; you have to call out to dpkg-architecture to get the value of the platform's architecture and append that to /usr/lib and /usr/include for setup.py's search paths.  See the attached branch and patch for a candidate fix.

Because this does not introduce a new feature, it simply fixes the build process for changes to already supported platforms, I would like to apply this to Python 2.5 through 3.3.

components: Build
hgrepos: 13
messages: 132536
nosy: barry
priority: high
severity: normal
status: open
title: Building Python on multiarch Debian and Ubuntu
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list