Skip to Content.
Sympa Menu

freetds - RE: [freetds] connect error

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Marquess, Dustin" <Dustin.Marquess AT allegiancetelecom.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Cc: "Hirsch, Jonathan" <jonathan.hirsch AT gs.com>
  • Subject: RE: [freetds] connect error
  • Date: Mon, 21 Apr 2003 11:28:28 -0500

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
>



  • [freetds] connect error, Chmiel, Trish, 04/21/2003
    • <Possible follow-up(s)>
    • RE: [freetds] connect error, Marquess, Dustin, 04/21/2003

Archive powered by MHonArc 2.6.24.

Top of Page