Hello all, 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. So, I am now trying to install MySQLDA (a step back) and am still having no luck. I'm hoping that the MySQLDA problem is related to the MySQLdb problem and that one of you will be able to point me in the right direction. Here's what happens when I try to install MySQLDA: First, the 'make -f Makefile.pre.in boot' script seems to work fine, but I'll include the output anyway, just in case. <OUTPUT OF make -f Makefile.pre.in boot> # make -f Makefile.pre.in boot rm -f *.o *~ rm -f *.a tags TAGS config.c Makefile.pre python sedscript rm -f *.so *.sl so_locations VERSION=`python -c "import sys; print sys.version[:3]"`; \ installdir=`python -c "import sys; print sys.prefix"`; \ exec_installdir=`python -c "import sys; print sys.exec_prefix"`; \ make -f ./Makefile.pre.in VPATH=. srcdir=. \ VERSION=$VERSION \ installdir=$installdir \ exec_installdir=$exec_installdir \ Makefile make[1]: Entering directory `/usr/local/Zope/lib/python/Products/ZMySQLDA/src' sed -n \ -e '1s/.*/1i\\/p' \ -e '2s%.*%# Generated automatically from Makefile.pre.in by sedscript.%p' \ -e '/^VERSION=/s/^VERSION=[ ]*\(.*\)/s%@VERSION[@]%\1%/p' \ -e '/^CC=/s/^CC=[ ]*\(.*\)/s%@CC[@]%\1%/p' \ -e '/^CCC=/s/^CCC=[ ]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \ -e '/^LINKCC=/s/^LINKCC=[ ]*\(.*\)/s%@LINKCC[@]%\1%/p' \ -e '/^OPT=/s/^OPT=[ ]*\(.*\)/s%@OPT[@]%\1%/p' \ -e '/^LDFLAGS=/s/^LDFLAGS=[ ]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \ -e '/^DEFS=/s/^DEFS=[ ]*\(.*\)/s%@DEFS[@]%\1%/p' \ -e '/^LIBS=/s/^LIBS=[ ]*\(.*\)/s%@LIBS[@]%\1%/p' \ in src]# ¡ -e '/^LIBC=/s/^LIBC=[ ]*\(.*\)/s%@LIBC[@]%\1%/p' \ -e '/^RANLIB=/s/^RANLIB=[ ]*\(.*\)/s%@RANLIB[@]%\1%/p' \ -e '/^MACHDEP=/s/^MACHDEP=[ ]*\(.*\)/s%@MACHDEP[@]%\1%/p' \ -e '/^SO=/s/^SO=[ ]*\(.*\)/s%@SO[@]%\1%/p' \ -e '/^LDSHARED=/s/^LDSHARED=[ ]*\(.*\)/s%@LDSHARED[@]%\1%/p' \ -e '/^CCSHARED=/s/^CCSHARED=[ ]*\(.*\)/s%@CCSHARED[@]%\1%/p' \ -e ORSHARED=/s/^LINKFORSHARED=[ ]*\(.*\)/s%@LINKFORSHARED[@]%\1%/p' \ -e '/^prefix=/s/^prefix=\(.*\)/s%^prefix=.*%prefix=\1%/p' \ -e '/^exec_prefix=/s/^exec_prefix=\(.*\)/s%^exec_prefix=.*%exec_prefix=\1%/p' \ /usr/lib/python1.5/config/Makefile >sedscript echo "/^#@SET_CCC@/d" >>sedscript echo "/^installdir=/s%=.*%= /usr%" >>sedscript echo "/^exec_installdir=/s%=.*%=/usr%" >>sedscript echo "/^srcdir=/s%=.*%= .%" >>sedscript echo "/^VPATH=/s%=.*%= .%" >>sedscript echo "/^LINKPATH=/s%=.*%= %" >>sedscript echo "/^BASELIB=/s%=.*%= %" >>sedscript echo "/^BASESETUP=/s%=.*%= %" >>sedscript sed -f sedscript ./Makefile.pre.in >Makefile.pre /usr/lib/python1.5/config/makesetup \ -m Makefile.pre -c /usr/lib/python1.5/config/config.c.in Setup -n /usr/lib/python1.5/config/Setup make -f Makefile do-it-again make[2]: Entering directory `/usr/local/Zope/lib/python/Products/ZMySQLDA/src' /usr/lib/python1.5/config/makesetup \ -m Makefile.pre -c /usr/lib/python1.5/config/config.c.in Setup -n /usr/lib/python1.5/config/Setup make[2]: Leaving directory `/usr/local/Zope/lib/python/Products/ZMySQLDA/src' make[1]: Leaving directory `/usr/local/Zope/lib/python/Products/ZMySQLDA/src' </OUTPUT OF make -f Makefile.pre.in boot> Next I ran 'make' <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> Any help is greaty appreciated!! Eric.
You are using a version of MySQL that is too new, I think. I haven't seen this one in a while, but I think I recognize the error messahes. Try dropping back to 3.22.25 (3.22.26 might work, but I know that .25 works and >.27 does not). Send me a private email if you need a copy of the rpms. I am sure I have thenm somewhere --sam "Eric L. Walstad" wrote:
Hello all,
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.
So, I am now trying to install MySQLDA (a step back) and am still having no luck. I'm hoping that the MySQLDA problem is related to the MySQLdb problem and that one of you will be able to point me in the right direction.
Here's what happens when I try to install MySQLDA:
First, the 'make -f Makefile.pre.in boot' script seems to work fine, but I'll include the output anyway, just in case.
<OUTPUT OF make -f Makefile.pre.in boot> # make -f Makefile.pre.in boot rm -f *.o *~ rm -f *.a tags TAGS config.c Makefile.pre python sedscript rm -f *.so *.sl so_locations VERSION=`python -c "import sys; print sys.version[:3]"`; \ installdir=`python -c "import sys; print sys.prefix"`; \ exec_installdir=`python -c "import sys; print sys.exec_prefix"`; \ make -f ./Makefile.pre.in VPATH=. srcdir=. \ VERSION=$VERSION \ installdir=$installdir \ exec_installdir=$exec_installdir \ Makefile make[1]: Entering directory `/usr/local/Zope/lib/python/Products/ZMySQLDA/src' sed -n \ -e '1s/.*/1i\\/p' \ -e '2s%.*%# Generated automatically from Makefile.pre.in by sedscript.%p' \ -e '/^VERSION=/s/^VERSION=[ ]*\(.*\)/s%@VERSION[@]%\1%/p' \ -e '/^CC=/s/^CC=[ ]*\(.*\)/s%@CC[@]%\1%/p' \ -e '/^CCC=/s/^CCC=[ ]*\(.*\)/s%#@SET_CCC[@]%CCC=\1%/p' \ -e '/^LINKCC=/s/^LINKCC=[ ]*\(.*\)/s%@LINKCC[@]%\1%/p' \ -e '/^OPT=/s/^OPT=[ ]*\(.*\)/s%@OPT[@]%\1%/p' \ -e '/^LDFLAGS=/s/^LDFLAGS=[ ]*\(.*\)/s%@LDFLAGS[@]%\1%/p' \ -e '/^DEFS=/s/^DEFS=[ ]*\(.*\)/s%@DEFS[@]%\1%/p' \ -e '/^LIBS=/s/^LIBS=[ ]*\(.*\)/s%@LIBS[@]%\1%/p' \ in src]# ¡ -e '/^LIBC=/s/^LIBC=[ ]*\(.*\)/s%@LIBC[@]%\1%/p' \ -e '/^RANLIB=/s/^RANLIB=[ ]*\(.*\)/s%@RANLIB[@]%\1%/p' \ -e '/^MACHDEP=/s/^MACHDEP=[ ]*\(.*\)/s%@MACHDEP[@]%\1%/p' \ -e '/^SO=/s/^SO=[ ]*\(.*\)/s%@SO[@]%\1%/p' \ -e '/^LDSHARED=/s/^LDSHARED=[ ]*\(.*\)/s%@LDSHARED[@]%\1%/p' \ -e '/^CCSHARED=/s/^CCSHARED=[ ]*\(.*\)/s%@CCSHARED[@]%\1%/p' \ -e ORSHARED=/s/^LINKFORSHARED=[ ]*\(.*\)/s%@LINKFORSHARED[@]%\1%/p' \ -e '/^prefix=/s/^prefix=\(.*\)/s%^prefix=.*%prefix=\1%/p' \ -e '/^exec_prefix=/s/^exec_prefix=\(.*\)/s%^exec_prefix=.*%exec_prefix=\1%/p' \ /usr/lib/python1.5/config/Makefile >sedscript echo "/^#@SET_CCC@/d" >>sedscript echo "/^installdir=/s%=.*%= /usr%" >>sedscript echo "/^exec_installdir=/s%=.*%=/usr%" >>sedscript echo "/^srcdir=/s%=.*%= .%" >>sedscript echo "/^VPATH=/s%=.*%= .%" >>sedscript echo "/^LINKPATH=/s%=.*%= %" >>sedscript echo "/^BASELIB=/s%=.*%= %" >>sedscript echo "/^BASESETUP=/s%=.*%= %" >>sedscript sed -f sedscript ./Makefile.pre.in >Makefile.pre /usr/lib/python1.5/config/makesetup \ -m Makefile.pre -c /usr/lib/python1.5/config/config.c.in Setup -n /usr/lib/python1.5/config/Setup make -f Makefile do-it-again make[2]: Entering directory `/usr/local/Zope/lib/python/Products/ZMySQLDA/src' /usr/lib/python1.5/config/makesetup \ -m Makefile.pre -c /usr/lib/python1.5/config/config.c.in Setup -n /usr/lib/python1.5/config/Setup make[2]: Leaving directory `/usr/local/Zope/lib/python/Products/ZMySQLDA/src' make[1]: Leaving directory `/usr/local/Zope/lib/python/Products/ZMySQLDA/src' </OUTPUT OF make -f Makefile.pre.in boot>
Next I ran 'make'
<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>
Any help is greaty appreciated!! Eric.
_______________________________________________ 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 )
-- Sam Gendler Chief Technology Officer - Impossible, Inc. 1222 State St. Suite 250 Santa Barbara CA. 93101 w: 805-560-0508 f: 805-560-0608 c: 805-689-1191 e: sgendler@impossible.com
Sam Gendler wrote:
You are using a version of MySQL that is too new, I think. I haven't seen this one in a while, but I think I recognize the error messahes. Try dropping back to 3.22.25 (3.22.26 might work, but I know that .25 works and >.27 does not). Send me a private email if you need a copy of the rpms. I am sure I have thenm somewhere
FWIW, I am running the latest stable release of MySQL, MySQL-3.22.32-1 and it works fine for me. (Even have StarOffice talking to it! :) -- In flying I have learned that carelessness and overconfidence are usually far more dangerous than deliberately accepted risks. -- Wilbur Wright in a letter to his father, September 1900
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.
Jo, Thanks for your C expertise. The changes you mentioned were all that was needed to get the MySQLmodule to compile and the MySQLDA to work. I now see the ZMySQL Database Connection in my list of available items in Zope!!! (big smile). I will eventually want to get Andy Dustman's MySQLdb connection to work, because it is multi-threaded. But for now I will stick with what works, learn how to tie Zope to MySQL and THEN go for the upgrade to MySQLdb. Anyway, thanks again for taking the time to solve my problem. Eric. // -----Original Message----- // From: Jo Meder [mailto:jo@delorges.in-berlin.de] // Sent: Friday, March 10, 2000 2:13 PM // To: Eric L. Walstad // Cc: zope@zope.org // Subject: Re: [Zope] MySQLDA / MySQLdb problems // // // > 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. //
participants (4)
-
Bill Anderson -
Eric L. Walstad -
Jo Meder -
Sam Gendler