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

Graham Dumpleton graham.dumpleton at gmail.com
Thu Oct 4 20:48:24 EDT 2007


On 05/10/2007, Oliver Goodman <oag at optusnet.com.au> wrote:
> 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

Provided that /usr/bin is in your PATH first that should not be
required. If it doesn't it suggests that your other versions of Python
have screwed with the default OS version replacing /usr/bin/python
with a link to some other version. If some other python executable in
different directory was being found first and /usr/bin/python was
okay, you could also have said:

  --with-python=/usr/bin/python

as that is a symlink to the more obscure location.

> 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 again shouldn't be required unless your attempts to install other
versions of Python have screwed things up somehow, as compiler should
look there anyway.

> 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.

You perhaps should have posted what all your compiler/linker errors
were at the time so we could work out what was going wrong. Anyway, no
matter now if you have got it working.

Graham


More information about the Mod_python mailing list