[R-SIG-Mac] R.app doesn't respect DYLD_FALLBACK_LIBRARY_PATH

Tom Schoenemann toms at indiana.edu
Fri Aug 9 23:40:04 CEST 2013


You may not have read the whole thread.  

On Aug 8, 2013, at 5:18 PM, Tom Schoenemann <toms at indiana.edu> wrote:


> My .Renviron looks like this:
> 
> DYLD_FALLBACK_LIBRARY_PATH=/Library/Frameworks/R.framework/Resources/lib
> 
> When I restart R.app, it does seem to have this set:
> 
> > Sys.getenv()
>                                     DYLD_FALLBACK_LIBRARY_PATH 
>                "/Library/Frameworks/R.framework/Resources/lib"  
> 
> However, the package that needs to know this is still complaining that it can't find the dynamic libraries it needs.  

The reason seems to be:

On Aug 9, 2013, at 3:10 AM, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:

> It is not 'R.app doesn't respect DYLD_FALLBACK_LIBRARY_PATH': R.app knows nothing about it.  Rather, it is dyld which I would expect to read its environment variables only when the process is launched (and as Steve Lianoglou has pointed out, which plists are read before dyld is initialized for a process has changed over time).


Regarding why this package requires DYLD_FALLBACK_LIBRARY_PATH to be set to work via GUI is something that I don't understand myself, but will certainly pass on your comments to the package maintainers.

Regarding the dangers some of you see of using DYLD_FALLBACK_LIBRARY_PATH in this way, can anyone elaborate in a way that a package user like myself can appreciate?  How exactly could it wreck my system? Given that this package is extremely useful to my research, I'm willing to chance it if it only means odd messages in the terminal. If my disk gets wiped, I might be more concerned.

Thanks for any help you can provide to enlighten me more (this has been very enlightening so far).

-Tom

On Aug 9, 2013, at 5:12 PM, Simon Urbanek <simon.urbanek at r-project.org> wrote:

> Sorry for coming in late - I was traveling - otherwise I'd hope to stop this madness earlier :)
> 
> Any reason why R for Mac FAQ 12.18 (and the proposed solutions) would not apply here?
> 
> I also agree that DYLD_FALLBACK_LIBRARY_PATH should not be messed with and that the proper solution is to fix the libtk*dylib which has bad ID and thus gets linked incorrectly (missing path).
> 
> Cheers,
> Simon
> 
> 
> On Aug 8, 2013, at 4:42 PM, Tom Schoenemann wrote:
> 
>> Hello,
>> 
>> I am trying to get a custom R package (from another group) to run on my system. If I call it from the command line r, it works fine.  If I call it from R.app, it complains with:
>> 
>> Error in dyn.load(file, DLLpath = DLLpath, ...) : 
>> unable to load shared object '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/ANTsR/libs/libRantsRegistration.so':
>> dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/ANTsR/libs/libRantsRegistration.so, 6): Library not loaded: libitkdouble-conversion-4.5.1.dylib
>> Referenced from: /Applications/image-processing/ANTsR/src/ANTS/ANTS-build/lib/libl_antsRegistration.dylib
>> Reason: image not found
>> Error: package or namespace load failed for ‘ANTsR’
>> 
>> (ANTsR is the package I'm trying to get working)
>> 
>> I CAN get it to work by doing this on the command line first:
>> 
>> export DYLD_FALLBACK_LIBRARY_PATH=/Library/Frameworks/R.framework/Resources/lib
>> 
>> and then also opening the R.app from the command line:
>> 
>> open /Applications/R.app/
>> 
>> However, I can't seem to get R.app to know about 
>> export DYLD_FALLBACK_LIBRARY_PATH=/Library/Frameworks/R.framework/Resources/lib
>> unless I do it this way. 
>> 
>> So my questions are:
>> 
>> 1) how can I get R.app to know about the DYLD_FALLBACK_LIBRARY_PATH?  I tried putting it into my .Renviron file, but it doesn't work  (maybe the syntax is supposed to be different?)
>> 
>> 2) why does r on the command line know about dynamic libraries, but R.app does not?? This seems like a bug, but maybe there is a good reason for it?
>> 
>> Thanks for any suggestions,
>> 
>> -Tom
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>> 
>> 
> 



More information about the R-SIG-Mac mailing list