I have an issue that requires me to set the LD_LIBRARY_PATH environment variable when running Apache (2.2) unfortunately that breaks a perfectly functioning module. I'm looking for a way to fix it and wondered if the module that I compiled myself could be recompiled and linked with the use of rpath.
Story so far: I'm on Solaris and I've compiled Apache and enabled dynamic shared objects. Then I compiled a module called auth_gss using apxs and loaded it into Apache, everything works beautifully.
Then I compiled PHP and loaded that and that's great too, however the last piece of the puzzle is the Oracle OCI8 extension in PHP. This compiles fine, but complains when loaded that it can't find the required libraries, no problem, Oracle says you have to set LD_LIBRARY_PATH to the Oracle Instant Client home. I set that and restart apache and the OCI module is working, but the auth_gss module breaks now.
I'm assuming that it's picking up a library from the LD_LIBRARY_PATH that it shouldn't be and I want to know if there's a way that I can compile the auth_gss module so that it doesn't look to the LD_LIBRARY_PATH.
Hence my question, if when I link my auth_gss module I specify -Wl,-rpath=/usr/local/lib (where all its dependancies live) will it actually go looking for them in the LD_LIBRARY_PATH? From what I've read I think on Solaris it was always use that variable, in which case, how can I resolve the issue?
Or am I just being really stupid, will specifying all the library paths in order in the LD_LIBRARY_PATH variable just fix it?
Any help would be greatly appreciated.
If you're interested in running the Oracle Solaris 11.3 beta release, you can get a fixed-up Instant Client in IPS form. And by 'fixed-up' I mean that you don't need to set LD_LIBRARY_PATH before running it.
https://blogs.oracle.com/jmcp/entry/oracle_instant_client_now_available