[mod_python] [SPAM] Prpblem installing mod_python 3.3.1 in OSX

Oliver Goodman oag at optusnet.com.au
Thu Oct 4 20:33:30 EDT 2007


Porcari,

It's some time since you posted so perhaps you solved the problem  
already.

In any case I recently ran into it myself and despite finding dozens  
of reports of this problem on the internet I didn't find any  
explanation. Now that I've found the answer (for myself at least) I  
thought I'd better post it. That way if I forget what it was, and run  
into it again, at least maybe I'll find my own post :-)

The warnings are easily dealt with as another poster already noted:  
simply delete the -arch i386 flag from the configure-generated  
Makefile. It's the link errors that are the real problem. In fact  
they are not really related to mod_python. I also got them when I  
first tried to build boost_python on my Mac.

The reason I had this problem, on Mac OSX 10.3.9 (not Server version  
in my case), was because I had installed newer versions of Python  
alongside the built-in version 2.3.

Now, I don't know how to build mod_python against any of those newer  
pythons. The link error is there because they expect something to be  
in the libSystem library which isn't. I doubt there is much that can  
be done about that.

What you can do however is build mod_python against the built-in  
python. Specify

   --with-python=/System/Library/Frameworks/Python.framework/Versions/ 
2.3/bin/python2.3

when you ./configure. That unfortunately doesn't stop the compiler  
(libtool/gcc) from looking at the wrong python when it comes to link  
time. So you also need to edit src/Makefile. I added the following  
flag (just before the -framework Python flag in the LDFLAGS line):

   -Wl,-F/System/Library/Frameworks

That tells the linker to look first for the python framework in / 
System/Library/Frameworks which is where the built-in one lives.

And then of course you'll have to install everything you installed  
for Python 2.4 or 2.5 again for 2.3. Such is life.

Oliver

(Message resent because it didn't appear on the list the first time.)



More information about the Mod_python mailing list