Hello all, When I try to compile ZMySQLDA I get the following error messages after typing make: [root@catv6216 src]# make gcc -fPIC -I/usr/local/mysql/include -I/usr/include/mysql -g -O2 -I/usr/include/python1.5 -I/usr/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 `&' make: *** [MySQLmodule.o] Error 1 [root@catv6216 src]# I can't even read a single line of c so I have no idea what's wrong exactly. FYI: OS: Immunix 6.2 (= RedHat 6.2 + stackguard) Zope: 2.1.6 (compiled from Jeff Rush's source rpm, 2.2b3 doesn't work either) MySQL: 3.22.32 and 3.23.21 Python MySQLdb: 2.0 2.1 Ewald Wasscher
There seem to be several different (old?) instructions floating around on how to install the Python MySQLdb and the Zope ZMySQLDA. If you just want it working, and you're using RPMs, you can grab my RPMs of Andy Dustman's MySQLdb 0.2.1 and the ZMySQLDA 1.2.0 that now works with it. As far as I know, this is the latest mutually functional and thread friendly combination. ftp://ftp.logicetc.com/pub/Zope/RPMS/MySQL-python-0.2.1-1.i386.rpm ftp://ftp.logicetc.com/pub/Zope/RPMS/Zope-ZMySQLDA-1.2.0-1.i386.rpm Andy's MySQLdb - http://dustman.net/andy/python/MySQLdb/0.2.1 ZMySQLDA - http://www.zope.org/Members/mordred/ZMySQLDA Note that Andy's latest 0.2.2 db doesn't yet work with ZMySQLDA 1.2.0. _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ewald Wasscher Sent: Sunday, July 09, 2000 7:54 PM To: zope@zope.org Subject: [Zope] Trouble compiling ZMySQLDA
Hello all,
When I try to compile ZMySQLDA I get the following error messages after typing make:
[root@catv6216 src]# make gcc -fPIC -I/usr/local/mysql/include -I/usr/include/mysql -g -O2 -I/usr/include/python1.5 -I/usr/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 `&' make: *** [MySQLmodule.o] Error 1 [root@catv6216 src]#
I can't even read a single line of c so I have no idea what's wrong exactly.
FYI:
OS: Immunix 6.2 (= RedHat 6.2 + stackguard) Zope: 2.1.6 (compiled from Jeff Rush's source rpm, 2.2b3 doesn't work either) MySQL: 3.22.32 and 3.23.21 Python MySQLdb: 2.0 2.1
Ewald Wasscher
_______________________________________________ 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 )
Ron Bickers wrote:
There seem to be several different (old?) instructions floating around on how to install the Python MySQLdb and the Zope ZMySQLDA. If you just want it working, and you're using RPMs, you can grab my RPMs of Andy Dustman's MySQLdb 0.2.1 and the ZMySQLDA 1.2.0 that now works with it.
I compiled the MySQLdb rpm myself, and I'll be more than happy just having a working though slightly older ZMySQLDA, as I'll "only" use it for some developent work at my own machines. Thanks! But I still wonder if someone with some decent c knowl;edge could have a look at the errors my compiler reports. Yours, Ewald
Actually, I just realized that what you're trying to compile is the MySQLdb that comes with the DA. The DA itself is written in Python, and doesn't need to be compiled. If you already have a db installed, and the DA is compatible with it, you should be able to just put ZMySQLDA in the Products directory and restart Zope. If the DA isn't compatible (because it's written for a different db), then your best and quickest solution is to install the mutually compatible RPMs I posted. _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ewald Wasscher Sent: Sunday, July 09, 2000 7:54 PM To: zope@zope.org Subject: [Zope] Trouble compiling ZMySQLDA
Hello all,
When I try to compile ZMySQLDA I get the following error messages after typing make:
[root@catv6216 src]# make gcc -fPIC -I/usr/local/mysql/include -I/usr/include/mysql -g -O2 -I/usr/include/python1.5 -I/usr/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 `&' make: *** [MySQLmodule.o] Error 1 [root@catv6216 src]#
I can't even read a single line of c so I have no idea what's wrong exactly.
FYI:
OS: Immunix 6.2 (= RedHat 6.2 + stackguard) Zope: 2.1.6 (compiled from Jeff Rush's source rpm, 2.2b3 doesn't work either) MySQL: 3.22.32 and 3.23.21 Python MySQLdb: 2.0 2.1
Ewald Wasscher
_______________________________________________ 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 )
I couldn't seem to get the RPMS to install, what kind of setup are they expecting? Does it matter where I have installed zope? (I am a linux learner so please forgive if I am not making sense) Thanks Peter. -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ron Bickers Sent: Monday, 10 July 2000 12:42 PM To: Ewald Wasscher; zope@zope.org Subject: RE: [Zope] Trouble compiling ZMySQLDA Actually, I just realized that what you're trying to compile is the MySQLdb that comes with the DA. The DA itself is written in Python, and doesn't need to be compiled. If you already have a db installed, and the DA is compatible with it, you should be able to just put ZMySQLDA in the Products directory and restart Zope. If the DA isn't compatible (because it's written for a different db), then your best and quickest solution is to install the mutually compatible RPMs I posted. _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ewald Wasscher Sent: Sunday, July 09, 2000 7:54 PM To: zope@zope.org Subject: [Zope] Trouble compiling ZMySQLDA
Hello all,
When I try to compile ZMySQLDA I get the following error messages after typing make:
[root@catv6216 src]# make gcc -fPIC -I/usr/local/mysql/include -I/usr/include/mysql -g -O2 -I/usr/include/python1.5 -I/usr/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 `&' make: *** [MySQLmodule.o] Error 1 [root@catv6216 src]#
I can't even read a single line of c so I have no idea what's wrong exactly.
FYI:
OS: Immunix 6.2 (= RedHat 6.2 + stackguard) Zope: 2.1.6 (compiled from Jeff Rush's source rpm, 2.2b3 doesn't work either) MySQL: 3.22.32 and 3.23.21 Python MySQLdb: 2.0 2.1
Ewald Wasscher
_______________________________________________ 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 )
_______________________________________________ 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 )
The RPMs install in /usr/share/zope/lib/python/Products, where the Zope RPMs provided by Jeff Rush install the Products folder. If you're not using the Zope RPMs and have zope installed somewhere else, you can still use these RPMs and just make a symlink to your real Products folder. For example (if Zope is installed in /usr/local/zope): # cd /usr/local/zope/lib/python/Products # ln -s /usr/share/zope/lib/python/Products/ZMySQLDA ZMySQLDA Restart Zope and that should do it. _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: Peter Marriott [mailto:peter@bmssolutions.com] Sent: Monday, July 10, 2000 12:58 AM To: Ron Bickers; zope@zope.org Subject: RE: [Zope] Trouble compiling ZMySQLDA
I couldn't seem to get the RPMS to install, what kind of setup are they expecting? Does it matter where I have installed zope? (I am a linux learner so please forgive if I am not making sense)
Thanks Peter.
Thanks for the help Ron. This almost works for me. I now have the product in zopes control panel, but it is broken. (see traceback below) Is this because my MySQL-Python RPM from your mail is not intalling properly ? Thanks Peter ZMySQLDA Import Traceback Traceback (innermost last): File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/OFS/Application.py", line 387, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/__init__.py", line 106, in ? import sys, os, Globals, DA File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/DA.py", line 108, in ? from db import DB File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/db.py", line 106, in ? import _mysql, regex, sys ImportError: No module named _mysql -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ron Bickers Sent: Monday, 10 July 2000 1:17 PM To: Peter Marriott; zope@zope.org Subject: RE: [Zope] Trouble compiling ZMySQLDA The RPMs install in /usr/share/zope/lib/python/Products, where the Zope RPMs provided by Jeff Rush install the Products folder. If you're not using the Zope RPMs and have zope installed somewhere else, you can still use these RPMs and just make a symlink to your real Products folder. For example (if Zope is installed in /usr/local/zope): # cd /usr/local/zope/lib/python/Products # ln -s /usr/share/zope/lib/python/Products/ZMySQLDA ZMySQLDA Restart Zope and that should do it. _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: Peter Marriott [mailto:peter@bmssolutions.com] Sent: Monday, July 10, 2000 12:58 AM To: Ron Bickers; zope@zope.org Subject: RE: [Zope] Trouble compiling ZMySQLDA
I couldn't seem to get the RPMS to install, what kind of setup are they expecting? Does it matter where I have installed zope? (I am a linux learner so please forgive if I am not making sense)
Thanks Peter.
_______________________________________________ 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 )
Seems that because of how my Zope was installed had problems... I copied all files from /usr/lib/python1.5/site-packages/ to /usr/local/zope/lib/python/Products/ZmySQLDA and all was sweet. Thanks for your help Ron! Peter -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Peter Marriott Sent: Monday, 10 July 2000 3:46 PM To: Ron Bickers; zope@zope.org Subject: RE: [Zope] Trouble compiling ZMySQLDA Thanks for the help Ron. This almost works for me. I now have the product in zopes control panel, but it is broken. (see traceback below) Is this because my MySQL-Python RPM from your mail is not intalling properly ? Thanks Peter ZMySQLDA Import Traceback Traceback (innermost last): File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/OFS/Application.py", line 387, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/__init__.py", line 106, in ? import sys, os, Globals, DA File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/DA.py", line 108, in ? from db import DB File "/usr/local/Zope-2.1.6-linux2-x86/lib/python/Products/ZMySQLDA/db.py", line 106, in ? import _mysql, regex, sys ImportError: No module named _mysql -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ron Bickers Sent: Monday, 10 July 2000 1:17 PM To: Peter Marriott; zope@zope.org Subject: RE: [Zope] Trouble compiling ZMySQLDA The RPMs install in /usr/share/zope/lib/python/Products, where the Zope RPMs provided by Jeff Rush install the Products folder. If you're not using the Zope RPMs and have zope installed somewhere else, you can still use these RPMs and just make a symlink to your real Products folder. For example (if Zope is installed in /usr/local/zope): # cd /usr/local/zope/lib/python/Products # ln -s /usr/share/zope/lib/python/Products/ZMySQLDA ZMySQLDA Restart Zope and that should do it. _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: Peter Marriott [mailto:peter@bmssolutions.com] Sent: Monday, July 10, 2000 12:58 AM To: Ron Bickers; zope@zope.org Subject: RE: [Zope] Trouble compiling ZMySQLDA
I couldn't seem to get the RPMS to install, what kind of setup are they expecting? Does it matter where I have installed zope? (I am a linux learner so please forgive if I am not making sense)
Thanks Peter.
_______________________________________________ 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 ) _______________________________________________ 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 )
Ron Bickers wrote:
Actually, I just realized that what you're trying to compile is the MySQLdb that comes with the DA. The DA itself is written in Python, and doesn't need to be compiled.
Aargh, if I had know this yesterday! Thanks. Also it was a little late yesterday when I started playing with ZMySQLDA, so I went to zope.org did a search on "mysql", followed the first big fat link "ZMySQLDA" and ended up with ZMySQLDA versions 1.1.3 and 1.1.4...... Installing version 1.2.0 isn't a problem at all. Ewald
Hello Ewald, Here's a mailing list archive that may help you: http://zope.nipltd.com/public/lists/zope-archive.nsf/242bb7cc2b2c343d802568a b003585d4/041159ede9899734802568a700259726?OpenDocument It helped me with the same problem. Basically, It tells you how to make a few simple modifications to the MySQLmodule.c file that allow the file to be compiled. Hope It Helps... Eric. // -----Original Message----- // From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Ewald // Wasscher // Sent: Sunday, July 09, 2000 4:54 PM // To: zope@zope.org // Subject: [Zope] Trouble compiling ZMySQLDA // // // Hello all, // // When I try to compile ZMySQLDA I get the following error messages after // typing make: // // [root@catv6216 src]# make // gcc -fPIC -I/usr/local/mysql/include -I/usr/include/mysql -g -O2 // -I/usr/include/python1.5 -I/usr/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 `&' // make: *** [MySQLmodule.o] Error 1 // [root@catv6216 src]# // // I can't even read a single line of c so I have no idea what's wrong // exactly. // // FYI: // // OS: Immunix 6.2 (= RedHat 6.2 + stackguard) // Zope: 2.1.6 (compiled from Jeff Rush's source rpm, 2.2b3 doesn't work // either) // MySQL: 3.22.32 and 3.23.21 // Python MySQLdb: 2.0 2.1 // // Ewald Wasscher // // _______________________________________________ // 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 ) //
participants (4)
-
Eric L. Walstad -
Ewald Wasscher -
Peter Marriott -
Ron Bickers