[python-sybase] RE: Python Sybase-0.36 module with SUSE Linux 9.0

"Döring, Markus" m.doering at BGBM.org
Wed, 9 Jun 2004 15:05:27 +0200


Hello,

I have found that when I manually force the dynamic linker to include the sybase OCS library directory with ldconfig it works!

It worked like this:

linux:~/sybase-0.36 # ldconfig -p | grep sybase
linux:~/sybase-0.36 # python setup.py build_ext
linux:~/sybase-0.36 # ldd build/lib.linux-i686-2.3/sybasect.so
        libct.so => /usr/local/sybase/OCS-12_5/lib/libct.so (0x4003d000)
        libcs.so => /usr/local/sybase/OCS-12_5/lib/libcs.so (0x400ab000)
        libsybtcl.so => /usr/local/sybase/OCS-12_5/lib/libsybtcl.so (0x400b8000)
        libcomn.so => /usr/local/sybase/OCS-12_5/lib/libcomn.so (0x400f0000)
        libintl.so => /usr/local/sybase/OCS-12_5/lib/libintl.so (0x40154000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4015e000)
        libc.so.6 => /lib/i686/libc.so.6 (0x401af000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)


et voila!
Hopefully this build works now...

But is this the way to do it right?


Thanks,
Markus



-----Original Message-----
From: Döring, Markus 
Sent: Mittwoch, 9. Juni 2004 13:16
To: 'python-sybase@www.object-craft.com.au'
Subject: Python Sybase-0.36 module with SUSE Linux 9.0


Hi,

I am trying to get the sybase 0.36 module running on SUSE Linux 9.0 with ASE 12.5 developer version installed in /usr/local/sybase

I managed to compile the shared libraries and run python setup.py install by setting the proper environment variables for SYBASE, SYBASE_OCS and SYBASE_ASE.

But it seems the sybasect.so file is not linked correctly.
When I test the build file with ldd, I get this:

----------------------------------------
linux:~/sybase-0.36 # ldd build/lib.linux-i686-2.3/sybasect.so
        libct.so => not found
        libcs.so => not found
        libsybtcl.so => not found
        libcomn.so => not found
        libintl.so => not found
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4003e000)
        libc.so.6 => /lib/i686/libc.so.6 (0x4008f000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)


----------------------------------------

the gcc build gives me this:
----------------------------------------
gcc -pthread -fno-strict-aliasing -DNDEBUG -D_FILE_OFFSET_BITS=64 -DHAVE_LARGEFILE_SUPPORT -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -fPIC -Wall -fPIC -DWANT_BULKCOPY -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -I/usr/local/sybase/OCS-12_5/include -I/usr/include/python2.3 -c sybasect.c -o build/temp.linux-i686-2.3/sybasect.o
...
gcc -pthread -shared build/temp.linux-i686-2.3/blk.o build/temp.linux-i686-2.3/databuf.o build/temp.linux-i686-2.3/cmd.o build/temp.linux-i686-2.3/conn.o build/temp.linux-i686-2.3/ctx.o build/temp.linux-i686-2.3/datafmt.o build/temp.linux-i686-2.3/iodesc.o build/temp.linux-i686-2.3/locale.o build/temp.linux-i686-2.3/msgs.o build/temp.linux-i686-2.3/numeric.o build/temp.linux-i686-2.3/money.o build/temp.linux-i686-2.3/datetime.o build/temp.linux-i686-2.3/sybasect.o -L/usr/local/sybase/OCS-12_5/lib -lblk -lct -lcs -lsybtcl -lcomn -lintl -o build/lib.linux-i686-2.3/sybasect.so
running install_lib
copying build/lib.linux-i686-2.3/sybasect.so -> /usr/lib/python2.3/site-packages



Does anyone have an idea how to solve this?
Any help greatly appreciated.

Thanks,
Markus
--
 Markus Döring 
 Botanic Garden and Botanical Museum Berlin Dahlem, 
 Dept. of Biodiversity Informatics 
 Königin-Luise-Str. 6-8, D-14191 Berlin 
 Phone: +49 30 83850-284
 Email: m.doering@bgbm.org