[R] rgl on Mac OS

Jari Oksanen jarioksa at sun3.oulu.fi
Mon Nov 8 10:38:20 CET 2004

On Sun, 2004-11-07 at 02:54, Saiwing Yeung wrote:

> It seems like a number of people on this list can install rgl but have
> problem loading it. I found myself in the same situation too.
> I have tried the workaround of removing /usr/X11R6/lib from
> DYLD_LIBRARY_PATH, but it doesn't seem to work for me, I am still getting
> the same error (that everyone else seems to get). Can anyone give me some
> ideas on what else to try?
> I have Mac OS 10.3.5, running R2.0. Thanks in advance!
I had a quick look at this issue, and indeed, rgl failed to load in my
system (MacOS X 10.3.6, R 2.0.0) with various error messages. It seems
to me that the binary packages at CRAN were incompatible (g++ is
notorious for version changes incompatibilities). The solution was to 
use source packages and compile locally. For this you need to have a
compiler installed. The compiler comes with MacOS X 10.3.* installation
cd/dvd, but you have to install their "Developer Tools" separately.

One of the early error messages was that libpng was missing. When
installing from source, rgl was configured without png support, and this
message disappeared. However, CRAN binaries failed even after installing
png libraries, but now with other error messages. I got my libpng with
the help of http://www.rna.nl/ii.html (that you need anyway).

It may be that you have to start X11 separately before calling
library(rgl), but this was not necessary in my later attempts. 

Summary: install from source package. Optionally, you may install libpng
as well.

cheers, jari oksanen
Jari Oksanen -- Dept Biology, Univ Oulu, 90014 Oulu, Finland
email jari.oksanen at oulu.fi, homepage http://cc.oulu.fi/~jarioksa/

More information about the R-help mailing list