PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
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 8 2007 5:35AM

Actually it has nothing to do with 64bit - and all to do with the way perl 
handles signals in threaded mode in perl 5.8 and later.

But yes, using the reentrant libraries mean that signal handling is 
broken, and that any signal delivered to the program will result in a 
segfault.

Michael




Internet
jason@froebe.net@peppler.org - 07.05.2007 20:07
 
Sent by:        owner-sybperl-l@peppler.org
To:     Stefan.Karlsson, knb, sybperl-l
cc: 
Subject:        Re: ANNOUNCE: DBD::Sybase 1.08

DBD::Sybase shouldn't be compiled on Linux x86-64 using the reentrant
libraries.  It will segfault on certain signals.  This is due to a bug
with 64bit perl and not DBD::Sybase.

So, use the non-reentrant libraries.

jason

--- Stefan Karlsson  wrote:

> The libraries specified are the 32-bit libraries:
> -lsybct -lsybcs -lsybtcl -lsybcomn -lsybintl -lsybblk
>
> Use the 64-bit versions:
> sybct64, sybcs64, sybblk64
>
> Also, note that the thread-safe versions of the libraries are named
> _r,
> e.g: sybct_r64
>
> I'm really completely oblivious to what the DBD module needs so this
> is
> in no way authoritative advise, but for client applications you only
> need to specify sybct and sybcs with 15.0. For Bulk Library me thinks
>
> sybblk is needed too. So condensing my suggestion:
>
>       replace: -lsybct -lsybcs -lsybtcl -lsybcomn -lsybintl -lsybblk
>
>       with: -lsybct64 -lsybcs64 -lsybblk64
>
>       or, more likely: -lsybct_r64 -lsybcs_r64 -lsybblk_r64
>
> HTH,
>
> /Stefan
>
> Knut Behrends wrote:
> > 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,
> > Knut
> >
> >
> > #####################################
> >
> >  libdbd-sybase-perl
> > 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/Sybase.so
> >         libct.so.3 => /usr/lib/libct.so.3 (0x00002b7b4f429000)
> >         libtds.so.4 => /usr/lib/libtds.so.4 (0x00002b7b4f568000)
> >         libdl.so.2 => /lib/libdl.so.2 (0x00002b7b4f69d000)
> >         libm.so.6 => /lib/libm.so.6 (0x00002b7b4f7a1000)
> >         libc.so.6 => /lib/libc.so.6 (0x00002b7b4f922000)
> >         /lib64/ld-linux-x86-64.so.2 (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";'
> > 1.53
> >
> > print "$DBD::Sybase::VERSION\n";'
> > 1.00
> >
> > ################
> > 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/Sybase.so
> > 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/Sybase.so       \
> >            -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/libsybct.so
> > 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/libsybct.so
> > 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/Sybase.so] 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 solved...is it just some compiler switch I
> should
> > change/add?).
> >
> >
> > 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
> >
> >
> >
>


Jason L. Froebe

Help find a cure for breast cancer!  Net proceeds benefit the Susan G. 
Komen Breast Cancer Foundation and the National Philanthropic Trust. Help 
by donating at http://www.the3day.org/chicago07/jfroebe - I'm walking 60 
miles in 3 days in August 2007.  (The day I return from TechWave is the 
first day of the Walk)

WebBlog http://jfroebe.livejournal.com
Tech log http://www.froebe.net/blog
Froebe Fibers http://www.froebe-fibers.com


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.