After update from 2.3.0-r1 to 2.3.1 ~> isql 'test' -v [01000][unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : file not found [ISQL]ERROR: Could not SQLConnect ~> ls /usr/lib64/libmyodbc5.so /usr/lib64/libmyodbc5-5.1.6.so 300K -rwxr-xr-x 1 root root 297K Янв 3 19:17 /usr/lib64/libmyodbc5-5.1.6.so 0 lrwxrwxrwx 1 root root 19 Янв 3 19:17 /usr/lib64/libmyodbc5.so -> libmyodbc5-5.1.6.so ~> cat /etc/unixODBC/odbcinst.ini [MySQL] Description = ODBC for MySQL Driver = /usr/lib64/libmyodbc5.so FileUsage = 1 [SQLITE] Description = SQLITE3 ODBC DRIVER Driver64 = /usr/lib64/libsqlite3odbc.so Setup64 = /usr/lib64/libsqlite3odbc.so UsageCount = 1 CPTimeout = CPReuse = Reproducible: Always
Created attachment 307289 [details] emerge --info dev-db/unixODBC
(In reply to comment #0) > After update from 2.3.0-r1 to 2.3.1 > > ~> isql 'test' -v > [01000][unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : > file not found > [ISQL]ERROR: Could not SQLConnect With your odbcinst.ini below I get: $ isql 'test' -v [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect > ~> ls /usr/lib64/libmyodbc5.so /usr/lib64/libmyodbc5-5.1.6.so > 300K -rwxr-xr-x 1 root root 297K Янв 3 19:17 /usr/lib64/libmyodbc5-5.1.6.so > 0 lrwxrwxrwx 1 root root 19 Янв 3 19:17 /usr/lib64/libmyodbc5.so -> > libmyodbc5-5.1.6.so > ~> cat /etc/unixODBC/odbcinst.ini > [MySQL] > Description = ODBC for MySQL > Driver = /usr/lib64/libmyodbc5.so > FileUsage = 1 This type of whitespacing is known to kill unixODBC configs. Remove the extra whitespacing before equal signs. And please provide better information on howto reproduce the failure.
> This type of whitespacing is known to kill unixODBC configs. Remove the extra whitespacing before equal signs. Ok, but not helped me. ~# od -c /etc/unixODBC/odbcinst.ini 0000000 [ M y S Q L ] \n D e s c r i p t 0000020 i o n = " O D B C f o r M y 0000040 S Q L " \n D r i v e r = / u s r 0000060 / l i b 6 4 / l i b m y o d b c 0000100 5 . s o \n F i l e U s a g e = 1 0000120 \n \n [ S Q L I T E ] \n D e s c r 0000140 i p t i o n = " S Q L I T E 3 0000160 O D B C D R I V E R " \n D r i 0000200 v e r 6 4 = / u s r / l i b 6 4 0000220 / l i b s q l i t e 3 o d b c . 0000240 s o \n S e t u p 6 4 = / u s r / 0000260 l i b 6 4 / l i b s q l i t e 3 0000300 o d b c . s o \n U s a g e C o u 0000320 n t = 1 \n C P T i m e o u t = \n 0000340 C P R e u s e = \n 0000351 > And please provide better information on howto reproduce the failure. Oh, sorry, "test" is a name of my configuration in ~/.odbc.ini [test] Description="MySQL database test" Driver=MySQL Server=localhost Database=Syslog Port=3306 UserName=slUser
I can't reproduce this either in x86 nor amd64. How did you create the odbcinst.ini entry? did you run emerge --config =dev-db/myodbc-5.1.6 as suggested by the ebuild? Could you attach an strace log to see if we could figure out whats happening? Closing as NEEDINFO. Please reopen when you have the strace log. Thanks for the report
A long time ago I created the odbcinst.ini by hands. And now I deleted all /etc/unixUDBC/* and ran emerge --config =dev-db/myodbc-5.1.6. As result # cat /etc/unixODBC/odbc.ini [ODBC Data Sources] myodbc-5.1-test=MySQL ODBC myodbc-5.1.6 Driver Testing DSN [myodbc-5.1-test] Description=MySQL ODBC myodbc-5.1.6 Driver Testing DSN Driver=myodbc-5.1 Socket=/var/run/mysqld/mysqld.sock Server=localhost User=root Database=test Option=3 and # cat /etc/unixODBC/odbcinst.ini [myodbc-5.1] Description=MySQL ODBC myodbc-5.1.6 Driver Driver=/usr/lib/libmyodbc5.so UsageCount=1 Then ~ % isql 'myodbc-5.1-test' -v [01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/libmyodbc5.so' : file not found [ISQL]ERROR: Could not SQLConnect
Created attachment 309405 [details] strace
(In reply to comment #6) > Created attachment 309405 [details] > strace I'm not sure if this has any relavence but the strace is showing lines like: open("/path/to/libodbcinst.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) But the file installed by unixODBC is /usr/lib64/libodbcinst.so.2 with 2 instead of 1. The unixODBC bump from 2.3.0 to 2.3.1 raised .so versioning by one (and it's allowed to do so). Question is, where is this .so.1 hardcoded at? Why it isn't looking for .so.2?
You have recompiled myodbc after upgrading unixODBC, right? Try that first. If it doesn't work, then try to compile myodbc like: EXTRA_ECONF="--enable-odbcinstlink" emerge -1 myodbc (Just following a hunch.)
I'm not remember about recompile, but now after emerge -1 myodbc the problem is solved. Many thanks!
None of this unixODBC/myodbc/etc. 'foo' is linked, but called by dlopen() instead, so 'revdep-rebuild' won't catch these. Changed to resolution to WORKSFORME (since nothing was really broken, but working as designed.)