[unixODBC-support] Does unixODBC on Mac OS X works?

Lorenzo Moretti lorenzo.moretti at bologna.enea.it
Mon Apr 11 23:12:29 BST 2005


Nick Gorham wrote:

>>
>>---------------------------------------------------------------------------------------
>>
>>After I have re-build unixODBC
>>
>>% ./configure --prefix=/usr/local/grasslib --disable-stats 
>>--with-libiconv-prefix=/usr/local/grasslib --disable-gui --with-pic 
>>--enable-shared --enable-static
>>% make
>>% sudo make install
>>
>>I have used an ODBC driver pre-compiled for OSX for MySQL 
>>(http://dev.mysql.com/downloads/connector/odbc/3.51.html)
>>
>>and I have made a test:
>>
>>     % /usr/local/grasslib/bin/isql italia_myodbc
>>
>>     +---------------------------------------+
>>
>>     | Connected!                            |
>>
>>     |                                       |
>>
>>     | sql-statement                         |
>>
>>     | help [tablename]                      |
>>
>>     | quit                                  |
>>
>>     |                                       |
>>
>>     +---------------------------------------+
>>
>>
>>
>>With PostgreSQL driver it doesn't work...
>>
>>Do you think that unixODBC now is it OK under Mac OS X ?
>
>Have you checked the README.OSX for the details of converting from a 
>dylib to a bundle ?
>
>You will need to do that for the postgres driver (or any you build) to work.

No I'm in error. PostgreSQL ODBC driver built inside unixODBC works: 
with isql test works....
A good news


>>
>>And now the problem in GRASS for OS X....
>>
>>I have rebuilt GRASS driver (ODBC) with this unixODBC and now with 
>>the same test italia_myodbc I have:
>>% dbmi: Protocol error
>>
>>No more SQL error but a protocol error.
>>Is the ODBC driver inside GRASS wrong?
>>
>>I have many messages from compiler when I build odbc driver inside GRASS:
>>
>>     odbc
>>
>>     gcc
>>     -I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/include
>> 
>>-I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/dist.powerpc-apple-darwin6.8/include/grass
>>     -I/usr/X11R6/include -I/usr/local/grasslib/include -O3
>>     -D_FILE_OFFSET_BITS=64  -Wall -Wconversion -Wno-implicit-int
>>     -I/usr/X11R6/include -I/usr/local/grasslib/include    
>>     -DPACKAGE=\""grassmods"\" -I/usr/local/grasslib/include
>> 
>>-I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/lib/db/dbmi_driver
>>     -I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/include
>> 
>>-I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/dist.powerpc-apple-darwin6.8/include/grass
>>     \
>>
>>             -o OBJ.powerpc-apple-darwin6.8/connect.o -c connect.c
>>
>>     connect.c: In function `open_connection':
>>
>>     connect.c:11: warning: passing arg 1 of `SQLAllocHandle' with
>>     different width due to prototype
>>
>>     connect.c:22: warning: passing arg 1 of `SQLFreeHandle' with
>>     different width due to prototype
>>
>>     connect.c:27: warning: passing arg 1 of `SQLAllocHandle' with
>>     different width due to prototype
>>
>>     connect.c:31: warning: passing arg 1 of `SQLFreeHandle' with
>>     different width due to prototype
>>
>>     connect.c: In function `close_connection':
>>
>>     connect.c:43: warning: passing arg 1 of `SQLFreeHandle' with
>>     different width due to prototype
>>
>>     connect.c:44: warning: passing arg 1 of `SQLFreeHandle' with
>>     different width due to prototype
>>
>>     gcc
>>     -I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/include
>> 
>>-I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/dist.powerpc-apple-darwin6.8/include/grass
>>     -I/usr/X11R6/include -I/usr/local/grasslib/include -O3
>>     -D_FILE_OFFSET_BITS=64  -Wall -Wconversion -Wno-implicit-int
>>     -I/usr/X11R6/include -I/usr/local/grasslib/include    
>>     -DPACKAGE=\""grassmods"\" -I/usr/local/grasslib/include
>> 
>>-I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/lib/db/dbmi_driver
>>     -I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/include
>> 
>>-I/Volumes/APPLI/src/grass-6.1.cvs_src_snapshot_2005_04_09/dist.powerpc-apple-darwin6.8/include/grass
>>     \
>>
>>             -o OBJ.powerpc-apple-darwin6.8/cursor.o -c cursor.c
>>
>>     cursor.c: In function `alloc_cursor':
>>
>>     cursor.c:41: warning: passing arg 1 of `SQLAllocHandle' with
>>     different width due to prototype
>>
>>     cursor.c:44: warning: passing arg 1 of `SQLGetDiagRec' with
>>     different width due to prototype
>>
>>     cursor.c:44: warning: passing arg 3 of `SQLGetDiagRec' with
>>     different width due to prototype
>>
>>     ......
>>
>>
>>     /and so on/
>>
>>
>>
>>Are these messages normal?
>
>They look like a problem waiting to happen. I suspect that Grass has 
>a different view about what a SQLHANDLE is from the header files.
>
>--
>Nick

It's a Grass problem: it's a bug in OS X version in Grass 6.0 
version. In the old Grass version (5.4) ODBC driver works in OS X.

Thanx

But now one question:
The db drivers built with iODBC (included in Mac OS X) and that work 
in OS X (tested with MS Query) can work with unixODBC or it's 
impossible?
One user have tested one of this and it doesn't work...
How is possible to link unixODBC to iODBC driver?
Is there a way?


Thanx a lot

-- 
________________________________________________________________________
||      Lorenzo Moretti        e-mail: lorenzo.moretti at bologna.enea.it
||/|/|  ENEA prot/idr          Web: http://wwwamb.bologna.enea.it/
||   |  via Don Fiammelli, 2   FTP: ftp://ftpamb.bologna.enea.it/ (ris.)
~~~~~~  40128 BOLOGNA - ITALY  Ph: +39-0516098086  Fax: +39-0516098131
________________________________________________________________________



More information about the unixODBC-support mailing list