[R-SIG-Mac] Installing Rattle and RGtk2 packages...

David Daniel ddaniel at nmsu.edu
Thu Jan 31 06:25:41 CET 2008


I'm having trouble installing Rattle.  I am currently running OS X,  
version 10.5.1 on a Core 2 Duo MacBook Pro.  I have R version 2.6.1  
(2007-11-26) installed.

I have spent several days (some last June, and a couple recently)  
trying to look at information on the net and attempting to implement  
the suggestions to get package rattle working.  I have tried several  
times to implement the instructions on www.togaware.com, which I  
summarize to be as follows:

(Apple X11 is up and running, as is R)

A. Install the GTK+ libraries:
       $ sudo port install gtk2
       $ sudo port install libglade2

       (In separate attempts, I have also tried downloading and  
running the gtk2
       installer provided by:
           http://r.research.att.com/gtk2-runtime.dmg )

B. Install RGtk2 - I have tried each of the following two methods:

       1.  R: > install.packages("RGtk2")

       2.  Download the source package from: http://www.ggobi.org/rgtk2/RGtk2_2.8.6.tar.gz
           and run the command line install:
             $ R CMD INSTALL RGtk2_2.8.6.tar.gz

C. Install Rattle and R package dependencies:
        R: > install.packages("rattle", dependencies=TRUE)

D. Start R; load RGtk2 and Rattle; and run Rattle - all within an X11  
terminal:
        $ R
        R: > library(RGtk2)
        R: > library(rattle)
        R: > rattle()

Everything appears to go well until the last line which returns:
    Error in rattle() : could not find function "gladeXMLNew"

I have read the note on the togaware web page indicating that this may  
result if the Glade libraries are not in place before RGtk is built.   
I thought that perhaps alternative method #2 under step B (above)  
would resolve this issue, and indeed, the install process shows that  
it looks for and finds the Glade at the beginning of the process, but  
then it encounters errors in the compile process - a very abbreviated  
output of the output is listed below.

Am I overlooking something in the instructions?  Is there a resource I  
am missing?  Does anyone have any suggestions for getting this up and  
running without having to go through and manually track down and edit  
where files are supposed to be located?  ...I'm not at all confident  
that this would be successful anyway.  Advice is greatly appreciated.

Thanks,
-David


Truncated compile error output from Step B2 follows:
------
gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx- 
version-min=10.4 -std=gnu99 -no-cpp-precomp -I/Library/Frameworks/ 
R.framework/Resources/include -I/Library/Frameworks/R.framework/ 
Resources/include/i386  -msse3   -g -D_R_=1 -DUSE_R=1 -DXTHREADS -I/ 
opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/ 
local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/ 
pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/ 
include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/ 
local/include/libpng12 -I/usr/X11/include   -DXTHREADS -I/opt/local/ 
include/libglade-2.0 -I/opt/local/include/gtk-2.0 -I/opt/local/include/ 
libxml2 -I/opt/local/include -I/opt/local/lib/gtk-2.0/include -I/opt/ 
local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/ 
pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/ 
include -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 - 
I/usr/X11/include    -I/Library/Frameworks/R.framework/Resources/ 
include  -DHAVE_LIBGLADE -fPIC  -g -O2 -march=nocona -c  
RGtkDataFrame.c -o RGtkDataFrame.o
In file included from RGtkDataFrame.h:1,
                  from RGtkDataFrame.c:1:
RGtk2.h:14:21: error: gdk/gdk.h: No such file or directory
RGtk2.h:15:35: error: gdk-pixbuf/gdk-pixbuf.h: No such file or directory
RGtk2.h:16:21: error: gtk/gtk.h: No such file or directory
In file included from /opt/local/include/libglade-2.0/glade/glade.h:28,
                  from RGtk2.h:26,
                  from RGtkDataFrame.h:1,
                  from RGtkDataFrame.c:1:



----------------------------------
David Daniel
Associate Professor
University Statistics Center
New Mexico State University

ddaniel at nmsu.edu



More information about the R-SIG-Mac mailing list