A brief description how i compiled Python 2.3.3 on Fedora Core 1 for AMD64 on struktur AG's brand new dual AMD Opteron killer machine.
- Look for /lib64 linked libraries in your system software.
[root@wrestling root]# ldd /bin/bash
libtermcap.so.2 => /lib64/libtermcap.so.2 (0x0000002a9566b000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000002a9576f000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95872000)
/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)
- Extract the downloaded tarballs to a temporary directory.
- Changedir into that directory.
- Now run the following commands to compile your python.
cd Python-2.3.3
patch -p1 <../patches/python-2.3-config.patch
patch -p1 <../patches/python-2.3.2-lib64.patch
export CFLAGS="-D_GNU_SOURCE -fPIC `pkg-config --cflags openssl`"
export CXXFLAGS="-D_GNU_SOURCE -fPIC `pkg-config --libs-only-L openssl`"
export OPT="-D_GNU_SOURCE -fPIC"
export LINKCC="gcc"
export CC=gcc
./configure --target=/usr/local/python2.3 --enable-ipv6 --enable-unicode=ucs4
make -j4
make install
- The patches are required to make the vanilla python tarball compile. They are taken from the Fedora Core developement trees python-2.3.3 source rpm.
- If the compiling went well you should proceed to the next section, to verify your build.
- Check that your python is linked against 64 bit libraries.
[root@wrestling root]# ldd /usr/local/python2.3/bin/python2.3
libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x0000002a9566b000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000002a9577f000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000002a95882000)
libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a95985000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95b0b000)
/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)
- Check the sys.maxint value.
[root@wrestling root]# /usr/local/python2.3/bin/python2.3
Python 2.3.3 (#4, Mar 26 2004, 15:53:11)
[GCC 3.3.2 20031022 (Red Hat Linux 3.3.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxint
9223372036854775807
- Please note that "large file support" is not required on a 64bit system, cause integer itself is 64bit.
- Have fun with 64 bit Python.