[Zope] MySQL and Python and Mac OS X??

Jens Vagelpohl jens@zope.com
Fri, 2 Nov 2001 10:53:41 -0500


chris,

this error is actually a new "feature" in OS X 10.1. it wasn't there in 10.
00-04.

if i remember correctly you'll probably have to rebuild your python. after 
running the ./configure step you will have to edit the Makefile and make 
sure that the lines starting with LDSHARED= and BLDSHARED= contain the 
switch "-flat_namespace", like so:

LDSHARED=   $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress
BLDSHARED=  $(CC) $(LDFLAGS) -bundle -flat_namespace -undefined suppress

(this is from my own python2.1 build)

after rebuilding python you should be able to re-run setup.py in your 
MySQL-adapter.

i'm not exactly sure if it wwould work, but if there's a Makefile in the 
MySQL adapter source you might be able to tweak it in similar fashion and 
get it working without rebuilding python. i haven't tested this.

jens


On Friday, November 2, 2001, at 09:57 , Chris Muldrow wrote:

> I was trying to build the MySQL adapter so I could use my Mac OS X Zope 
> with
> MySQL, but I get this when I run python setup.py install:
>
> running install
> running build
> running build_py
> not copying CompatMysqldb.py (output up-to-date)
> not copying _mysql_exceptions.py (output up-to-date)
> not copying MySQLdb/__init__.py (output up-to-date)
> not copying MySQLdb/converters.py (output up-to-date)
> not copying MySQLdb/connections.py (output up-to-date)
> not copying MySQLdb/cursors.py (output up-to-date)
> not copying MySQLdb/sets.py (output up-to-date)
> not copying MySQLdb/times.py (output up-to-date)
> not copying MySQLdb/constants/__init__.py (output up-to-date)
> not copying MySQLdb/constants/CR.py (output up-to-date)
> not copying MySQLdb/constants/FIELD_TYPE.py (output up-to-date)
> not copying MySQLdb/constants/ER.py (output up-to-date)
> not copying MySQLdb/constants/FLAG.py (output up-to-date)
> not copying MySQLdb/constants/REFRESH.py (output up-to-date)
> not copying MySQLdb/constants/CLIENT.py (output up-to-date)
> running build_ext
> building '_mysql' extension
> skipping _mysql.c (build/temp.darwin-1.4-Power Macintosh-2.1/_mysql.o
> up-to-date)
> cc -bundle -undefined suppress build/temp.darwin-1.4-Power
> Macintosh-2.1/_mysql.o -L/usr/local/lib/mysql -lmysqlclient -lz -o
> build/lib.darwin-1.4-Power Macintosh-2.1/_mysql.so
> /usr/bin/ld: -undefined error must be used when -twolevel_namespace is in
> effect
> error: command 'cc' failed with exit status 1
>
>
>
> Any ideas how to fix it?
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )