Error running freetds to access SQL Server

Subramanya, Girija girija.subramanya at attws.com
Mon Jan 8 19:54:38 EST 2001


Hi,

Thanks for your input. It does locate Sybase.so file.

ldd
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Sybase/Sybase.so
        libct.so.0 =>    /usr/local/freetds/lib/libct.so.0
        libintl.so.1 =>  /usr/lib/libintl.so.1
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1

I still get this error:

Can't load
'/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Sybase/Sybase.so
' for module 
DBD::Sybase: ld.so.1: /usr/bin/perl: 
fatal: relocation error: file /usr/local/freetds/lib/libct.so.0: 
symbol g_tds_err_handler: referenced symbol not found at 
/usr/local/lib/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169.

Thanks,
Girija Subramanya
AT&T Wireless Services
> WISDEM National Data Warehouse Administration
(972) 776.1897
girija.subramanya at attws.com


> ----------
> From: 	D. J. Hagberg[SMTP:dhagberg at millibits.com]
> Reply To: 	TDS Development Group
> Sent: 	Saturday, January 06, 2001 10:41 PM
> To: 	TDS Development Group
> Subject: 	[freetds] Re: Error running freetds to access SQL Server
> 
> Just a guess, but perhaps your shared libraries are not being found? 
> Try:
> 
> ldd
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Sybase/Sybase.s
> o
> 
> which may show that it cannot either resolve libct.so or libtds.so.  In
> that case, all you need to do is be sure your LD_LIBRARY_PATH
> environment variable includes the /usr/local/freetds/lib directory or
> wherever your freetds .so's live.  An alternative is to compile a
> runtime path into the application.  This is typically done on Solaris by
> suppling a -R/usr/local/freetds/lib during the link command (with the
> SunPro compiler) or -Wl,-R,/usr/local/freetds/lib with gcc as the
> linker.
> 
> Hope this helps,
> 
> 			-=- D. J.
> 
> Girija wrote:
> > I installed freetds-0.51 on SUN sparc to access data from SQL Server 6.5
> > on an NT box. I also installed DBD-Sybase-0.91. We already have perl DBI
> > on this machine.
> > 
> > When I tried to test my script,
> > 
> > use DBI;
> >                    $ENV{'SYBASE'} = '/usr/local/freetds';
> >                    $dbh =
> > DBI->connect('dbi:Sybase:server=myserver','uid','pword')
> >                        or die 'connect';
> >                    $dbh->do("use pubs");
> >                    $sth = $dbh->prepare('select * from authors') or die
> > 'prepare';
> >                    $sth->execute or die 'execute';
> >                    while (@data = $sth->fetchrow_array) {
> >                        print "$data[0]\n"; # the authors' SSNs
> >                    }
> >                    $sth->finish;
> >                    $dbh->disconnect;
> > 
> > I get this error:
> > 
> > install_driver(Sybase) failed: Can't load
> >
> '/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/DBD/Sybase/Sybase.
> so'
> > for module DBD::Sybase: ld.so.1: /usr/bin/perl: fatal: relocation
> > error:file /usr/local/freetds/lib/libct.so.0: symbol g_tds_err_handler:
> > referenced symbol not found at
> > /usr/local/lib/perl5/5.00503/sun4-solaris/DynaLoader.pm line 169, <IN>
> chunk
> > 2.
> > 
> >  at (eval 4) line 3
> >         Carp::croak('Can\'t load
> > \'/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/...') called at
> > /usr/local/lib/perl5/5.
> > 00503/sun4-solaris/DynaLoader.pm line 93
> >         DynaLoader::croak('Can\'t load
> > \'/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/...') called at
> > /usr/local/lib/pe
> > rl5/5.00503/sun4-solaris/DynaLoader.pm line 169
> >         DynaLoader::bootstrap('DBD::Sybase', 0.91) called at
> > /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Sybase.pm
> > 
> > Can someone please help me with this error?
> > 
> > Thanks,
> > girija
> > 
> > ---
> > You are currently subscribed to freetds as: [dhagberg at millibits.com]
> > To unsubscribe, forward this message to
> $subst('Email.Unsub')
> 
> ---
> You are currently subscribed to freetds as: [girija.subramanya at attws.com]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')
> 



More information about the FreeTDS mailing list