[Rd] R's DYLD_LIBRARY_PATH override problems on Mac OS X

Jan de Leeuw deleeuw at stat.ucla.edu
Mon May 26 08:41:10 MEST 2003

I don't think  there is a reason to set  DYLD_LIBRARY_PATH in bin/R.  
Not even fink sets this variable.

--- Jan

On Monday, May 26, 2003, at 04:25 US/Pacific, Simon Urbanek wrote:

> In Mac OS X native version: The R shell wrapper (bin/R) overrides  
> default library search path with DYLD_LIBRARY_PATH and adds (among  
> others) /usr/X11R6/lib. This causes problems when modules need  
> (directly or indirectly) libraries from Apple's frameworks which are  
> masked by X11. Examples for such packages are SJava and RGL. SJava  
> needs JavaVM which in turn loads OpenGL framework. RGL needs the  
> OpenGL framework directly. The problem is that specifying  
> /usr/X11R6/lib in DYLD_LIBRARY_PATH forces the libGL to be loaded from  
> the X11 directory instead of the OpenGL framework library. This  
> crashes R due to missing symbols, since the modules must link to the  
> OpenGL framework. In fact the OpenGL framework libraries load the X11  
> libraries internally (but not vice versa) - that's why the default  
> load path is frameworks first then X11.
> Currently a workaround is to remove /usr/X11R6/lib in R from the  
> environment variable prior to loading those packages, but more general  
> solution would be better imho. Is the /usr/X11R6/lib really necessary  
> in the DYLD_LIBRARY_PATH for some older OS X versions? At least for OS  
> X 10.2 with Apple's X11 it is not necessary since X11 is already in  
> the default load path.
> Btw: the situation didn't crash R in OS X 10.1 (you could load libGL  
> from X11 instead of the framework). To analyze the situation: by  
> setting DYLD_PRINT_LIBRARIES=1 you can see exactly the sequence of  
> loaded libraries and their locations.
>  Cheers,
>  Simon
> 	  _
>  platform powerpc-apple-darwin6.6
>  arch powerpc
>  os darwin6.6
>  system powerpc, darwin6.6
>  status Patched
>  major 1
>  minor 7.0
>  year 2003
>  month 05
>  day 15
>  language R
> ---
> Simon Urbanek
> Department of computer oriented statistics and data analysis
> University of Augsburg
> Universitätsstr. 14
> 86135 Augsburg
> Germany
> Tel: +49-821-598-2236
> Fax: +49-821-598-2280
> Simon.Urbanek at Math.Uni-Augsburg.de
> http://simon.urbanek.info
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw at stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
           No matter where you go, there you are. --- Buckaroo Banzai

More information about the R-devel mailing list