Re: Is it possible to preset the SYBASE_OCS variable?

Michael Peppler <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
On Wed, 2004-11-03 at 21:06, Christian Behrens wrote:
> I apologize if this has been asked before, but I searched the archive and
> haven't found a real answer.
> 
> Here's the situation:
> 
> I've been asked to look into setting up SybPerl (current release 2.17_3) in
> a way that the Sybase environment doesn't have to be set to run scripts.

> Now, as we use Sybase 12.5, there are no SYBASE/include & SYBASE/lib
> directories, thus I had to set links to OCS/lib and OCS/include,
> respectively.

Actually at run-time you don't need the SYBASE_OCS variable, AFAIK. What
*is* needed is for the run-time linker (ld.so on most systems) to find
the Sybase libraries. This is done either by having LD_LIBRARY_PATH set
correctly, by having correct entries in /etc/ld.so.conf or by making
sure that the full path of the .so files is stored in the binaries (e.g.
using the -R linker option on Solaris).


> Also, the comment about EMBED_SYBASE that "setting the SYBASE environment
> variable will have no effect" doesn't seem to be true (anymore?), as
> CTlib.pm and DBlib.pm have this:
> 
> BEGIN {
>     if(!$ENV{'SYBASE'}) {
>         $ENV{'SYBASE'} = '/usr/global/opt/sybase';
>     }
> }
> 
> That suggests to me that a previously set SYBASE env var would have
> preference, no?

Correct - the documentation is out-of-date.

> I tried to simply extend the above to also set SYBASE_OCS, but the symbolic
> links were still needed in order to find the libraries.

What platform are you on?

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
[email protected]                       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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.