As I remarked to Uri about my LD_LIBRARY_PATH problem, the real solution is that Oracle.so needs to get built properly. Today I discovered how to do that (shortly after remarking to Uri, in fact
The good news is I don't have to do any re-execing. As I got this working I feared that I would still have a mess because the environment on this box naturally sets LD_LIBRARY_PATH to what I do not want it to be (and in case you are unaware, YOU SHOULD NOT DO THAT! ) and I thought that would override it even if the correct library directory was compiled into Oracle.so. But it doesn't seem to. ldd finds the right library in the right directory, and a simple DBI script now works perfectly with no monkeying around with that awful variable.
So, here are the steps:
This seems to cover it all (Score:2)
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Instant client (Score:2)
Another observation: use Oracle's instant client, and put it in a directory that doesn't look anything like the lib/lib32 confusion, and you'll also get around this much easier. Unfortunately, instant client appears to require setting LD_LIBRARY_PATH.
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re:Instant client (Score:2)
In order to compile Oracle.so such that LD_LIBRARY_PATH is not required, rerun the gcc line that created Oracle.so and add "-lnnz10" to the end. Oracle created libclntsh.so such that it requires LD_LIBRARY_PATH in order to find libnnz10. Adding this option tells the linker to go ahead and link libnnz10 directly into Oracle.so, which enables the runtime linker to find it without LD_LIBRARY_PATH telling it where to look.
Sigh...
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers