Differences between revisions 1 and 2
Revision 1 as of 2008-06-25 14:17:44
Size: 1330
Editor: jayshao
Comment:
Revision 2 as of 2008-11-15 14:00:51
Size: 1330
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Describe AaronWatters/Build64bitPythonOnSolarisAMD64 here.

On Solaris using 64 bit Intel compatible processors you can build applications like Python in either 32 bit mode or 64 bit mode.

Apps built in 32 bit mode cannot link to components built in 64 bit mode -- so it is often very useful to build Python in 64 bit mode. Even worse, if the 64 bit app tries to load a 64 bit component using a 32 bit loader you also fail.

The symptom of attempting an incompatible application/loader/component combination says something like

   BAD ELF TYPE

To use Python with 64 bit components you need to build python in 64 bit mode. I wasted a number of hours figuring out how to do this, so I thought I'd share it here. The magic sequence was:

     export PATH=/usr/sfw/bin:$PATH
     export BASECFLAGS="-m64 -L/usr/lib/64 -L/usr/ccs/lib/amd64 -R/usr/sfw/lib/64"
     export CC="gcc $BASECFLAGS"
     export AR=gar
     cd Python-2.5.1/
     ./configure
     gmake

It's possible that some of the above is redundant, but it worked for me. This makes Python build in 64 bit mode, using 64 bit libraries and a 64 bit loader. The "-R" part was particularly problematic to track down -- it gets the right loader (I think). I hope this helps someone (like me later when I lose this information).

AaronWatters/Build64bitPythonOnSolarisAMD64 (last edited 2008-11-15 14:00:51 by localhost)

Unable to edit the page? See the FrontPage for instructions.