[CentOS] python-sybase on Centos 5 x86_64

Michael Best mbest at pendragon.org
Mon Oct 6 04:03:20 UTC 2008

Installed the freetds rpms from centos-extras, also tried the ones in 

Compiled python-sybase-0.39 by hand, and also via rpm.


This spec file modified to compile on x86_64:

--- python-sybase.spec  2008-10-05 21:53:49.000000000 -0600
+++ python-sybase.spec.new      2008-10-05 21:53:36.000000000 -0600
@@ -27,6 +27,6 @@
  rm -rf $RPM_BUILD_ROOT
-PYVERSION=`python --version 2>&1 | sed -e "s/.* 
-export PYTHONPATH="$RPM_BUILD_ROOT/usr/lib/python$PYVERSION/site-packages"
+PYVERSION=`python -V 2>&1 | sed -e "s/.* \([0-9]*\.[0-9]*\)\.[0-9]*/\1/g"`
  mkdir -p $PYTHONPATH
  export SYBASE="/usr"

Both the source version and the rpm are built basically the same way, 
and the final result after installation is something like:

# python
Python 2.4.3 (#1, Mar 14 2007, 19:01:42)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import Sybase
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "build/bdist.linux-x86_64/egg/Sybase.py", line 11, in ?
   File "build/bdist.linux-x86_64/egg/sybasect.py", line 7, in ?
   File "build/bdist.linux-x86_64/egg/sybasect.py", line 6, in __bootstrap__
undefined symbol: blk_alloc

As per this thread:

Something may be going wrong in linking, as the sybasect.so doesn't seem 
to be linked to the sybase libraries.

$ ldd 
         libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaaacdf000)
         libc.so.6 => /lib64/libc.so.6 (0x00002aaaaaef9000)
         /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)

Suggestions, comments, fixes, would all be useful.


More information about the CentOS mailing list