Thread: unixODBC fails to open psqlodbcw.so library on Mac OS X 10.4
Hello everybody out there using psqlODBC, On Linux, Windows and Mac OS X 10.6, I could get psqlODBC working perfectly fine. However, on a Mac Mini with PowerPC running Mac OS X 10.4.11, isql fails to open the psqlodbcw.so file, which I installedusing EnterpriseDB's PostgreSQL Application Stack Builder: MacMini:~ user$ isql -v my_dsn [01000][unixODBC][Driver Manager]Can't open lib '/Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so' : file not found [ISQL]ERROR: Could not SQLConnect However, the file exists with global read, write and execute permissions: MacMini:~ user$ ls -l /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so -rwxrwxrwx 1 root admin 2006960 Sep 26 2011 Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so Moreover, all required dependencies of the library are present on the machine: MacMini:~ user$ otool -L /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so: /usr/lib/libltdl.3.dylib (compatibility version 5.0.0, current version 5.4.0) /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) @loader_path/libpq.5.dylib (compatibility version 5.0.0, current version 5.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.17.0) /usr/lib/libiodbcinst.2.dylib (compatibility version 4.0.0, current version 4.17.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) Could you please help me to find additional diagnostics to run in order to pin down the problem? Thanks in advance, Julia
julia.jacobson@arcor.de writes: > Moreover, all required dependencies of the library are present on the machine: > MacMini:~ user$ otool -L /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so > /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so: > /usr/lib/libltdl.3.dylib (compatibility version 5.0.0, current version 5.4.0) > /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) > @loader_path/libpq.5.dylib (compatibility version 5.0.0, current version 5.4.0) > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) > /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.17.0) > /usr/lib/libiodbcinst.2.dylib (compatibility version 4.0.0, current version 4.17.0) > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) Hm, what's that "@loader_path" business? I don't know much about dynamic linking on OS X, but if that works at all, it must be some sort of environment reference, which would be pretty fragile. I'd suggest asking EnterpriseDB whether that's meant to be like that or is a packaging bug. And if it is meant to be like that, what do you have to do to ensure the reference is resolved correctly? regards, tom lane
Thanks for your answers. I compiled psqlODBC for myself and it worked. This indicates, that the issue might have indeed be caused by EnterpriseDB's binary being compiled for 64 bit and iodbc. Since my Mac Mini has PowerPC architecture and is running Mac OS X 10.4 (current version is 10.7) it is quite outdated now. So I expected to have some problems and am happy to having been able to fix them due to the excellent quality of the psqlODBCdriver :-) This would have been impossible with closed-source database drivers. So once again: Thanks to the psqlODBC developers and for your answers. > On 27/05/2012 14:06, julia.jacobson@arcor.de wrote: > > Hello everybody out there using psqlODBC, > > > > On Linux, Windows and Mac OS X 10.6, I could get psqlODBC working > perfectly fine. > > However, on a Mac Mini with PowerPC running Mac OS X 10.4.11, isql fails > to open the psqlodbcw.so file, which I installed using EnterpriseDB's > PostgreSQL Application Stack Builder: > > MacMini:~ user$ isql -v my_dsn > > [01000][unixODBC][Driver Manager]Can't open lib > '/Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so' : file not found > > [ISQL]ERROR: Could not SQLConnect > > However, the file exists with global read, write and execute permissions: > > MacMini:~ user$ ls -l /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so > > -rwxrwxrwx 1 root admin 2006960 Sep 26 2011 > Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so > > Moreover, all required dependencies of the library are present on the > machine: > > MacMini:~ user$ otool -L /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so > > /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so: > > /usr/lib/libltdl.3.dylib (compatibility version 5.0.0, current > version 5.4.0) > > /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current > version 0.9.7) > > @loader_path/libpq.5.dylib (compatibility version 5.0.0, current > version 5.4.0) > > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current > version 111.1.4) > > /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current > version 4.17.0) > > /usr/lib/libiodbcinst.2.dylib (compatibility version 4.0.0, > current version 4.17.0) > > /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current > version 1.0.0) > > Could you please help me to find additional diagnostics to run in order to > pin down the problem? > > > > Thanks in advance, > > Julia > > > Hi, well, I would check that they are all 32 bit (or 64 bit). Also, you > may be trying to use unixODBC, but the posrgres lib seems to be linked > with iodbc. Don't know if that will cause problems. > > -- > Nick >
On Sun, May 27, 2012 at 9:06 AM, <julia.jacobson@arcor.de> wrote: > Hello everybody out there using psqlODBC, > > On Linux, Windows and Mac OS X 10.6, I could get psqlODBC working perfectly fine. > However, on a Mac Mini with PowerPC running Mac OS X 10.4.11, isql fails to open the psqlodbcw.so file, which I installedusing EnterpriseDB's PostgreSQL Application Stack Builder: Our PostgreSQL 9.0/9.1 installers, and the add-ons in StackBuilder target ppc, i386 and x86_64 architectures running 10.5 (Leopard) and above I'm afraid. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Sun, May 27, 2012 at 11:06 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > julia.jacobson@arcor.de writes: >> Moreover, all required dependencies of the library are present on the machine: >> MacMini:~ user$ otool -L /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so >> /Library/PostgreSQL/psqlODBC/lib/psqlodbcw.so: >> /usr/lib/libltdl.3.dylib (compatibility version 5.0.0, current version 5.4.0) >> /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7) >> @loader_path/libpq.5.dylib (compatibility version 5.0.0, current version 5.4.0) >> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) >> /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.17.0) >> /usr/lib/libiodbcinst.2.dylib (compatibility version 4.0.0, current version 4.17.0) >> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) > > Hm, what's that "@loader_path" business? I don't know much about > dynamic linking on OS X, but if that works at all, it must be some sort > of environment reference, which would be pretty fragile. I'd suggest > asking EnterpriseDB whether that's meant to be like that or is a > packaging bug. It is meant to be like that - it expands to the directory containing the psqlodbcw.so file (@loader_path is useful when creating relocatable frameworks). We ship the required libpq in the psqlODBC installer, so it should always be available in that path. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company