classification
Title: configure.ac patch
Type: Stage:
Components: Build, Cross-Build Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: cavallo71, doko, eric.araujo, georg.brandl, larry, loewis, skrah, trent
Priority: normal Keywords:

Created on 2012-10-28 10:52 by cavallo71, last changed 2013-04-25 20:41 by cavallo71. This issue is now closed.

Files
File name Uploaded Description Edit
autoconfigure.diff cavallo71, 2012-10-28 10:52 autoconfig.ac patch review
Messages (4)
msg174028 - (view) Author: Antonio Cavallo (cavallo71) Date: 2012-10-28 10:52
I've noticed that linux distros have a set of patch to fix a hardcoded lib in their makefiles:

eg. Makefile.pre.in:
....
INCLUDEDIR=¬@includedir@
CONFINCLUDEDIR=¬$(exec_prefix)/include
SCRIPTDIR=¬…$(prefix)/lib        <== HARDCODED


This is due to the fact on the 64 bit they split lib and lib64 directories.

I understand that removing such hardcoded values will be a very long task (multiple places where lib is hardcoded). 

To make it into incremental steps I think a good idea would be to introduce two simple modification into the configure.ac script: they are transparent (eg. won't affect in anyway the current code) but will provide the base infrastructure to build upon.

Please find patch attached (mercurial ref 3fb84c1da8c5 / 79960)

I'm using a build infrastructure for testing the whole patch set (I've applied them in full in the past) at https://build.opensuse.org/project/packages?project=home%3Acavallo71%3Aopt-python-interpreters.
This tracks 2.7 but the patches should be easily ported in 3.x as well.

I hope this helps,
Antonio

PS. Would be possible to remove "tabs" from cofigure.ac?
msg174546 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-11-02 17:48
> This is due to the fact on the 64 bit they split lib and lib64 directories.
This depends on the specific multiarch implementation.  Debian 64-bit only has /usr/lib for instance.

I had a look at the patch but did not understand what it does.
msg174548 - (view) Author: Antonio Cavallo (cavallo71) Date: 2012-11-02 18:02
Hi,
the patch it is really simple, it adds the @LIB@ and @ARCH@ variables to the configure machinery. 

If you look into the Makefile.pre.in:

INCLUDEDIR=¬@includedir@
CONFINCLUDEDIR=¬$(exec_prefix)/include
SCRIPTDIR=¬…$(prefix)/lib


This hardcodes lib that can be right on debian derivatives but on many other distributions it would be lib64 (fedora and opensuse notable ones).

In theory SCRIPTDIR could be se to @libdir@ but...

Samples of that hardcoded path (lib) are spread all over the source code and there're specific patches for these.
 
This patch should make easier later on to fix these, in fact the patch should be totally safe (at least that would be my aim) with no impact.

I hope this helps,
thanks
msg187819 - (view) Author: Antonio Cavallo (cavallo71) Date: 2013-04-25 20:41
I suppose to reduce the noise is better close this, thanks
History
Date User Action Args
2013-04-25 20:41:36cavallo71setstatus: open -> closed
resolution: out of date
messages: + msg187819
2012-11-02 18:02:09cavallo71setmessages: + msg174548
2012-11-02 17:48:31eric.araujosetnosy: + eric.araujo
messages: + msg174546
2012-10-28 10:58:24pitrousetnosy: + loewis
2012-10-28 10:52:33cavallo71create