From: Sébastien S. <sa...@us...> - 2009-03-06 15:46:13
|
Hi Terry, thanks for the feedback. There are different naming conventions for sybase libraries depending on the version of sybase, the platform, 32 or 64 bits and if you are using the original sybase libraries or freetds... I have commited a correction in trunk which hopefully should work in most cases: $ svn diff Index: setup.py =================================================================== --- setup.py (révision 443) +++ setup.py (copie de travail) @@ -90,7 +90,7 @@ for name in lib_names: extensions = [('', 'a'), ('', 'so'), ('_r', 'a'), ('_r', 'so')] if have64bit and sys.platform not in ['osf1V5']: - extensions = [('_r64', 'a'), ('_r64', 'so')] + extensions = [('_r64', 'a'), ('_r64', 'so')] + extensions for (ext1, ext2) in extensions: lib_name = "%s%s" % (name, ext1) lib_path = os.path.join(sybase, 'lib', 'lib%s.%s' % (lib_name, ext2)) Index: ChangeLog =================================================================== --- ChangeLog (révision 443) +++ ChangeLog (copie de travail) @@ -1,3 +1,7 @@ +2009-03-06 Sébastien Sablé <sa...@us...> + + * setup.py: Improved libraries detection for 64bits platforms + 2008-10-15 Sébastien Sablé <sa...@us...> * Sybase.py: Start using logging module $ svn commit -m "Improved libraries detection for 64bits platforms" Envoi ChangeLog Envoi setup.py Transmission des données .. Révision 444 propagée. regards -- Sébastien Sablé Terry Burton a écrit : > On Fri, Mar 6, 2009 at 1:25 PM, Sébastien Sablé > <sa...@us...> wrote: >> the sybase module is not linked to the freetds libraries, that is why there >> are some undefined symbols. >> >> This is probably because the setup.py script is not looking with the correct >> name for those libraries. > > Hi Sébastien, > > Absolutely correct, thanks. > > Commenting out the lines that append _r64 to the lib path for 64-bit > arch fixes the problem: > > if os.name == 'posix': # unix > # Most people will define the location of their Sybase > # installation in their environment. > ... > lib_names += ['sybblk', 'sybct', 'sybcs', 'sybtcl', 'sybinsck', > 'sybcomn', 'sybintl', 'sybunic'] > for name in lib_names: > extensions = [('', 'a'), ('', 'so'), ('_r', 'a'), ('_r', 'so')] > # if have64bit and sys.platform not in ['osf1V5']: > # extensions = [('_r64', 'a'), ('_r64', 'so')] > for (ext1, ext2) in extensions: > lib_name = "%s%s" % (name, ext1) > lib_path = os.path.join(sybase, 'lib', 'lib%s.%s' % > (lib_name, ext2)) > if os.access(lib_path, os.R_OK): > syb_libs.append(lib_name) > break > >> Could you please send me privately the list of files installed by your >> freetds package or the result of the following command: >> >> ls /usr/lib/lib*blk* /usr/lib/lib*ct* /usr/lib/lib*cs* \ >> /usr/lib/*libsybtcl* /usr/lib/lib*insck* /usr/lib/lib*comn* \ >> /usr/lib/lib*intl* > > For interest sake: > > $ ls /usr/lib/lib*blk* /usr/lib/lib*ct* /usr/lib/lib*cs* > /usr/lib/lib*sybtcl* /usr/lib/lib*insck* /usr/lib/lib*comn* > /usr/lib/lib*intl* > ls: cannot access /usr/lib/lib*blk*: No such file or directory > ls: cannot access /usr/lib/lib*sybtcl*: No such file or directory > ls: cannot access /usr/lib/lib*insck*: No such file or directory > ls: cannot access /usr/lib/lib*comn*: No such file or directory > ls: cannot access /usr/lib/lib*intl*: No such file or directory > /usr/lib/libct.a > /usr/lib/libct.so.4 > /usr/lib/librpcsecgss.so.3.0.0 > /usr/lib/libct.la > /usr/lib/libct.so.4.0.0 > /usr/lib/librpcsvc.a > /usr/lib/libct.so > /usr/lib/librpcsecgss.so.3 > > > Many thanks for your assistance. > > > Warm regards, > > Terry |