[Pythonmac-SIG] Panther, Python 2.3, anydbm

garsha garsha at itg.uiuc.edu
Sun Feb 22 17:40:52 EST 2004


I've experienced problems with shelve and anydbm modules being broken in 
the context of macPython installs (10.2 and 10.3 addons)--I'm not sure 
if it is common knowledge or not, but I haven't seen much documentation 
of the issue on the web, so I felt I should bring it up in case someone 
else ends up searching for a solution.
    The most recent error refers to 'fast mutexes not available on this 
platform'--I wish I had saved text from the console so I could be more 
specific, but basically it seems to be a problem with the database 
libraries available on a stock Panther install.  By downloading and 
building the Sleepycat BerkelyDB.4.2, manually editing the Modules/Setup 
file to build the bsdb module (after running ./configure 
--enable-framework --enable-toolbox-glue), the problem seems to have 
been resolved.  I tried to download the official/unofficial _gdbm.so 
through the package manager, but the package manager wouldn't let me, 
stating that I had to manually install the library--which I couln't do 
becuase the 'make install' phase for building gdbm errors out stating 
illegal operators to /usr/bin/install. 
    It would seem that Apple's python and the macPython binary installer 
are going out with broken anydbm and shelve builtins, and installing the 
BerkelyDB.4.2 and bsdb module fixes things (I also 
downloaded/built/installed the bsddb3 module for good measure).  The 
sleepycat db distribution is the only one I could get to build and 
install without any headaches or having to resort to DarwinPorts or 
Fink.  To some developers, particularly less experienced ones such as I, 
this may cause some frustration if they write code on some other 
platform which utilizes persistent data objects, and hope it will run on 
OS X (and be able to at least create and read new persistant data 
objects) unmodified.    If anyone has a more elegant solution, or I'm 
just missing something elementary please let me know. I'm just offering 
the experience to the list in the event that it hasn't been documented 
yet. 
Regards,
Karl G.



More information about the Pythonmac-SIG mailing list