How to build Plone 3.x on Mac OS X 10.6 Snow Leopard
by
T. Kim Nguyen
—
last modified
Oct 15, 2010 09:57 PM
if you use buildout to build your Plone 3.x, and you get an AssertionError
GCC Version Problems
If you are trying to buildout Plone 3, say, as per these instructions, and you get this error:
/usr/bin/gcc -I/Users/kim/Plone-3.3.4/Python-2.4/include -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -IExtensionClass -I. -IAcquisition -I/Users/kim/Plone-3.3.4/Python-2.4/include/python2.4 -c AccessControl/cAccessControl.c -o build/temp.macosx-10.3-i386-2.4/AccessControl/cAccessControl.o
cc1: error: unrecognized command line option "-Wno-long-double"
error: command '/usr/bin/gcc' failed with exit status 1
While:
Installing zope2.
An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/Users/kim/src/plonetuneup/plone33devel/eggs/zc.buildout-1.4.3-py2.4.egg/zc/buildout/buildout.py", line 1660, in main
getattr(buildout, command)(args)
File "/Users/kim/src/plonetuneup/plone33devel/eggs/zc.buildout-1.4.3-py2.4.egg/zc/buildout/buildout.py", line 532, in install
installed_files = self[part]._call(recipe.install)
File "/Users/kim/src/plonetuneup/plone33devel/eggs/zc.buildout-1.4.3-py2.4.egg/zc/buildout/buildout.py", line 1204, in _call
return f()
File "/Users/kim/src/plonetuneup/plone33devel/eggs/plone.recipe.zope2install-3.2-py2.4.egg/plone/recipe/zope2install/__init__.py", line 247, in install
'build_ext', '-i',
AssertionError
The key error message to look for is:
cc1: error: unrecognized command line option "-Wno-long-double"
The quick fix is to invoke buildout as follows:
CC=gcc-4.0 bin/buildout
This is because OS X 10.6 Snow Leopard uses gcc-4.2 and symlinks that to gcc by default. By overriding the CC environment variable you temporarily tell it to use gcc-4.0.
Missing hashlib module
If you build Plone 3.1 via
svn co https://svn.plone.org/svn/plone/buildouts/plone-coredev/branches/3.1/ ./plone31devel
and you get this error:
ImportError: No module named hashlib
The fix is as follows:
CC=gcc-4.0 bin/easy_install hashlib
then continue by reissuing your buildout command:
CC=gcc-4.0 bin/buildout











