[Zope] ZMySQLDA installation problem (fwd)
Chris Gray
cpgray@library.uwaterloo.ca
Fri, 1 Dec 2000 09:36:35 -0500 (EST)
Eric Walstad replied to me off-list with the solution to my problem so
I've included it below and I'll copy the zope list since your question
makes me think the solution should be made public.
Cheers,
Chris
On Fri, 01 Dec 2000 06:48:26 -0000 Roberto Fernandez wrote:
I read you post about ZMySQLDA installation and I'm having the same
exact problem, even with Python 2.0.
Have you found a solution yet? If so, could you contact me at
robernet_97@yahoo.com
Thanks,
Roberto Fernandez
---------- Forwarded message ----------
Date: Sat, 04 Nov 2000 11:22:26 -0800
From: Eric Walstad <Eric@Walstads.net>
To: Chris Gray <cpgray@library.uwaterloo.ca>
Subject: RE: [Zope] ZMySQLDA installation problem
Hi Chris,
I ran into similar errors. Here's the response from Jo Meder that helped me
get MySQLDA compiled: Hope it helps! PS, check out the NIP Ltd Mail list
archives. They've got a really nice search engine that can help you close
in on answers to your questions:
http://zope.nipltd.com/public/lists/zope-archive.nsf/$$Search?OpenForm
Eric.
> I have tried everything that I can think of (& a lot of what some of you
> could think of) to get MySQLdb to compile and install. I have had no
luck.
[...]
> <OUTPUT OF make>
> # make
>
gcc -fpic -g -O2 -I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CO
> NFIG_H -I/usr/local/mysql/include -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: *** [MySQLmodule.o] Error 1
> </OUTPUT OF make>
I suppose line 1125 of mySQLmodule.c is something like:
tf = & (mysql_fetch_field_direct(self->res,j));
If this is the case, try applying the following patch to your
MySQLmodule.c (this is strictly "works for me"):
------------------cut here-----------------------------------------
235c235
< unsigned int *lengths;
---
> unsigned long *lengths;
384c384
< tf = &(mysql_fetch_field_direct(res, i));
---
> tf = (mysql_fetch_field_direct(res, i));
1125c1125
< tf = &(mysql_fetch_field_direct(self->res,j));
---
> tf = (mysql_fetch_field_direct(self->res,j));
1147c1147
< tf = &(mysql_fetch_field_direct(self->res,j));
---
> tf = (mysql_fetch_field_direct(self->res,j));
-----------------cut here-------------------------------------------
HTH.
Jo.
// -----Original Message-----
// From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Chris
// Gray
// Sent: Saturday, November 04, 2000 10:43 AM
// To: zope@zope.org
// Subject: [Zope] ZMySQLDA installation problem
//
//
// I'm trying to install ZMySQLDA on Solaris 5.6. Everything seems to be
// going fine until make tries to compile the module. Then I get the
// following error messages:
//
// gcc -I/usr/local/mysql/include -I/usr/include/mysql -g -O2
// -I/usr/local/include/python1.5 -I/usr/local/include/python1.5
// -DHAVE_CONFIG_H -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 `&'
// *** Error code 1
// make: Fatal error: Command failed for target `MySQLmodule.o'
//
// Anyone know what's going wrong here?
//
// adTHANKSvance
// Chris
//
//
// _______________________________________________
// 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 )
//