Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: michael dot peppler at bnpparibas dot com
Subject: Re: python and sybase
Date: Jun 1 2006 5:44AM

Like Matthew said - you should probably find a Python list/forum for these

If python is built in 64bit mode then it HAS to use the 64bit Sybase libs.
However I suspect that the python Sybase glue code hasn't been modified to
handle the changes required to link/build with the 64bit libs - in
particular including the -DSYB_LP64 command line arg to gcc when compiling
the C code, and linking with the xxx64 version of the libs.


Internet - 31/05/2006 16:19

Sent by:

To:    sybperl-l


Subject:    python and sybase


I am running linuxamd64 with SLES 9.3.

I can't get the python to import Sybase after it installs with no errors.
I tried editing the as is suggested and changing libraries from ct
to ct64.  Other posts say to try sybct, I tried that too. That didn't help
with OCS-15_0(64-bit).  My theory now is that Dave build python - sybase to
work with 32-bit sybase OCS even though python 2.3.5 itself uses 64-bit.
Below is a screenshot showing python's sybase module, sybase-0.37
with out error.  I'm not sure what to try at this point.

Should I dump OCS and can I get python to import sybase with just freetds
and not involve OCS?
Should I work on getting a 32-bit version of OCS from $ybase?

:/usr/local/src/sybase-0.37> vi
:/usr/local/src/sybase-0.37> python build_ext -D WITH_THREADS
running build_ext
:/usr/local/src/sybase-0.37> python install
running install
running build
running build_py
running build_ext
running install_lib
:/usr/local/src/sybase-0.37> python
Python 2.3.5 (#8, Mar 24 2005, 08:32:27)
[GCC 3.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>import Sybase
Traceback (most recent call last):
  File "", line 1, in ?
  File "", line 20, in ?
    from sybasect import *
ImportError: /usr/local/lib/python2.3/site-packages/ undefined
symbol: cs_dt_info

This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 


Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.