[R] JGR / linux

Dirk Eddelbuettel edd at debian.org
Tue Jun 3 20:11:58 CEST 2008


On 3 June 2008 at 08:42, g-h-d wrote:
| I basically followed the steps in http://lib.stat.cmu.edu/R/CRAN/, and those
| below for JGR and it worked.
| 
| ...but there are problems with help files e.g. ?matrix generates the
| following message:
| 
| /tmp/RtmpvxsnQa/.R/doc/html/packages.html (No such file or directory)

I think you can ignore that. It's just a warning.  The rest of your steps
were very sound.

In particular ...

| g-h-d wrote:
| > 
| > Hi all,
| > 
| > i'm trying to install JGR on linux (see bottom), but it runs into errors.
| > The bottom of the sequence below shows "JavaJD could not be found"
| > 
| > Any suggestion, please?
| > 
| > 
| > $ sudo apt-get install sun-java6-jdk
| > 
| > $ sudo update-alternatives --config java
| > 
| > There are 5 alternatives which provide `java'.
| > 
| > Selection Alternative
| > -----------------------------------------------
| > 1 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
| > 2 /usr/bin/gij-4.1
| > 3 /usr/bin/gij-4.2
| > 4 /usr/lib/jvm/java-gcj/jre/bin/java
| > + 5 /usr/lib/jvm/java-7-icedtea/jre/bin/java

... a very good idea to realign what command will default to being 'java' ...
 
| > $sudo R CMD javareconf
| > Java interpreter : /usr/bin/java
| > Java version : 1.6.0_03
| > Java home path : /usr/lib/jvm/java-6-sun-1.6.0.03/jre
| > Java compiler : /usr/bin/javac
| > Java headers gen.: /usr/bin/javah
| > Java archive tool: /usr/bin/jar

... but given that javareconf also looks after javac and javah, I recommend
doing the same update-alternatives call for 'javah' and 'javac'.

I just re-did that on a Ubuntu 8.04, 32bit, machine and it re-built rJava,
JGR, JavaGD, ... without a hitch.

Dirk


| > Java library path:
| > $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/lib:/usr/lib
| > JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server
| > -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L
| > -L/usr/java/packages/lib/amd64 -L/lib -L/usr/lib -ljvm
| > JNI cpp flags : -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include
| > -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include/linux
| > 
| > Updating Java configuration in /etc/R
| > Done.
| > 
| > $ sudo R
| > 
| > R version 2.5.1 (2007-06-27)
| > Copyright (C) 2007 The R Foundation for Statistical Computing
| > ISBN 3-900051-07-0
| > 
| > R is free software and comes with ABSOLUTELY NO WARRANTY.
| > You are welcome to redistribute it under certain conditions.
| > Type 'license()' or 'licence()' for distribution details.
| > 
| > Natural language support but running in an English locale
| > 
| > R is a collaborative project with many contributors.
| > Type 'contributors()' for more information and
| > 'citation()' on how to cite R or R packages in publications.
| > 
| > Type 'demo()' for some demos, 'help()' for on-line help, or
| > 'help.start()' for an HTML browser interface to help.
| > Type 'q()' to quit R.
| > 
| >> install.packages('JGR', dep=TRUE)
| > Warning in install.packages("JGR", dep = TRUE) :
| > argument 'lib' is missing: using '/usr/local/lib/R/site-library'
| > --- Please select a CRAN mirror for use in this session ---
| > Loading Tcl/Tk interface ... done
| > also installing the dependency  JavaGD 
| > 
| > trying URL
| > 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/JavaGD_0.5-1.tar.gz'
| > Content type 'application/x-gzip' length 86505 bytes
| > opened URL
| > ==================================================
| > downloaded 84Kb
| > 
| > trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/JGR_1.5-18.tar.gz'
| > Content type 'application/x-gzip' length 426244 bytes
| > opened URL
| > ==================================================
| > downloaded 416Kb
| > 
| > * Installing *source* package 'JavaGD' ...
| > checking for gcc... gcc-4.2 -std=gnu99
| > checking for C compiler default output file name... a.out
| > checking whether the C compiler works... yes
| > checking whether we are cross compiling... no
| > checking for suffix of executables...
| > checking for suffix of object files... o
| > checking whether we are using the GNU C compiler... yes
| > checking whether gcc-4.2 -std=gnu99 accepts -g... yes
| > checking for gcc-4.2 -std=gnu99 option to accept ISO C89... none needed
| > checking how to run the C preprocessor... gcc-4.2 -std=gnu99 -E
| > checking for grep that handles long lines and -e... /bin/grep
| > checking for egrep... /bin/grep -E
| > checking for ANSI C header files... yes
| > checking for sys/wait.h that is POSIX.1 compatible... yes
| > checking for sys/types.h... yes
| > checking for sys/stat.h... yes
| > checking for stdlib.h... yes
| > checking for string.h... yes
| > checking for memory.h... yes
| > checking for strings.h... yes
| > checking for inttypes.h... yes
| > checking for stdint.h... yes
| > checking for unistd.h... yes
| > checking for string.h... (cached) yes
| > checking sys/time.h usability... yes
| > checking sys/time.h presence... yes
| > checking for sys/time.h... yes
| > checking for unistd.h... (cached) yes
| > checking for an ANSI C-conforming const... yes
| > checking whether time.h and sys/time.h may both be included... yes
| > checking for stdlib.h... (cached) yes
| > checking for GNU libc compatible malloc... yes
| > checking return type of signal handlers... void
| > checking for memset... yes
| > checking for mkdir... yes
| > checking for rmdir... yes
| > checking for select... yes
| > checking for socket... yes
| > checking Java support in R... present:
| > interpreter : '/usr/bin/java'
| > cpp flags : '-I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include
| > -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include/linux'
| > java libs : '-L/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/amd64/server
| > -L/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/amd64
| > -L/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../lib/amd64 -L
| > -L/usr/java/packages/lib/amd64 -L/lib -L/usr/lib -ljvm'
| > checking whether JNI programs can be compiled... yes
| > configure: creating ./config.status
| > config.status: creating src/Makevars
| > config.status: creating R/zzz.R
| > config.status: creating src/config.h
| > ** libs
| > gcc-4.2 -std=gnu99 -I/usr/share/R/include -I/usr/share/R/include
| > -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include
| > -I/usr/lib/jvm/java-6-sun-1.6.0.03/jre/../include/linux -Iinclude -fpic -g
| > -O2 -c javaGD.c -o javaGD.o
| > In file included from javaGD.h:12,
| > from javaGD.c:23:
| > /usr/share/R/include/R_ext/GraphicsEngine.h:150: error: expected
| > specifier-qualifier-list before  NewDevDesc 
| > /usr/share/R/include/R_ext/GraphicsEngine.h:224: error: expected  ) 
| > before  *  token
| > /usr/share/R/include/R_ext/GraphicsEngine.h:231: error: expected
| > declaration specifiers or  ...  before  NewDevDesc 
| > javaGD.c: In function  Rf_addJavaGDDevice :
| > javaGD.c:215: warning: implicit declaration of function  GEcreateDevDesc 
| > javaGD.c:215: warning: assignment makes pointer from integer without a
| > cast
| > javaGD.c: In function  reloadJavaGD :
| > javaGD.c:233: error:  GEDevDesc  has no member named  dev 
| > javaGD.c: In function  javaGDobjectCall :
| > javaGD.c:252: error:  GEDevDesc  has no member named  dev 
| > javaGD.c: In function  javaGDresize :
| > javaGD.c:269: error:  GEDevDesc  has no member named  dev 
| > javaGD.c: In function  javaGDgetSize :
| > javaGD.c:307: error:  GEDevDesc  has no member named  dev 
| > make: *** [javaGD.o] Error 1
| > chmod: cannot access `/usr/local/lib/R/site-library/JavaGD/libs/*': No
| > such file or directory
| > ERROR: compilation failed for package 'JavaGD'
| > ** Removing '/usr/local/lib/R/site-library/JavaGD'
| > * Installing *source* package 'JGR' ...
| > ** R
| > ** inst
| > ** help
| >>>> Building/Updating help pages for package 'JGR'
| > Formats: text html latex example
| > jgr.addMenu text html latex example
| > jgr.addMenuItem text html latex example
| > jgr.addMenuSeperator text html latex example
| > supplements text html latex
| > ** building package indices ...
| > * DONE (JGR)
| > 
| > The downloaded packages are in
| > /tmp/RtmpfnAtvi/downloaded_packages
| > Warning message:
| > installation of package 'JavaGD' had non-zero exit status in:
| > install.packages("JGR", dep = TRUE)
| > 
| >>library(JGR)
| > Loading required package: rJava
| > Error: package 'JavaGD' required by 'JGR' could not be found
| > __________________
| > dell dimension E520/intel core duo 2/82G965 Integrated Graphics
| > Controller/82562V 10/100 Network Connection
| > ubuntu 7.10/gnome 2.21.1/eclipse SDK 3.2.2/cdt 3.1.1.20070321/gcc v4.1.3 
| > 
| 
| -- 
| View this message in context: http://www.nabble.com/JGR---linux-tp17622071p17626682.html
| Sent from the R help mailing list archive at Nabble.com.
| 
| ______________________________________________
| R-help at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-help
| PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
| and provide commented, minimal, self-contained, reproducible code.

-- 
Three out of two people have difficulties with fractions.



More information about the R-help mailing list