What exactly is the use of prefix while running configure?

3

I am trying to install 32 bit Python on x86_64_ Linux.

Following instructions from http://blog.devork.be/2009/02/compiling-32-bit-python-on-amd64.html

I downloaded the tarball from here: http://www.python.org/getit/

Untarred in my home directory, which is a RHEL 5.5 OS

Under /home/local/NT/jayanthv/Python-2.7.3,

I run

OPT=-m32 LDFLAGS=-m32 ./configure --prefix=/opt/pym32

and then I run gmake.

And the build fails as expected after certain modules.

Python build finished, but the necessary bits to build these modules were not found: _tkinter bsddb185 sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Failed to build these modules: _ctypes _sqlite3

running build_scripts

Nothing seems to be there under /opt/pym32.

But, under /home/local/NT/jayanthv/Python-2.7.3, there is a 32 bit python executable I can use.

What is the use of prefix here? Am I doing something wrong?

roymustang86

Posted 2012-08-28T17:39:47.943

Reputation: 213

Answers

1

1) Did configure succeed? Do an echo $? after verify a 0 for success before bothering with a gmake.

2) Did you do a gmake install? Nothing is installed until you do a gmake install. You probably need root perms to install under /opt.

3) you can combine 1 & 2 with OPT=-m32 LDFLAGS=-m32 ./configure --prefix=/opt/pym32 && gmake -j4 && sudo gmake install

The arg --prefix=... gives the root directory for the install location, instead of the default (usually /usr). For many packages, it also sets some locations in source code... e.g. you can't just copy gcc from /opt/gcc to say, /usr, because a lot of locations are now coded to look under /opt/gcc, and that won't change with a file move.

Me Curious: why are you building your own instead of using the system python?

Rich Homolka

Posted 2012-08-28T17:39:47.943

Reputation: 27 121

The system python is a 64 bit executable, I need a 32 bit installable. I am trying to install omniORB, but I am running into problems with omniidl, and hence trying to see if the 32 bit executable does the trick. – roymustang86 – 2012-08-28T19:56:56.493

@roymustang86 - makes sense, keep calm and carry on. – Rich Homolka – 2012-08-28T20:14:35.310