From rr at nederhoed.com Wed Feb 7 12:33:12 2007 From: rr at nederhoed.com (Robert-Reinder Nederhoed) Date: Wed Feb 7 12:33:15 2007 Subject: [egenix-users] Egenix - Zope / MySQL - floats losing 'behind point' info Message-ID: <20070207123312.tvndpyfem8444wgo@webmail.nederhoed.com> Good day, When I perform from Z SQL (see attached image): select 0.1 The result is: 0.0 Setup: Zope 2.9 Python 2.3.5 mxODBCZopeDA 1.0.10 MySQL 4.1.13 This does not happen when we query our DB2 database. Anyone a suggestion on the cause of and cure for this phenomenon? Friendly greetings, Robert-Reinder The Hague, Netherlands -- -------------- next part -------------- A non-text attachment was scrubbed... Name: select_float_error.png Type: image/png Size: 7461 bytes Desc: not available Url : /mailman-archives/egenix-users/attachments/20070207/4ac719ca/select_float_error.png From support at egenix.com Wed Feb 7 13:23:59 2007 From: support at egenix.com (eGenix Support) Date: Wed Feb 7 13:24:14 2007 Subject: [egenix-users] Egenix - Zope / MySQL - floats losing 'behind point' info In-Reply-To: <20070207123312.tvndpyfem8444wgo@webmail.nederhoed.com> References: <20070207123312.tvndpyfem8444wgo@webmail.nederhoed.com> Message-ID: Am 07.02.2007, 12:33 Uhr, schrieb Robert-Reinder Nederhoed : > Good day, > When I perform from Z SQL (see attached image): > select 0.1 > The result is: > 0.0 > Setup: > Zope 2.9 > Python 2.3.5 > mxODBCZopeDA 1.0.10 > MySQL 4.1.13 > This does not happen when we query our DB2 database. > Anyone a suggestion on the cause of and cure for this phenomenon? The fact that you get the error with one database and not the other suggests that the problem is with the database or more likely the database driver rather than mxODBC. mxODBC is entirely dependent upon the data structures passed to it by the ODBC driver and unfortunately not all ODBC drivers are equal or conform properly to the standard. The documentation for mxODBC is extensive and you can test at a low level directly from Python to see exactly what the ODBC driver is passing over. You may be able to solve the problem with a small change in the configuration of your ODBC driver or perhaps by using a different ODBC driver for yout database. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free! From nicogrubert at gmail.com Tue Feb 20 17:08:46 2007 From: nicogrubert at gmail.com (Nico Grubert) Date: Tue Feb 20 17:08:56 2007 Subject: [egenix-users] Problem importing the eGenix mx Extensions after new installation of egenix-mx-commercial Message-ID: <45DB1D0E.7090400@gmail.com> Dear list members, I have installed the "egenix-mx-commercial-2.0.7.tar.gz (Unix, C compiler, Python 1.5.2, 2.0 - 2.4)" package. After this installation, I get this error, when I start my Zope: ------------------------------------------------------------ Your Zope installation is using: Python 2.4.4 UCS2 *** Problem importing the eGenix mx Extensions: Please make sure that you have downloaded and installed the right eGenix mxODBC Zope DA version for your version of Zope. Zope uses the Python interpreter to run products and binaries for different versions of the interpreter are mutually incompatible. ------------------------------------------------------------ My previous installation of "mx" and "mxODBCZopeDA" came from a tar archive named "egenix-mxodbc-zopeda-1.0.10.linux-x86_64-py2.4_ucs2" which contains 2 directories: - /lib/python/Products/mxODBCZopeDA - /lib/python/mx I just copied the "mxODBCZopeDA" directory to my Zope SoftwareHome at /usr/local/Zope-2.9.6/lib/python/Products/ and the "mx" directory to /usr/local/lib/python2.4/site-packages/. I put the licence files "license.py" and "license.txt" into /usr/local/lib/python2.4/site-packages/mx/ODBC and everything worked fine. But after I installed the "egenix-mx-commercial-2.0.7.tar.gz" package I get the error message above. Any idea, what I did wrong? A short background story why I installed "egenix-mx-commercial-2.0.7.tar.gz" instead of leaving everything like it is: My Zope was crashing with Python segmentation faults as the memory heap becomes corrupted. Recompiling Python with option "--without-pymalloc" solved the problems. Nick Gorham of easysoft (thank you for your great support, Nick) found out that this error was caused by the egenix-mx-commercial-2.0.7/mx/ODBC/unixODBC/mxODBC.c file so he sent me a new mxODBC.c file in order to rebuild the mxODBC plugin. Regards, Nico From support at egenix.com Tue Feb 20 17:38:11 2007 From: support at egenix.com (eGenix Support) Date: Tue Feb 20 17:38:12 2007 Subject: [egenix-users] Problem importing the eGenix mx Extensions after new installation of egenix-mx-commercial In-Reply-To: <45DB1D0E.7090400@gmail.com> References: <45DB1D0E.7090400@gmail.com> Message-ID: Am 20.02.2007, 17:08 Uhr, schrieb Nico Grubert : > I just copied the "mxODBCZopeDA" directory to my Zope SoftwareHome at > /usr/local/Zope-2.9.6/lib/python/Products/ and the "mx" directory to > /usr/local/lib/python2.4/site-packages/. I put the licence files > "license.py" and "license.txt" into > /usr/local/lib/python2.4/site-packages/mx/ODBC and everything worked > fine. > But after I installed the "egenix-mx-commercial-2.0.7.tar.gz" package I > get the error message above. > Any idea, what I did wrong? Dear Nico, the licence for the mxODBC Zope DA is not compatible with mx Commercial 2.0.7 so the combination you are using will not work. Nick has passed us the patch and we will include the fix in our next release which is due at some point over the next couple of weeks. If possible we will also try to provide a hotfix but that is not unlikely to be before March. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free! From ciampagg at lu.unisi.ch Tue Feb 27 19:17:30 2007 From: ciampagg at lu.unisi.ch (Giovanni Luca Ciampaglia) Date: Tue Feb 27 19:17:34 2007 Subject: [egenix-users] Mac OS X compilation issues Message-ID: <45E475BA.7050809@lu.unisi.ch> Hello list, I'm trying to compile psycopg on Mac OS X 10.4 on a Mac Intel machine, but it seems like there's a problem with the configure script. -------------------------------------------------------------------------------------------------------------------- this is what I get: -------------------------------------------------------------------------------------------------------------------- jd-book-pro:~/Django/psycopg-1.1.21 giovanni$ ./configure --with-postgres-includes=/usr/local/pgsql/include/ --with-mxdatetime-includes=/Users/giovanni/Django/egenix-mx-base-2.0.6/mx/DateTime/mxDateTime/ --with-postgres-libraries=/usr/local/pgsql/lib/ checking for python... /Library/Frameworks/Python.framework/Versions/Current/bin/python checking python version... 2.5 checking python installation prefix... /Library/Frameworks/Python.framework/Versions/2.5 checking python installation exec_prefix... /Library/Frameworks/Python.framework/Versions/2.5 checking definitions in Python library makefile... done checking location of python library... $(prefix)/lib/python2.5/site-packages checking location of python shared modules... $(exec_prefix)/lib/python2.5/site-packages checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking whether make sets $(MAKE)... yes checking for inline... inline checking PostgreSQL version... 8.2 checking PostgreSQL type catalog... /usr/local/pgsql/include//server/catalog/pg_type.h checking for mxDateTime.h... yes checking for main in -lcrypt... no checking for main in -lcrypto... yes checking for PQconnectStart in -lpq... no configure: error: can't build without PostgreSQL libraries -------------------------------------------------------------------------------------------------------------------- And In config.log this is what I get -------------------------------------------------------------------------------------------------------------------- configure:3188: checking for PQconnectStart in -lpq configure:3218: gcc -o conftest -g -O2 -I/usr/local/pgsql/include/ -I/usr/local/pgsql/include//server -I/Users/giovanni/Django/egenix-mx-base-2.0.6/mx/DateTime/mxDateTime/ -L/usr/local/pgsql/lib/ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g conftest.c -lpq -lcrypto -ldl >&5 /usr/bin/ld: for architecture ppc /usr/bin/ld: warning /usr/local/pgsql/lib//libpq.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded) /usr/bin/ld: Undefined symbols: _PQconnectStart collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccGfoqVB.out (No such file or directory) configure:3224: $? = 1 configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "psycopg" | #define PACKAGE_TARNAME "psycopg" | #define PACKAGE_VERSION "1.1.21" | #define PACKAGE_STRING "psycopg 1.1.21" | #define PACKAGE_BUGREPORT "psycopg@lists.initd.org" | | #define HAVE_LIBCRYPTO 1 | /* end confdefs.h. */ | | /* Override any gcc2 internal prototype to avoid an error. */ | #ifdef __cplusplus | extern "C" | #endif | /* We use char because int might match the return type of a gcc2 | builtin and then its argument prototype would still apply. */ | char PQconnectStart (); | int | main () | { | PQconnectStart (); | ; | return 0; | } configure:3249: result: no configure:3254: error: can't build without PostgreSQL libraries -------------------------------------------------------------------------------------------------------------------- Why ld assumes my binary is built for ppc, and why there are both -arch ppc and -arch i386? How can I get rid of -arch ppc? Thank you for support! -- Giovanni From charlie at egenix.com Tue Feb 27 19:41:14 2007 From: charlie at egenix.com (Charlie Clark) Date: Tue Feb 27 19:41:24 2007 Subject: [egenix-users] Mac OS X compilation issues In-Reply-To: <45E475BA.7050809@lu.unisi.ch> References: <45E475BA.7050809@lu.unisi.ch> Message-ID: Am 27.02.2007, 19:17 Uhr, schrieb Giovanni Luca Ciampaglia : > Hello list, > I'm trying to compile psycopg on Mac OS X 10.4 on a Mac Intel machine, > but it > seems like there's a problem with the configure script. Hi Giovanni, a couple of things - you are not getting an error from mxDateTime so this question should really be directed at the psycopg list but you probably will get errors as mxDateTime is currently not fit for Python 2.5. However, the problem you have is here: checking for PQconnectStart in -lpq... no configure can't find a PostgreSQL library. Don't worry about the PPC architecture. The default for Python on Mac OS X is to build fat binaries that inlude both PPC and x86 binaries. This has no performance implications for your application. Good luck Charlie From mal at egenix.com Tue Feb 27 20:24:37 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Tue Feb 27 20:24:43 2007 Subject: [egenix-users] Mac OS X compilation issues In-Reply-To: References: <45E475BA.7050809@lu.unisi.ch> Message-ID: <45E48575.6020300@egenix.com> On 2007-02-27 19:41, Charlie Clark wrote: > Am 27.02.2007, 19:17 Uhr, schrieb Giovanni Luca Ciampaglia > : > >> Hello list, >> I'm trying to compile psycopg on Mac OS X 10.4 on a Mac Intel machine, >> but it >> seems like there's a problem with the configure script. > > Hi Giovanni, > > a couple of things - you are not getting an error from mxDateTime so > this question should really be directed at the psycopg list but you > probably will get errors as mxDateTime is currently not fit for Python > 2.5. For a Python 2.5 compatible version, please use our latest snapshot of egenix-mx-base which includes mxDateTime: http://www.egenix.com/files/python/egenix-mx-base-2.1.0_20060922.zip Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Feb 27 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ :::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: From ciampagg at lu.unisi.ch Tue Feb 27 20:53:44 2007 From: ciampagg at lu.unisi.ch (Giovanni Luca Ciampaglia) Date: Tue Feb 27 20:53:54 2007 Subject: [egenix-users] Mac OS X compilation issues In-Reply-To: <45E48575.6020300@egenix.com> References: <45E475BA.7050809@lu.unisi.ch> <45E48575.6020300@egenix.com> Message-ID: <45E48C48.4090206@lu.unisi.ch> M.-A. Lemburg ha scritto: > On 2007-02-27 19:41, Charlie Clark wrote: > >> Hi Giovanni, >> >> a couple of things - you are not getting an error from mxDateTime so >> this question should really be directed at the psycopg list but you >> probably will get errors as mxDateTime is currently not fit for Python >> 2.5. >> > > For a Python 2.5 compatible version, please use our latest snapshot > of egenix-mx-base which includes mxDateTime: > > http://www.egenix.com/files/python/egenix-mx-base-2.1.0_20060922.zip > > Thanks, > thank you very much to both reply! Giovanni