[Zope] ZMySQLDA compilation problems

Andy Dustman adustman@comstar.net
Tue, 21 Sep 1999 01:15:39 -0400 (EDT)


On Tue, 21 Sep 1999, Daniel wrote:

> I've been trying to install mysql support for Zope and i've followed the
> instructions that came with it, including compiling python etc etc, but
> when i try to compile MySQL support for python i get this error msg:
> gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H  -I/usr/include/mysql -c
> ./MySQLmodule.c
> ./MySQLmodule.c: In function `pythonify_row':
> ./MySQLmodule.c:238: warning: assignment from incompatible pointer type
> ./MySQLmodule.c: In function `pythonify_res_fields':
> ./MySQLmodule.c:384: invalid lvalue in unary `&'
> ./MySQLmodule.c: In function `STH_fetchdict':
> ./MySQLmodule.c:1125: invalid lvalue in unary `&'
> ./MySQLmodule.c:1147: invalid lvalue in unary `&'
> make[1]: *** [MySQLmodule.o] Error 1
> make[1]: Leaving directory `/opt/Python-1.5.1/Modules'
> make: *** [Modules] Error 2
> 
> I'm running Redhat linux 5.2, pythong 1.5.1 and Zope 2.0.0 if that makes
> any difference
> any advice would be appreciated :)

You didn't say what version of MySQL you were running. I'm guessing you
have 3.22.x. MySQLmodule-1.4 is designed for 3.21.x and it might not work
with 3.22.x. I have a newer MySQL interface, with a patch to make ZMySQLDA
work with it. For details, see:

	http://www.zope.org/Members/adustman/MySQLdb

As someone else pointed out, you need Python 1.5.2, both for Zope (get
2.0.1 from www.zope.org for an important security fix), and for MySQLdb
(needs the PyLong_FromLongLong() function, which is not present in earlier
versions). My development platform is RedHat 5.2, so you shouldn't have
any trouble.

-- 
andy dustman       |     programmer/analyst     |      comstar.net, inc.
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d