public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* iodbc always in error
@ 2013-09-05  8:03 Sébastien Dailly
  2013-09-06 13:31 ` iodbc always in error (solved) Sébastien Dailly
  0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Dailly @ 2013-09-05  8:03 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1440 bytes --]

Hello,

I'm trying to make iodbc work with cygwin, but I'm always getting errors. 
I've installed « libiodbc2 », « iodbctest », « iodbcadm-gtk » and the 
sqlite driver « odbc-sqlite3 ».

When I wan to check the configuration, I've got the following session :

> $ iodbctest mysqlite
> iODBC Demonstration program
> This program shows an interactive SQL processor
> Driver Manager: 03.52.0812.0326
> 1: SQLDriverConnect = [iODBC][Driver Manager]Driver's SQLAllocEnv() failed 
> (0) SQLSTATE=IM004
> 1: ODBC_Connect = [iODBC][Driver Manager]Driver's SQLAllocEnv() failed (0) 
> SQLSTATE=IM004
> 
> Have a nice day.

The configuration file is here and works when I test it on Debian :

> [ODBC Data Sources]
> mysqlite = SQLite
> 
> [mysqlite]
> Driver      = /usr/lib/cygsqlite3odbc.dll
> Description = My sqlite test database
> Database    = /home/user/databases/mytest.db
> ; optional lock timeout in milliseconds
> Timeout     = 2000
> 
> [ODBC]
> Trace         = 1
> TraceAutoStop = 0
> TraceFile     = sql.log
> Debug         = 1
> DebugFile     = sql_debug.log

I've first suspected something wrong in the sqlite driver and recompiled
it from sources, but I still get the same error, so I now think there is
a problem in the iodbc library.

The iodbc log are here : http://pastebin.com/mzDLUC3x

Can you help me to understand what happen ?

Thanks !

(I'm not registered on the ml, please cc me in your answer.)

-- 
Sébastien

[-- Attachment #2: Type: text/plain, Size: 218 bytes --]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iodbc always in error (solved)
  2013-09-05  8:03 iodbc always in error Sébastien Dailly
@ 2013-09-06 13:31 ` Sébastien Dailly
  2013-09-11 20:41   ` Yaakov (Cygwin/X)
  0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Dailly @ 2013-09-06 13:31 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1112 bytes --]

Hello,

I've sent a mail here yesterday requesting for help in order to make
iodbc work in cygwin. I've investigated in the library code and found
something interesting :

In the log I've sent yesterday[1], each function name start with an « _ » 
wich does not appear in the sql driver library :

> objdump.exe -x /usr/lib/cygsqlite3odbc.dll | less
>           …
>         [   0] SQLAllocConnect
>         [   1] SQLAllocEnv
>         [   2] SQLAllocHandle
>         [   3] SQLAllocStmt
>         [   4] SQLBindCol
>         [   5] SQLBindParameter
>           …

The iodbc package contains the file « iodbc/henv.ci »[2] wich is actualy
an index of the declared function to call. There is a strange preprocess
instuctions at l79 wich needs to be completed in order to works in
cygwin :

> #define CLI    "SQL"

now you can rebuild the package and the odbc will work.

You can consider this mail as a bugreport (and I hope it will be
reported in the cygwin package).

[1] http://pastebin.com/mzDLUC3x
[2] https://github.com/openlink/iODBC/blob/develop/iodbc/henv.ci

-- 
Sébastien Dailly

[-- Attachment #2: Type: text/plain, Size: 218 bytes --]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iodbc always in error (solved)
  2013-09-06 13:31 ` iodbc always in error (solved) Sébastien Dailly
@ 2013-09-11 20:41   ` Yaakov (Cygwin/X)
  0 siblings, 0 replies; 3+ messages in thread
From: Yaakov (Cygwin/X) @ 2013-09-11 20:41 UTC (permalink / raw)
  To: cygwin

On 2013-09-06 08:31, Sébastien Dailly wrote:
> I've sent a mail here yesterday requesting for help in order to make
> iodbc work in cygwin. I've investigated in the library code and found
> something interesting :
>
> In the log I've sent yesterday[1], each function name start with an « _
> » wich does not appear in the sql driver library :
>
> The iodbc package contains the file « iodbc/henv.ci »[2] wich is actualy
> an index of the declared function to call. There is a strange preprocess
> instuctions at l79 wich needs to be completed in order to works in
> cygwin :
>
>> #define CLI    "SQL"
>
> now you can rebuild the package and the odbc will work.

Thanks for tracking this down.  The root cause is actually a false 
positive from an erroneous configure test, causing configure to decide 
that leading underscores are necessary with dlsym(3) where they actually 
are not.  This should be fixed in the new 3.52.8-2 release.


Yaakov


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-11 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-05  8:03 iodbc always in error Sébastien Dailly
2013-09-06 13:31 ` iodbc always in error (solved) Sébastien Dailly
2013-09-11 20:41   ` Yaakov (Cygwin/X)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).