472,102 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,102 software developers and data experts.

Install from source on a x86_64 machine

Hello all,

Being relatively new to linux I'm a little confused about what options
I need to use to build python from source.

Currently, I have python installed as part of the inital RHEL4 load
located at /usr/bin/Python and /usr/bin/Python2.3 . Some of the files
are located in /usr/lib64/Python2.3 and in /usr/lib/Python2.3 .
Please let me know if you need dir lsitings.

I'm trying to compile from source and plan on using the
--enable-unicode=ucs4 option for the configure script due to some RHEL
messing around with Tcl/Tk.

*** How do I get make altinstall to put the appropriate files in
/usr/lib64/Python2.4 and /usr/lib/Python2.4 respectively ? ***

Respectfully,
Christopher Taylor
Oct 18 '06 #1
4 1645
Christopher Taylor wrote:
>
Being relatively new to linux I'm a little confused about what options
I need to use to build python from source.
The README should provide sufficient information, although if you want
to install Python into /usr rather than /usr/local (as I believe is the
default), you need to run configure as follows:

../configure --prefix=/usr
Currently, I have python installed as part of the inital RHEL4 load
located at /usr/bin/Python and /usr/bin/Python2.3 . Some of the files
are located in /usr/lib64/Python2.3 and in /usr/lib/Python2.3 .
Please let me know if you need dir lsitings.
In fact, it's /usr/bin/python, /usr/bin/python2.3, /usr/lib64/python2.3
and /usr/lib/python, since Red Hat hasn't decided to capitalise the
name of the software. ;-)
I'm trying to compile from source and plan on using the
--enable-unicode=ucs4 option for the configure script due to some RHEL
messing around with Tcl/Tk.

*** How do I get make altinstall to put the appropriate files in
/usr/lib64/Python2.4 and /usr/lib/Python2.4 respectively ? ***
The configured Makefile together with the various other tools should
work out where to put the libraries. I'm a newcomer to x86-64, although
I've had some relatively recent experience with sparc64, and whilst I'm
not really familiar with the way the various tools choose the install
directory of libraries, I've noticed that sometimes 64-bit libraries
end up in lib rather than lib64. Meanwhile, I notice that the Red Hat
libraries do adhere correctly to the expectation that 32-bit libraries
are found under /usr/lib/python2.3 and 64-bit libraries are found under
/usr/lib64/python2.3.

Perhaps you should configure and make Python, then run the install
process in "pretend" mode:

make -n altinstall

You'll get a huge amount of output, but this should at least tell you
what the installation process is thinking of doing, and it won't be
overwriting anything important while it does so.

Paul

Oct 19 '06 #2
The README should provide sufficient information, although if you want
to install Python into /usr rather than /usr/local (as I believe is the
default), you need to run configure as follows:

./configure --prefix=/usr
Yeah, I saw that in the readme.
>
In fact, it's /usr/bin/python, /usr/bin/python2.3, /usr/lib64/python2.3
and /usr/lib/python, since Red Hat hasn't decided to capitalise the
name of the software. ;-)
ok you got me, type-o ....
The configured Makefile together with the various other tools should
work out where to put the libraries. I'm a newcomer to x86-64, although
I've had some relatively recent experience with sparc64, and whilst I'm
not really familiar with the way the various tools choose the install
directory of libraries, I've noticed that sometimes 64-bit libraries
end up in lib rather than lib64. Meanwhile, I notice that the Red Hat
libraries do adhere correctly to the expectation that 32-bit libraries
are found under /usr/lib/python2.3 and 64-bit libraries are found under
/usr/lib64/python2.3.

Perhaps you should configure and make Python, then run the install
process in "pretend" mode:

make -n altinstall

You'll get a huge amount of output, but this should at least tell you
what the installation process is thinking of doing, and it won't be
overwriting anything important while it does so.

ok, so where does that leave me. I'm not even sure which files
*should* be put in /lib64 vs lib.
>>I guess what I'm expecting is a congifure option to specify where
architecture dependent files should be put. <<<

Has anyone else mentioned this before?

Respectfully,
Christopher Taylor
Oct 19 '06 #3
Christopher Taylor wrote:
>
ok, so where does that leave me. I'm not even sure which files
*should* be put in /lib64 vs lib.
I'd imagine that anything which is a .so file (plus the modules which
depend on it, I suppose) should be put in the appropriate library
directory. Thus, 32-bit libraries should go into
/usr/lib/python2.4/site-packages and 64-bit libraries should go into
/usr/lib64/python2.4/site-packages. That said, I can see things that
I've installed via distutils (and various make; make install
combinations) that are in the "wrong" directory.
>I guess what I'm expecting is a congifure option to specify where
architecture dependent files should be put. <<<
Generally, the install process should respect the prefix (ie. /usr in
your case, /usr/local in the default case) and then choose the
appropriate library directories below that (ie. /usr/lib, /usr/lib64 in
your case), but I can't find anything obvious in the README about
specifying architecture-dependent install directories.
Has anyone else mentioned this before?
I'd be interested to hear more about this as well.

Paul

Oct 19 '06 #4
Generally, the install process should respect the prefix (ie. /usr in
your case, /usr/local in the default case) and then choose the
appropriate library directories below that (ie. /usr/lib, /usr/lib64 in
your case), but I can't find anything obvious in the README about
specifying architecture-dependent install directories.

Well that's pretty much what's happening ... either the 64bit libs
aren't being put in /usr/lib64 ... they're all being put in /usr/lib
or they were never compiled up in 64bit mode. The only think I can
think of is that the configure script doesn't check the mode the OS is
running in and take appropriate steps, ie.e compile the libs in both
32 and 64 bit mode and place them accordingly.

I know this is a problem because when I try and compile up mod_python
it's telling I'm getting the following error when it tries to link
libpython2.4.a :
/usr/bin/ld: /usr/lib/python2.4/config/libpython2.4.a(abstract.o):
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
/usr/lib/python2.4/config/libpython2.4.a: could not read symbols: Bad value

Which basically means to me that for whatever reason, when python
compiled up, the ./configure script didn't see that the os was running
in 64bit mode and compile the libraries in PIC mode, something I think
that is required for libraries on a 64bit OS.
Respectfully,
Christopher Taylor
Oct 19 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Peter Hartmann | last post: by
1 post views Thread by Peter Hartmann | last post: by
7 posts views Thread by p | last post: by
reply views Thread by DarkBlue | last post: by
3 posts views Thread by Florian Demmer | last post: by
3 posts views Thread by Bruno LIVERNAIS | last post: by
2 posts views Thread by danfan46 | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.