On Mar 27, 2013, at 9:40 AM, Daniel J. Luke <[email protected]> wrote: > On Mar 26, 2013, at 10:02 PM, Ryan Schmidt <[email protected]> wrote: >> On Mar 26, 2013, at 20:55, "Daniel J. Luke" <[email protected]> wrote: >>> On Mar 26, 2013, at 8:28 PM, [email protected] wrote: >>>> >>>> + # Oracle builds the libraries with strange install_names, which we >>>> fix, for >>>> + # neatness. Unfortunately users must still set DYLD_LIBRARY_PATH in >>>> their >>>> + # environment because one of the libraries, libociei, is dynamically >>>> loaded >>>> + # at runtime rather than being linked to. >>> >>> can't we just add an rpath to applications that use oracle-instantclient? >>> (it works with sqlplus, at least in my testing). >> >> I'd love to find a better solution but I'm not sure what you mean. > > On the binary that would need DYLD_LIBRARY_PATH set in order to run, you can > run install_name_tool -add_rpath /path/to/oracle/libs binary instead and it > will be able to find them when it tries to load them at runtime. > > I've only tested this on the sqlplus command line oracle client (from > instantclient-sqlplus-macos.x64-11.2.0.3.0.zip), but it seems to work ok. > > If the dependent library is always loaded from one of the other libs, setting > rpath there might fix it without having to do it on any binary that is > loading it at runtime (but I haven't investigated to see if that is true). > I'm going to see if I need to set rpath on my local build of DBD::Oracle > today...
setting an rpath on libclntsh.dylib.11.1 (and nothing else) makes sqlplus and DBD::Oracle happy. I imagine it will work for other things as well (and enable use of the libs without setting DYLD_* variable(s)). -- Daniel J. Luke +========================================================+ | *---------------- [email protected] ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+ _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
