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 Peppler <mpeppler at peppler dot org>
Subject: Re: Sybase home directory question
Date: Nov 22 2004 6:26PM

On Mon, 2004-11-22 at 19:13, Christian Behrens wrote:
> That is very strange. CTlib.pm and DBlib.pm both had ../sybase/OCS-12_5 in
> them. Why? My CONFIG file clearly has not OCS-12_5 in it. And no variable is
> set, and I don't think I had anything set when building SybPerl. Although
> that is easy enough to test which I'll probably do later.

That's a bug. I looked through the code, and I see that I override the
value of SYBASE and append the OCS bit to it if it is found/set in the
environment.

> The other weird thing is that after fixing CTlib.pm and DBlib.pm, my test
> script DOES work and gives me back the the version string of the server I'm
> connecting to, but without having anything else (i.e. $SYBASE_OCS) set. Now
> this is great and exactly what I wanted, however not what I expected, after
> this didn't work on Linux (had to add ../sybase/OCS to ld.so.conf).

On Solaris this is normal - the path to the libraries is written to the
binary because either the LD_RUN_PATH env. variable is set at compile
time or because the -R link option is used (I don't have a Solaris box
to test with right now, but I'm pretty sure that that's what is going
on.)

However that will stop working if you move things to a different box
where the path to the libraries is different (though you can of course
set up soft-links to get things to work again.)

Michael


> > For some reason it thinks that $ENV{SYBASE} includes the OCS bit.
> > 
> > What does the appropriate lines in CTlib.pm say?
> > And are you *positive* that $SYBASE isn't set in the shell?
> > 
> > Michael
> > -- 
> > Michael Peppler                              Data Migrations, Inc.
> > mpeppler@peppler.org                       http://www.peppler.org/
> > Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
> > long term contract positions - http://www.peppler.org/resume.html
> > 
> > On Sat, 2004-11-20 at 02:20, Christian Behrens wrote:
> > > Hi all,
> > > 
> > > I have just successfully built Perl 5.8.5 and SybPerl 2.17_3 on Solaris
> > 2.8,
> > > with the following value for $SYBASE embedded into SybPerl:
> > > /usr/global/opt/sybase
> > > 
> > > This is a link to /usr/global/opt/sybase1252, which is ASE 12.5.2 and
> > comes
> > > with Connectivity 12.5.1.
> > > 
> > > However, without having $SYBASE or $SYBASE_OCS set, when I run a little
> > test
> > > script it gives me this:
> > > 
> > > Your sybase home directory is /usr/global/opt/sybase/OCS-12_5. Check the
> > > environment variable SYBASE if it is not the one you want!
> > > Cannot access file /usr/global/opt/sybase/OCS-12_5/config/objectid.dat
> > > 
> > > Why is it looking in OCS-12_5? Where does that come from?
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org                       http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
long term contract positions - http://www.peppler.org/resume.html