Python1.5.2/Zope 2.1.3 on MacOS X Server notes

Jeffrey P Shell jpshell at bigfoot.com
Mon Jan 31 12:06:08 EST 2000


These are some quick notes from building Python 1.5.2 with threads and
shared libraries on MacOS X Server 1.02.  As a note,

The MacNN Xclave (xclave.macnn.com) reports on configuring Python with
--with-host=powerpc-apple-netbsd .  I didn't try this option with what I did
below, but it couldn't hurt to try on older versions of Rhapsody and newer
developr releases of MacOS X who aren't picked up by the current configure
scripts.

This document, and future updates to it, can be found at
http://www.zope.org/Members/jshell/buildingZopeOnMacOSXServer

---
Building Zope 2.1.3 on MacOS X Server

Last time I told this story, I was having problems getting dynamic
libraries (.so files) to work with Python without configuring with
the --with-next-framework option, which didn't compile to the results
I wanted.  Below are the steps to building Python 1.5.2 with threads
and dynamic libraries on MacOS X Server and to building Zope 2.1.3.

Python::
First - configuring

./configure --with-threads --with-dyld

Next - MAKE

make LDFLAGS="-undefined suppress"
make install

The LDFLAGS="-undefined suppress" option is passed into the linker
and will suppress errors about undefined references.  Without this
setting, dynamic libraries will not get past the linker stage.  Make
install installs Python into the configured area (you should be root
to do this).


Zope::

A change has to be made in one of the files used for
building/configuring Zope that will hopefully be ironed out in the
near future.  For now, do the following

In inst/do.py, change line 135 from
   do('make')
to
   do('make LDFLAGS="-undefined suppress"')

(We'll find a way of fixing this in the future so this shouldn't
have to be edited.  There should be a Python configuration option
when building for setting these LDFLAGS into the default
Makefile.pre.in)


Then, for reasons currently unknown to me, cPickle issues have to be
resolved.  The Zope build process makes two cPickle.so files.  These
files appear to be identical and cause a conflict with each other at
runtime due to multiple symbol definitions, and they cause a
conflict with the cPickle.so that is built with Python.

Lastly:
cd lib/python/
rm cPickle.so

cd lib/python/ZODB/
mv cPickle.so /usr/local/lib/python1.5/lib-dynload/

You should be root to do the last step of moving the Zope cPickle.so
into the default Python area.


This is still too much to do, in my opinion, but it's the best way
I've found yet.  Any suggestions about how to get the LDFLAGS option
set at Python configuration time so that the generated Makefiles that
Zope uses will have them set, let me know.  I tried setting LDFLAGS
as an environment variable before running configure, but it uses
$LDFLAGS at the beggining of configuration to test the C compilor,
and since the '-undefined suppress' option is a linker option, an
error is returned and configuration stops.

Or, any suggestions or advice on how to set Python up to resolve
multiple definitions (due to multiple cPickle.so files) automatically
will be greatly appreciated.  The cPickle in Zope is newer than the
one in Python 1.5.2, I believe.

On my to-do list now (but pretty far down the list, sadly) is to
make this into a MacOS X Server package similar to other Zope
releases (meaning, the Zope package will be a full release with its
own Python).  The timeframe of this is uncertain.

jeffrey at Digicool.com




More information about the Python-list mailing list