[R-SIG-Mac] R/Cocoa and DYLD_LIBRARY_PATH

Byron Ellis bellis at hsph.harvard.edu
Fri Aug 13 21:53:32 CEST 2004


So, I've been playing around with the R/Cocoa that Stefano posted and I 
think I have a reasonable solution to the DYLD_LIBRARY_PATH problem. 
For those playing along with our home game the basic problem is that 
the packages built pre-install are linked against 'libR.dylib' rather 
than a full path, as is the case with post-install packages which are 
linked against the installed framework (so they have a full path). The 
problem is that you cannot set DYLD_LIBRARY_PATH from within your 
program---dyld reads and processes DYLD_LIBRARY_PATH and friends before 
main() executes. While you can set an environment variable in the 
debugger, real users won't be running in the debugger.

To get around this problem in my personal install I went through (by 
hand *sigh*) and used install_name_tool to change libR.dylib to 
/Library/Frameworks/R.framework/Versions/2.0.0/lib/libR.dylib. This 
seems to do the trick and it seems like it would be pretty easy to add 
to the install process.

---
Byron Ellis (bellis at hsph.harvard.edu)
"Oook" -- The Librarian



More information about the R-SIG-Mac mailing list