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: ANNOUNCE: DBD::Sybase 1.08
Date: May 7 2007 12:11PM

The reason for the problem is simple.

On AMD64 perl is built in 64bit mode - you therefore need the 64bit OCS 
libraries (, etc). These are available from Sybase either by 
purchasing the x86-64 SDK, or an x86-64 version of ASE. I believe that the 
Developer Edition of ASE for x86-64 is available from eshop for a 
reasonable fee (about 200 Euros or so).

Alternatively, rebuild perl in 32bit mode.


Internet - 07.05.2007 14:00
Sent by:
To:     sybperl-l
Subject:        Re: ANNOUNCE: DBD::Sybase 1.08

Hello Michael,

just some feedback. No answer needed on this mail. I am posting this to
provide an entry for the mailing list archive...maybe this will help
another user a little bit, somehow.

DBD::Sybase still does not compile on amd64, ASE 15 client libs. Can't
install DBD::Sybase on amd64 by means of CPAN/shell get and CPAN/shell
test. Please see info below.

Instead, after unsuccessfully trying to install via CPAN, I have managed
to find a DBD::Sybase module that works by installing the  freetds-based
"libdbd-sybase-perl" package that comes with the Ubuntu distribution.

However, I have no clear idea why it works, and what its capabilities
and bugs are.

Best regards,


Sybase/MS SQL database driver for the DBI module
Package maintainer: Steve Langasek 

When I install it and run
perl -MDBI -e '$dbh = DBI->connect("dbi:Sybase:SYBASE_MYSERVER", "sa",
"secret"); print "$dbh->{syb_oc_version}\n";'
freetds v0.63

ldd /usr/lib/perl5/auto/DBD/Sybase/ => /usr/lib/ (0x00002b7b4f429000) => /usr/lib/ (0x00002b7b4f568000) => /lib/ (0x00002b7b4f69d000) => /lib/ (0x00002b7b4f7a1000) => /lib/ (0x00002b7b4f922000)
/lib64/ (0x0000555555554000)

head /proc/version
Linux version 2.6.17-11-generic (root@king) (gcc version 4.1.2 20060928
(prerelease) (Ubuntu 4.1.1-13ubuntu5)) #2 SMP Tue Mar 13 22:06:20 UTC
2007 (Ubuntu 2.6.17-11.37-generic

perl -v
This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi

print "$DBI::VERSION\n";'

print "$DBD::Sybase::VERSION\n";'

DBD::Sybase 1.08 installation:

make test

cc -c  -I/opt/sybase/OCS-15_0/include -DSYB_LP64
-I/usr/local/lib/perl/5.8.8/auto/DBI -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-DVERSION=\"1.08\" -DXS_VERSION=\"1.08\" -fPIC
"-I/usr/lib/perl/5.8/CORE"   Sybase.c
rm -f blib/arch/auto/DBD/Sybase/
LD_RUN_PATH="/opt/sybase/OCS-15_0/lib" cc  -L/opt/sybase/OCS-15_0/lib
-shared -L/usr/local/lib Sybase.o dbdimp.o  -o
blib/arch/auto/DBD/Sybase/       \
-L/opt/sybase/OCS-15_0/lib -lsybct -lsybcs -lsybtcl -lsybcomn
-lsybintl -lsybblk -ldl -lm    \

/usr/bin/ld: skipping incompatible /opt/sybase/OCS-15_0/lib/
when searching for -lsybct
/usr/bin/ld: skipping incompatible /opt/sybase/OCS-15_0/lib/libsybct.a
when searching for -lsybct
/usr/bin/ld: skipping incompatible /opt/sybase/OCS-15_0/lib/
when searching for -lsybct
/usr/bin/ld: skipping incompatible /opt/sybase/OCS-15_0/lib/libsybct.a
when searching for -lsybct
/usr/bin/ld: cannot find -lsybct
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/Sybase/] Error 1
/usr/bin/make -j3 -- NOT OK
Running make test
Can't test without successful make
Failed during this command:
MEWP/DBD-Sybase-1.08.tar.gz                  : make NO

(Although, it would be nice if the library incompatibility problems
mentioned below were it just some compiler switch I should

Michael Peppler wrote:
> I've just released DBD::Sybase 1.08 to CPAN. This a bug fix and
> performance enhancement release.
> I'd like to thank Tim Bunce for his help with this release.
> From the CHANGES file:
> Release 1.08
>     Detect missing libblk.a library, and disable the BLK api calls
>     if necessary.
>     Added code to force dlopen() to use RTLD_GLOBAL.
>     Corrected ct_option() functionality detection.
>     Fixed incorrect handling of bind_params() (Thanks to Tim Bunce).
>     Added serverType DSN parameter.
>     Added tds_keepalive DSN parameter.
>     Fixed incorrect handling of multiple result sets with DBI
>     1.53 and later.
>     Re-wrote $dbh->ping() in C, it's now four times faster.
>     Allow automated build without prompts.
>     Improved nsql().
>     Added corrected handling of DATE and TIME values (ASE 12.5.2 and
> later).
>     Added handling of UNSIGNED INT and BIGINT (ASE 15 and later).
>     Added PERL_NO_GET_CONTEXT #define.
>         Bug Fixes
>     624 - Empty strings incorrectly passed as NULL.
>     616 - Spurious error message when the login request times out.
>     614 - Documentation improvement for syb_xxx methods.
>     610 - Segfault when using signals with the threaded libraries and
>           perl >= 5.8.
> As always, bug fixes, comments, etc. are welcome!
> Michael

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.