classification
Title: Problems with /usr/lib64 builds.
Type: Stage:
Components: Build Versions: Python 3.0, Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, Merwok, akitada, belopolsky, christian.heimes, doko, ivazquez, jafo, lemburg, matejcik, tarek (11)
Priority: normal Keywords patch

Created on 2005-09-19 03:05 by jafo, last changed 2009-11-06 17:41 by lemburg.

Files
File name Uploaded Description Edit Remove
python-2.3.4-lib64-regex.patch jafo, 2005-09-19 03:05 One of the Fedora patches.
python-2.4.1-lib64.patch jafo, 2005-09-19 03:06 Another of the Fedora patches.
japanese-codecs-lib64.patch jafo, 2005-09-19 03:06 The third obviously lib64 Fedora patch.
Python-2.6.2-multilib.patch matejcik, 2009-08-14 16:27 SUSE patch for the lib64 issue
Messages (14)
msg26314 - (view) Author: Sean Reifschneider (jafo) Date: 2005-09-19 03:05
This is something that's becoming more and more of a
problem as more people get systems that run both 32-bit
and 64-bit code.  There are patches (926209 858809) in
the tracker to resolve this issue, I don't know exactly
what state they are in.  They seem fairly old, one is
closed and one is still open.

The Fedora RPMs include the following patches for lib64
(attached).

Any thoughts on what we need to do to allow building
lib64 as a part of the standard release?  Or do we just
want to wait for these terrible transition days to end
and rely on 32+64 packagers to deal with it?

Here's a short run-down of the situation:  Some systems
can run both 32 and 64 bit software.  On these systems
you *CAN* install a native 64-bit tool-chain, but some
people set up both 32 and 64 bit software on these
systems for compatibility.  You can do 32+64 in a
couple of ways, one is to set up a "chroot" environment
for the secondary (typically 32-bit) set of libraries
and programs.  The other is to run the system with
64-bit libraries in /usr/lib64 and 32-bit in /usr/lib
(because most software that needs compatibility would
be running against /usr/lib, not /usr/lib32).

It's a kludge to be sure, but if you need any legacy
software that you do not have source for, this is a way
of getting 64-bits while still retaining the ability to
run 32-bit  This is not a problem for systems which
only run 64-bit code, nor is it a problem for these
32+64 systems which are running only 64-bit
distributions on them.

Thoughts?
Sean
msg59310 - (view) Author: Christian Heimes (christian.heimes) Date: 2008-01-05 19:33
The problem with 64 bit builds should be discussed before we release
2.6. Another bug day topic.
msg64592 - (view) Author: Alexander Belopolsky (belopolsky) Date: 2008-03-27 14:11
Can someone update the priority so that this is looked at before the 2.6 
release?
msg64593 - (view) Author: Alexander Belopolsky (belopolsky) Date: 2008-03-27 14:31
Placing the entire library tree in /usr/lib64 is wasteful on dual 
32/64bit installation, but placing just the C modules there is contrary 
to python import logic and may cause problems to relative imports.

I have suggested what I believed was a workable solution: have 64-bit 
python search lib64-dynload subdirectories instead of lib-dynload.

See http://mail.python.org/pipermail/python-dev/2007-April/072653.html

Currently $(prefix)/pythonX.Y/lib-dynload is inserted in the sys.path, 
but I think it would be better to handle this inside the importer in a 
way similar to how the importer looks for both foo.so and foomodule.so 
when importing foo. This would allow submodules and user modules treated  
the same way.
msg81099 - (view) Author: Akira Kitada (akitada) Date: 2009-02-03 21:23
Similar problem report: http://bugs.python.org/issue1019715
msg82929 - (view) Author: Akira Kitada (akitada) Date: 2009-02-28 17:32
3rd party C modules are put in site-packages,
so just having importer of 64-bit python look at lib64-dynload is not
enough for solving this.

To work around this problem, I did some hacks on my local Python to look
at lib and lib64. It worked, but just as belopolsky said, this is
wasteful and ugly.
msg91559 - (view) Author: jan matejek (matejcik) Date: 2009-08-14 16:27
for completenes, here's a patch that's in use in SUSE. it's advantage
over Fedora's is that it works on both 32bit and 64bit installs
msg91769 - (view) Author: Matthias Klose (doko) Date: 2009-08-20 11:01
both patches assume that everybody uses lib64 for 64bit libs, which is
not true for Debian/Ubuntu. Even the FHS doesn't mandate the use of lib64.
msg91781 - (view) Author: jan matejek (matejcik) Date: 2009-08-20 18:29
well in our patch, at least, the directory is governed by sys.lib which
is defined through configure.
i don't understand the configure language well enough, but i'd assume
that making it parametrized isn't too hard?
msg92541 - (view) Author: Akira Kitada (akitada) Date: 2009-09-12 12:46
I think this is duplicate of issue858809.
msg94941 - (view) Author: Éric Araujo (Merwok) Date: 2009-11-05 19:23
If I understand correctly, using lib32 or lib64 is a kludge. Debian
and Ubuntu want to come up with a better way to do this:
http://wiki.debian.org/ReleaseGoals/MultiArch
https://wiki.ubuntu.com/MultiarchSpec

Kind regards.
msg94982 - (view) Author: jan matejek (matejcik) Date: 2009-11-06 16:26
thanks for the info; however, it still means that python needs to learn
to live in places other than "/usr/lib"
msg94986 - (view) Author: Marc-Andre Lemburg (lemburg) Date: 2009-11-06 17:27
jan matejek wrote:
> 
> jan matejek <jmatejek@suse.cz> added the comment:
> 
> thanks for the info; however, it still means that python needs to learn
> to live in places other than "/usr/lib"

The main problem is that Python's configuration system is not
geared up to having the lib directories for platform dependent
and platform independent parts use different names.

It currently only supports using different path *prefixes* for
such setups (--prefix and --exec-prefix), e.g. /usr and /usr64
would work just fine. It doesn't follow --libdir.

Note that Tarek is currently working on a cleanup of the
installation schemes (see distutils/commands/install.py,
distutils/sysconfig.py and site.py) which will then also
be used by site.py to setup sys.path.

A new modules will unite all these settings, so this should
be the target of any patches regarding installation and
path lookup schemes.

BTW: The "sys.lib" setting mentioned on the tracker is not standard.
The naming also doesn't look right, since the name of the "lib"
directory path component is an OS feature, not a system one that
you configure. os.lib_dir would be more appropriate.
msg94989 - (view) Author: Marc-Andre Lemburg (lemburg) Date: 2009-11-06 17:41
Adding Tarek to the ticket.
History
Date User Action Args
2009-11-06 17:41:23lemburgsetnosy: + tarek
messages: + msg94989
2009-11-06 17:27:21lemburgsetnosy: + lemburg
messages: + msg94986
2009-11-06 16:47:16Arfreversetnosy: + Arfrever
2009-11-06 16:26:22matejciksetmessages: + msg94982
2009-11-05 19:23:07Merwoksetnosy: + Merwok
messages: + msg94941
2009-09-12 12:46:31akitadasetmessages: + msg92541
2009-08-20 18:29:01matejciksetmessages: + msg91781
2009-08-20 11:01:02dokosetnosy: + doko
messages: + msg91769
2009-08-14 16:27:32matejciksetfiles: + Python-2.6.2-multilib.patch

messages: + msg91559
2009-03-30 04:23:41ajaksu2linkissue1536339 superseder
2009-03-30 03:23:22ajaksu2linkissue1553166 superseder
2009-03-03 16:17:33matejciksetnosy: + matejcik
2009-02-28 17:32:01akitadasetmessages: + msg82929
2009-02-03 21:23:29akitadasetnosy: + akitada
messages: + msg81099
2008-03-27 14:31:02belopolskysetmessages: + msg64593
2008-03-27 14:11:17belopolskysetnosy: + belopolsky
messages: + msg64592
2008-02-03 07:18:05ivazquezsetnosy: + ivazquez
2008-01-05 19:33:54christian.heimessetkeywords: + patch
nosy: + christian.heimes
messages: + msg59310
components: + Build, - None
versions: + Python 2.6, Python 3.0
2005-09-19 03:05:28jafocreate