[freetds] connect error

Marquess, Dustin Dustin.Marquess at allegiancetelecom.com
Mon Apr 21 12:28:28 EDT 2003


Solaris' ld.so only checks LD_LIBRARY_PATH when the script itself first
runs.  What's happening is the DBD::Sybase module is compiled against
FreeTDS but Solaris' ld.so is finding Sybase OpenClient.

The best (although hackish) solution would be to do something like:

if ($ENV{'LD_LIBRARY_PATH'} neq
'/export/opt3/freetds/lib:/export/opt3/freetds/bin') {
	$ENV{'LD_LIBRARY_PATH'} =
'/export/opt3/freetds/lib:/export/opt3/freetds/bin';
	exec("/path/to/script/scriptname", $0, @ARGV);
}

Although you really shouldn't need freetds/bin in LD_LIBRARY_PATH :).

-Dustin

> 
> -----Original Message-----
> From: Chmiel, Trish [mailto:Trish.Chmiel at gs.com] 
> Sent: Monday, April 21, 2003 11:20 AM
> To: 'freetds at lists.ibiblio.org'
> Cc: Hirsch, Jonathan
> 
> Here is the program that I am trying to connect to MSSQL Server:
> 
> #!/opt/perl-5.004/bin/perl
> 
> $ENV{"SY_PATH"} = '/export/opt3/freetds';
> $ENV{"SYBASE"}='/export/opt3/freetds';
> $ENV{"LD_LIBRARY_PATH"}='/export/opt3/freetds/lib:/export/opt3
> /freetds/bin';
> $ENV{"PATH"}=$ENV{"PATH"}.':/export/opt3/freetds/lib:/export/o
> pt3/freetds/bi
> n';
> 
> use DBI;
> use CGI qw/:standard :html3 escape unescape/;
> $|=1;
> 
> ### Initialize connection to MSSQL
> $dbh = DBI->connect("dbi:Sybase:server=TAMWEB",'acread','xxx');
> 
> exit;
> 
> Here's the error that I am receiving:
> 
> install_driver(Sybase) failed: Can't load
> '/opt/perl-5.004/lib/site_perl/sun4-solaris/auto/DBD/Sybase/Sy
> base.so' for
> module DBD::Sybase: ld.so.1: perl: fatal: relocation error: file
> /opt/sybase/sqlserver/lib/libtcl.so: symbol comn_free: 
> referenced symbol not
> found at /opt/perl-5.004/lib/sun4-solaris/5.004/DynaLoader.pm 
> line 155.
> 
>  at (eval 4) line 2
> Perhaps a required shared library or dll isn't installed 
> where expected
>  at asset_cabinet_utilization.cgi line 22
> 
> 
> Any help would be greatly appreciated.
> 
> Thanks
> ~Trish
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
> 



More information about the FreeTDS mailing list