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

Graham Dumpleton graham.dumpleton at gmail.com
Thu Oct 4 21:35:30 EDT 2007


On 05/10/2007, Oliver Goodman <oag at optusnet.com.au> wrote:
> Graham,
>
> I did what probably lots of people have done and downloaded Python
> 2.4 and later Python 2.5 for OS X Panther. It works fine. One doesn't
> discover any issues until trying to build something like mod_python
> against the new python.
>
> > 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.
>
> Obviously my path is set to pick up one of the late model pythons
> first otherwise what would be the point of installing them? I have
> not screwed anything up, I have merely installed a python which
> happens not to be linkable against the built-in system libraries.
> Unexpected, but hardly terminal.

I'm not suggesting you screwed things up, but that the Python
installers you used did. This was a big problem with installers for
older versions of Python on Panther and from memory there were often
additional packages of scripts provided by people to fix things up so
that the newer version would safely coexist with the default OS
version.

> > 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.
>
> Why should I post what my link errors were? I googled and found about
> a dozen reports in various lists of this issue (which is not with
> mod_python per-se but with incompatibility between the available
> pythons and the libraries on Panther) with exactly the same link
> errors as mine, and nowhere was I able to find any response saying
> what to do about it.
>
> I posted merely to be a good citizen and help others out in case they
> too encounter this confusing problem. It may not matter to you or me
> now that I have got it working but I should think a few people out
> there might actually be grateful for the time I took to post about this.

The suggestion about posting the errors is because there are people
here who have a reasonable amount of experience with MacOS X and in
particular getting more complicated Python packages like mod_python to
work on it. We could thus have helped you understand things quicker
than otherwise might have been the case by you having to search
through Google to find an answer. We could also perhaps have pointed
you to some existing documentation of MacOSX issues for similar
packages to mod_python. In other words we could have saved you wasting
your own time if you had brought all the issues to us initially. That
is all I am saying.

Graham

> Oliver
>
>
> On 05/10/2007, at 10:48 AM, Graham Dumpleton wrote:
>
> > 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