I am facing a weird but a sensible issue, I have 2 ORACLE_HOMEs, 1st one points to ORACLE Database Software and 2nd one points to ORACLE Client Software.
Why I am forced to do this - reason is: In my system Pro *c is getting compiled from ORACLE Database ORACLE_HOME however Pro *Cobol is getting compiled from ORACLE Client ORACLE_HOME.
To compile Pro *Cobol:
echo $LD_LIBRARY_PATH
/u01/app/oracle/product/11.2.0/client/lib:/opt/FJSVcbl64/lib:/opt/FJSVXbsrt/lib:/opt/FJSVXmeft/lib:/opt/FJSVcbl/COBOL/lib:/opt/FJSVcbl/COBOLRT/lib
To compile Pro *C
echo $LD_LIBRARY_PATH
/u01/app/oracle/product/11.2.0/db_1/lib:/opt/FJSVcbl64/lib:/opt/FJSVXbsrt/lib:/opt/FJSVXmeft/lib:/opt/FJSVcbl/COBOL/lib:/opt/FJSVcbl/COBOLRT/lib
If I put both the path i.e. /u01/app/oracle/product/11.2.0/db_1/lib and /u01/app/oracle/product/11.2.0/client/lib in 1 LD_LIBRARY_PATH, only whichever comes first is getting successful.
Is there any way to fix this issue?
For a temporary fix, I have created 2 small script with different LD_LIBRARY_PATH in each file; so I call this script before I compile Pr *C or Pro *Cobol.
I just don't want to call any script and only 1 LD _LIBRARY_PATH must be able to fix it.
Let me know.
Thanks!
LD_LIBRARY_PATH
is normally used to lookup libraries, and yes, if a library is found in the first path ofLD_LIBRARY_PATH
, that one is used. So if you have different environments that search for the same library but with different properties, you have to specify differentLD_LIBRARY_PATH
variables. But at the moment the actual problem is not very clear...