#38626: oracle-instantclient: set rpath instead of advising users to set DYLD_LIBRARY_PATH -----------------------------------+-------------------------- Reporter: dluke@… | Owner: ryandesign@… Type: enhancement | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: oracle-instantclient | -----------------------------------+-------------------------- Comment (by dluke@…): Replying to [comment:1 ryandesign@…]:
But setting DYLD_LIBRARY_PATH is what Oracle says to do, and I would have hoped that a large software company like Oracle would have already tried all possible workarounds for this requirement, and if they say it must be done, then it must be done.
You are assuming more competence there than you should. Oracle recommends setting a path like that on every platform (LD_LIBRARY_PATH usually) and on the linux and solaris systems I've worked with it has never actually been necessary. I think perhaps their internal build setup is broken enough that they can't do this the right way and/or they just don't care enough about doing it the right way since they can tell everyone to set a linker search path instead.
I was looking into this today. I did not get it to work yet. For example, trying to use a php-oracle function without setting DYLD_LIBRARY_PATH results in:
{{{ $ php55 -r 'oci_connect("username", "password");' Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that DYLD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries in Command line code on line 1
Warning: oci_connect(): Error while trying to retrieve text for error ORA-01804 in Command line code on line 1 }}}
that's what it looks like if no rpath is set and DYLD_LIBRARY_PATH isn't set for me too (or very similar).
Setting `DYLD_LIBRARY_PATH=/opt/local/lib/oracle` first, as `port notes oracle-instantclient` currently says to do, works around the problem.
I tried the attached patch to oracle-instantclient, and it did not change the situation. Am I doing it wrong? As I said on the mailing list, I'm not familiar with this "rpath" concept.
I can try the patch, but if you have output from the build log on what command is actually run, that might be easier. on my non-macports install that I tested with, the command that I ran to fix it was (from /usr/local/instantcleint_11_2): {{{ install_name_tool -add_rpath /usr/local/instantclient_11_2/ libclntsh.dylib.11.1 }}} -- Ticket URL: <https://trac.macports.org/ticket/38626#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X