Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-03

System variables visibility

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

John Landmesser

Hi,

i developed an application ( Linux ) that need to know where $ORACLE_HOME points to.

The only way was to start my app with a shell-script, defining:

#! /bin/bash
export ORACLE_HOME=/usr/lib/oracle/....

# run my app
Lazarus_Oracle_app

Had no success defining this variable in bashrc or profile.

But why do i have to define this in my start-script?

Annotation:
perhaps i have to search the sources of ZeosLib, that i'm using because of german Umlauts-problems in OracleConnection

Thanks for tipps!!

Reply by email

Michael Van Canneyt
to John Landmesser
John Landmesser wrote 14 lines
Hi, i developed an application ( Linux ) that need to know where $ORACLE_HOME points to. The only way was to start my app with a shell-script, defining: #! /bin/bash export ORACLE_HOME=/usr/lib/oracle/.... # run my app Lazarus_Oracle_app Had no success defining this variable in bashrc or profile.

That should work. Obviously you need to log in again.

But why do i have to define this in my start-script?

That should not be necessary.
I have similar variables defined for Firebird, in my .login file.

Michael.

Reply by email

zeljko
to John Landmesser: i developed an application ( Linux ) that need to know where $ORACLE_HOME points to. The…
John Landmesser wrote 16 lines
Hi, i developed an application ( Linux ) that need to know where $ORACLE_HOME points to. The only way was to start my app with a shell-script, defining: #! /bin/bash export ORACLE_HOME=/usr/lib/oracle/.... # run my app Lazarus_Oracle_app Had no success defining this variable in bashrc or profile. But why do i have to define this in my start-script?

That's how unix works. Or add it to your start script or add /usr/lib/oracle to the /etc/ld.so.conf, or in modern distros create file in /etc/ld.so.conf.d/myoraclepath and put inside /usr/lib/oracle And all of that is to satisfy LD_LIBRARY_PATH. ORACLE_HOME is oracle only env variable, so maybe you must export it all the time via script or add it to $HOME/.bashrc so it will be always exported after login.

zeljko

Reply by email

John Landmesser
to John Landmesser: i developed an application ( Linux ) that need to know where $ORACLE_HOME points to. The…
John Landmesser wrote 28 lines
Hi, i developed an application ( Linux ) that need to know where $ORACLE_HOME points to. The only way was to start my app with a shell-script, defining: #! /bin/bash export ORACLE_HOME=/usr/lib/oracle/.... # run my app Lazarus_Oracle_app Had no success defining this variable in bashrc or profile. But why do i have to define this in my start-script? Annotation: perhaps i have to search the sources of ZeosLib, that i'm using because of german Umlauts-problems in OracleConnection Thanks for tipps!! -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

i think i found the explanation:

oracle tells me:

Show quoted text 5 lines
3. Set the environment variable LD_LIBRARY_PATH to the appropriate directory for the Instant Client version, for example: export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH

so $ORACLE_HOME is not needed but on modern Linux

LD_LIBRARY_PATH is ALLWAYS empty, even if its declared in bashrc or profile

I didn't tell you that i defined LD_LIBRARY_PATH in my script and LD_LIBRARY_PATH is blanked as i remember and testet just now.

Debian Sid.

Uh thats all really tricky and i'm no geek :-))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160331/7c6e2400/attachment.html>

Reply by email