[104521] trunk/dports/databases/oracle-instantclient/Portfile

Ryan Schmidt ryandesign at macports.org
Fri Mar 29 21:03:17 PDT 2013


On Mar 28, 2013, at 19:28, Daniel J. Luke wrote:
> On Mar 27, 2013, at 9:47 AM, Daniel J. Luke wrote:
>> On Mar 27, 2013, at 9:40 AM, Daniel J. Luke wrote:
>>> On Mar 26, 2013, at 10:02 PM, Ryan Schmidt wrote:
>>>> On Mar 26, 2013, at 20:55, Daniel J. Luke wrote:
>>>>> On Mar 26, 2013, at 8:28 PM, ryandesign at macports.org 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)).
> 
> Ryan - have you tried this at all on any of the ports you maintain that use oracle-instantclient? I think just adding the rpath to libclntsh.dylib.11.1 should work for most apps that use the oracle libs.

No, I haven't tried it. I also don't use Oracle and don't know if I even know how to reproduce the problem that this would fix, but I haven't tried to do that yet either.




More information about the macports-dev mailing list