[python-sybase] Sybase python runtime error

Steve Bremer steveb at nebcoinc.com
Fri, 06 Jun 2003 10:45:36 -0500


When I try to execute any python programs using the "Sybase" 
python module, I receive the following error:


===
Traceback (most recent call last):
  File "/export/home/sybase/python/test/sybase.py", line 3, in ?
    import Sybase
  File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 20, in ?
    from sybasect import *
ImportError: ld.so.1: /usr/bin/python: fatal: relocation error: file 
/usr/local/
lib/python2.2/site-packages/sybasect.so: symbol ct_cmd_alloc: 
referenced symbol
not found
====

However, my LD_LIBRARY_PATH does include /sybase/OCS-
12/lib.  If I execute:

ldd /usr/local/lib/python2.2/site-packages/sybasect.so

I receive the following output:

        libsybdb.so =>   /sybase/OCS-12_0/lib/libsybdb.so
        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        /usr/platform/SUNW,Sun-Fire-880/lib/libc_psr.so.1

So, it looks to me like the linker can find the Sybase library just fine 
because if I clear LD_LIBRARY_PATH before executing the 
command, I get the following instead:

        libsybdb.so =>   (file not found)
        libgcc_s.so.1 =>         (file not found)


Version information:

Sybase 12.0
Solaris 8
Python 2.2.2

There were no error messages during the compile/install.  I used the 
following steps to compile/install:

python setup.py build_ext -U WANT_BULKCOPY -D WANT_THREADS
su -
python setup.py install

I found a similar post in the archives, but there was no resolution 
offered.  Any help would be greatly appreciated.

Please CC me as I'm not subscribed to the list.

Thanks,
Steve Bremer
NEBCO, Inc.
System & Security Administrator