integrating DBD-Sybase-0.94 to use FreeTDS

integrating DBD-Sybase-0.94 to use FreeTDS

Post by jd wilso » Sun, 20 Oct 2002 06:16:02



Sybase group:

I'm looking for some help in getting DBD::Sybase to work using FreeTDS.
We're not able to use the old Sybase OC/S ASE software due to compatibilty
with MSSQL Server 2000 (different TDS versions) and we have some experience
using TDS.  We're targetting both legacy Sybase servers as well as new MS
SQL servers.

Per the FreeTDS webpage, with respect to language bindings, the text
mentions that "... DBD::Sybase works very well using FreeTDS to access
Sybase or Microsoft SQL Servers."  I've not been able to get this working as
of yet.  The tests are failing.  I've found references in various place to
the error shown below, but so far no solution found.  Again, we're targeting
FreeTDS and not the Sybase ASE OC/S libs.

install_driver(Sybase) failed: Can't load
'blib/arch/auto/DBD/Sybase/Sybase.so' for module DBD::Sybase: ld.so.1:
/.../usr/local/bin/perl: fatal: libgcc_s.so.1: open failed: No such file or
directory at /.../usr/local/lib/perl5/5.00503/sun4-solaris/DynaLoader.pm
line 169
(path info edited for brevity).

I have defined SYBASE to point to where I have FreeTDS installed per the
FreeTDS webpage.

Perl 5 version info:

(NOTE! Per CPAN web page concerning building perl with gcc 3.0.3,
option -Wl,-E was added to get this to compile properly.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos vntwb1da 5.7 generic_106541-19 sun4u sparc sunw,ultra-80 '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='gcc -B/usr/ccs/bin/', optimize='-O', gccversion=3.0.3
    cppflags='-I/usr/local/include'
    ccflags ='-I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc -B/usr/ccs/bin/ -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-Wl,-E -G -L/usr/local/lib'

Characteristics of this binary (from libperl):
  Built under solaris
  Compiled at Oct 17 2002 18:01:40

    /devel/usr/local/lib/perl5/5.00503/sun4-solaris
    /devel/usr/local/lib/perl5/5.00503
    /devel/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
    /devel/usr/local/lib/perl5/site_perl/5.005

I've compiled and tested FreeTDS using gcc 3.0.3 (gcc was already
installed).  FreeTDS is under the /devel/user/local path.

I also compiled and tested DBI-1.30, and installed this in the
/devel/usr/local path as well.

The problem is that DBD-Sybase-0.94_02 tests are failing as shown above.

If anyone has any experience with integrating DBD-Sybase with FreeTDS on
Solaris using gcc it would be much appreciated if you could help out here.

I have more info on this process, but did not want to put all of that in
this message.  This problem appears to have been around for a while, but
I've never seen any solutions for it.

Thanks in advanced.
Regards,
j d wilson

 
 
 

1. problems connecting to a ms sql server (using DBD-Sybase and sybase libs)

the problem is this....

I have installed the sybase libraries and the dbd-sybase perl module
but when a i do a make test i get this error message.

PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/usr/lib/perl5/i386-linux -I/usr/lib/perl5 -e 'use Test::Harness

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "default",
        LC_ALL = "default",
        LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
t/autocommit........perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "default",
        LC_ALL = "default",
        LANG = (unset)
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

The context allocation routine failed when it tried to load
localization
files!!
One or more following problems may caused the failure

Your sybase home directory is /opt/sybase-12.5/OCS-12_5. Check the
environment variable SYBASE if it is not the one you want!
Using locale name "default" defined in environment variable LC_ALL
install_driver(Sybase) failed: DBD::Sybase initialize: cs_ctx_alloc()
failed
at /usr/lib/perl5/i386-linux/DynaLoader.pm line 219.
Compilation failed in require at (eval 1) line 3.

what am i doing wrong??
i have the SYBASE variable pointing to the correcto sybase directory
(/opt/sybase-12.5/OCS-12_5), i think it's something with the locale
files
but i'm not shure.

thanks for the help

2. HOWTO: make a concatenated string from variable length 1-column recordset ?

3. October '94 Sybase Press Release

4. Show Row Numbers in Query Analyzer

5. SYBASE MAGAZINE, Summer '94 Issue, Free Copies

6. one transaction use one cpu?

7. Sybase VLDB SIG 6/94 online conf notes

8. How is more than one stream made

9. Using Sybase DBD under NT?

10. Problem selecting a column from a view in Sybase using DBI/DBD

11. problem on using DBD:Sybase on Linux

12. using DBD::Sybase

13. stat 94 when using NT scheduler