notes_compil_r

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
notes_compil_r [2008/01/20 09:31] – créée gerardnotes_compil_r [2017/08/25 09:56] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
-====== Version 2.4.1 ======+====== Installation de packages ====== 
 + 
 + 
 + 
 +===== package aplpack ===== 
 +<code> 
 +w2100-henry% ssh devel1@nemo 
 +> echo $PATH 
 +/usr/local/wrapper/bin:/usr/bin 
 +> setenv PATH /opt/csw/gcc3/bin:/opt/csw/bin:${PATH}:/usr/ccs/bin 
 +> /local/apps/R-2.6.1_gcc/bin/R CMD INSTALL  downloads/aplpack_1.1.1.tar.gz 
 +* Installing to library '/local/apps/R-2.6.1_gcc/lib/R/library' 
 +* Installing *source* package 'aplpack' ... 
 +** R 
 +** inst 
 +** preparing package for lazy loading 
 +Loading required package: tcltk 
 +Error in firstlib(which.lib.loc, package) :  
 +  Tcl/Tk support is not available on this system 
 +Error: package 'tcltk' could not be loaded 
 +Execution halted 
 +ERROR: lazy loading failed for package 'aplpack' 
 +** Removing '/local/apps/R-2.6.1_gcc/lib/R/library/aplpack' 
 + 
 +</code> 
 + 
 +===== astuce pour installer un package dans le compte user ===== 
 +il faut créer un répertoire tel qu'indiqué dans la doc de R: 
 +<code> 
 +nemo-henry% mkdir -p R/i386-pc-solaris2.10-library/2.6 
 +nemo-henry% pwd 
 +/local/henry 
 +nemo-henry% /local/apps/R-2.6.1_gcc_new/bin/R CMD INSTALL /local/apps/downloads/aplpack_1.1.1.tar.gz 
 +* Installing to library '/local/henry/R/i386-pc-solaris2.10-library/2.6' 
 +* Installing *source* package 'aplpack' ... 
 +** R 
 +** inst 
 +** preparing package for lazy loading 
 +Loading required package: tcltk 
 +Loading Tcl/Tk interface ... done 
 +** help 
 + >>> Building/Updating help pages for package 'aplpack' 
 +     Formats: text html latex example  
 +  aplpack.package                   text    html    latex   example 
 +  bagplot                           text    html    latex   example 
 +  boxplot2D                         text    html    latex   example 
 +  faces                             text    html    latex   example 
 +  spin3R                            text    html    latex   example 
 +  stem.leaf                         text    html    latex   example 
 +** building package indices ... 
 +* DONE (aplpack) 
 +</code> 
 + 
 +====== Notes de compilation ====== 
 + 
 + 
 +===== Version 2.4.1 =====
  
   * [[http://www.latp.univ-mrs.fr/~henry/doku.php?id=problemes_rjava|Problèmes rJava]]   * [[http://www.latp.univ-mrs.fr/~henry/doku.php?id=problemes_rjava|Problèmes rJava]]
  
-====== Version 2.6.1 ======+===== Version 2.6.1 ===== 
 + 
 +==== compilation avec gcc ==== 
 +voir /local/apps/src/gcc/R-2.6.1/ pour les logs de la compilation 
 + 
 +<code> 
 +> ~/R-2.6.1_gcc/bin/R CMD javareconf 
 +Java interpreter : /usr/bin/java 
 +Java version     : 1.6.0_04 
 +Java home path   : /usr/jdk/instances/jdk1.6.0_04/jre 
 +Java compiler    : /usr/bin/javac 
 +Java headers gen.: /usr/bin/javah 
 +Java archive tool: /usr/bin/jar 
 +Java library path: $(JAVA_HOME)/lib/i386/server:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386:.:/usr/jdk/packages/lib/i386:/lib:/usr/lib 
 +JNI linker flags : -L$(JAVA_HOME)/lib/i386/server -L$(JAVA_HOME)/lib/i386 -L$(JAVA_HOME)/../lib/i386 -L. -L/usr/jdk/packages/lib/i386 -L/lib -L/usr/lib -ljvm 
 +JNI cpp flags    : -I/usr/jdk/instances/jdk1.6.0_04/jre/../include -I/usr/jdk/instances/jdk1.6.0_04/jre/../include/solaris 
 + 
 +Updating Java configuration in /local/apps/R-2.6.1_gcc/lib/
 +Done. 
 + 
 +</code> 
 +On utilise le gcc de blastwave, mais le f95 de SunStudio12: 
 +<code> 
 +> setenv PATH /opt/csw/gcc3/bin:${PATH}:/opt/studio12/SUNWspro/bin 
 +</code> 
 +puis on installe JGR: 
 +<code> 
 +> /local/apps/R-2.6.1_gcc/bin/R  
 +</code> 
 + 
 +==== compilation sunstudio12 32 bits ====
 Le script pour compiler Le script pour compiler
 <code> <code>
Ligne 31: Ligne 117:
 echo "make install"; make install echo "make install"; make install
 if [ $? -ne 0 ];then echo "make install failed"; exit; fi if [ $? -ne 0 ];then echo "make install failed"; exit; fi
 +
 +</code>
 +
 +
 +
 +<code>
 +/local/apps/lib/lib/R/library
 +* Installing *source* package 'rJava' ...
 +checking for gcc... cc
 +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... no
 +checking whether cc accepts -g... yes
 +checking for cc option to accept ISO C89... none needed
 +checking how to run the C preprocessor... cc -E
 +checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
 +checking for egrep... /usr/xpg4/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
 +configure: checking whether cc supports static inline...
 +yes
 +checking Java support in R... present:
 +interpreter : '/usr/bin/java'
 +archiver    : '/usr/bin/jar'
 +compiler    : '/usr/bin/javac'
 +header prep.: '/usr/bin/javah'
 +cpp flags   : '-I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris'
 +java libs   : '-L/usr/jdk/instances/jdk1.5.0/jre/lib/i386/server -L/usr/jdk/instances/jdk1.5.0/jre/lib/i386 -L/usr/jdk/instances/jdk1.5.0/jre/../lib/i386 -L/opt/csw/lib -L/usr/lib -ljvm'
 +checking whether JNI programs can be compiled... yes
 +checking JNI data types... ok
 +checking whether JRI should be compiled (autodetect)... yes
 +checking whether debugging output should be enabled... no
 +checking whether memory profiling is desired... no
 +checking whether threads support is requested... no
 +checking whether callbacks support is requested... no
 +checking whether JNI cache support is requested... no
 +checking whether JRI is requested... yes
 +configure: creating ./config.status
 +config.status: creating src/Makevars
 +config.status: creating R/zzz.R
 +config.status: creating src/config.h
 +=== configuring in jri (/tmp/R.INSTALL.q3ayQx/rJava/jri)
 +configure: running /bin/bash ./configure '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
 +checking build system type... i386-pc-solaris2.10
 +checking host system type... i386-pc-solaris2.10
 +checking for gcc... cc
 +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... no
 +checking whether cc accepts -g... yes
 +checking for cc option to accept ISO C89... none needed
 +checking how to run the C preprocessor... cc -E
 +checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
 +checking for egrep... /usr/xpg4/bin/grep -E
 +checking for ANSI C header files... yes
 +checking whether Java interpreter works... checking whether JNI programs can be compiled... yes
 +checking whether JNI programs can be run... yes
 +checking JNI data types... ok
 +checking whether Rinterface.h exports R_CStackXXX variables... yes
 +checking whether Rinterface.h exports R_SignalHandlers... yes
 +configure: creating ./config.status
 +config.status: creating src/Makefile
 +config.status: creating Makefile
 +config.status: creating run
 +config.status: creating src/config.h
 +** libs
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c Rglue.c -o Rglue.o
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c arrayc.c -o arrayc.o
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c callJNI.c -o callJNI.o
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c callback.c -o callback.o
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c fields.c -o fields.o
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c init.c -o init.o
 +"init.c", line 106: warning: assignment type mismatch:
 +        pointer to void "=" pointer to function(pointer to struct __FILE {int _cnt, pointer to unsigned char _ptr, pointer to unsigned char _base, unsigned char _flag, unsigned char _file, unsigned int __orientation :2, unsigned int __ionolock :1, unsigned int __seekable :1, unsigned int __extendedfd :1, unsigned int __xf_nocheck :1, unsigned int __filler :10}, pointer to const char, pointer to void) returning int
 +"init.c", line 110: warning: assignment type mismatch:
 +        pointer to void "=" pointer to function(int) returning void
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c jri_glue.c -o jri_glue.o
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c loader.c -o loader.o
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c rJava.c -o rJava.o
 +cc -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include  -I/opt/csw/include   -I. -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -KPIC  -g -c tools.c -o tools.o
 +cc -G -R/opt/csw/lib -L/opt/csw/lib -o rJava.so Rglue.o arrayc.o callJNI.o callback.o fields.o init.o jri_glue.o loader.o rJava.o tools.o -L/usr/jdk/instances/jdk1.5.0/jre/lib/i386/server -L/usr/jdk/instances/jdk1.5.0/jre/lib/i386 -L/usr/jdk/instances/jdk1.5.0/jre/../lib/i386 -L/opt/csw/lib -L/usr/lib -ljvm  -L/local/apps/lib/lib/R/lib -lR
 +make -C ../jri/
 +make[1]: Entering directory `/tmp/R.INSTALL.q3ayQx/rJava/jri'
 +make -C src JRI.jar
 +make[2]: Entering directory `/tmp/R.INSTALL.q3ayQx/rJava/jri/src'
 +/usr/bin/javac -target 1.4 -source 1.4 -d . ../Mutex.java ../RBool.java ../RConsoleOutputStream.java ../REXP.java ../RFactor.java ../RList.java ../RMainLoopCallbacks.java ../RVector.java ../Rengine.java
 +/usr/bin/javah -d . -classpath . org.rosuda.JRI.Rengine
 +cc -c -o Rengine.o Rengine.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -g  -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris  -KPIC -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include
 +cc -c -o jri.o jri.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -g  -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris  -KPIC -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include
 +cc -c -o Rcallbacks.o Rcallbacks.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -g  -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris  -KPIC -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include
 +cc -c -o Rinit.o Rinit.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -g  -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris  -KPIC -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include -I/local/apps/lib/lib/R/include
 +cc -c -o globals.o globals.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -g  -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris  -KPIC -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris
 +cc -c -o rjava.o rjava.c -g -Iinclude  -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -g  -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris  -KPIC -I/usr/jdk/instances/jdk1.5.0/jre/../include -I/usr/jdk/instances/jdk1.5.0/jre/../include/solaris
 +cc -o libjri.so Rengine.o jri.o Rcallbacks.o Rinit.o globals.o rjava.o  -G -L/usr/jdk/instances/jdk1.5.0/jre/lib/i386/server -L/usr/jdk/instances/jdk1.5.0/jre/lib/i386 -L/usr/jdk/instances/jdk1.5.0/jre/../lib/i386 -L/opt/csw/lib -L/usr/lib -ljvm -L/local/apps/lib/lib/R/lib -lR
 +/usr/bin/javac -target 1.4 -source 1.4 -d . ../Mutex.java ../RBool.java ../RConsoleOutputStream.java ../REXP.java ../RFactor.java ../RList.java ../RMainLoopCallbacks.java ../RVector.java ../Rengine.java
 +/usr/bin/jar fc JRI.jar org libjri.so
 +make[2]: Leaving directory `/tmp/R.INSTALL.q3ayQx/rJava/jri/src'
 +rm -f libjri.so
 +cp src/libjri.so libjri.so
 +/usr/bin/javac -target 1.4 -source 1.4 -classpath src/JRI.jar -d examples examples/rtest.java
 +Note: examples/rtest.java uses or overrides a deprecated API.
 +Note: Recompile with -Xlint:deprecation for details.
 +/usr/bin/javac -target 1.4 -source 1.4 -classpath src/JRI.jar -d examples examples/rtest2.java
 +Note: examples/rtest2.java uses or overrides a deprecated API.
 +Note: Recompile with -Xlint:deprecation for details.
 +make[1]: Leaving directory `/tmp/R.INSTALL.q3ayQx/rJava/jri'
 +** R
 +** inst
 +** preparing package for lazy loading
 +** help
 + >>> Building/Updating help pages for package 'rJava'
 +     Formats: text html latex example 
 +  accessOp                          text    html    latex   example
 +  jarray                            text    html    latex   example
 +  jarrayRef-class                   text    html    latex
 +  jcall                             text    html    latex   example
 +  jcast                             text    html    latex   example
 +  jcastToArray                      text    html    latex   example
 +  jcheck                            text    html    latex   example
 +  jengine                           text    html    latex   example
 +  jequals                           text    html    latex   example
 +  jfield                            text    html    latex   example
 +  jfloat-class                      text    html    latex
 +  jfloat                            text    html    latex
 +  jinit                             text    html    latex   example
 +  jmemprof                          text    html    latex   example
 +  jnew                              text    html    latex   example
 +  jnull                             text    html    latex   example
 +  jobjRef-class                     text    html    latex
 +  jpackage                          text    html    latex   example
 +  jreflection                       text    html    latex   example
 +  jsimplify                         text    html    latex   example
 +  loader                            text    html    latex   example
 +  show                              text    html    latex
 +** building package indices ...
 +* DONE (rJava)
 +
 +The downloaded packages are in
 +        /tmp/Rtmp2l3U0E/downloaded_packages
 +Updating HTML index of packages in '.Library'
  
 </code> </code>
 Le check échoue!? Le check échoue!?
 Pour lancer, voir le script /bin/R26 Pour lancer, voir le script /bin/R26
 +
 +
 +==== Hacks ====
 +dans /local/apps/lib/lib/R/bin/javareconf, on remplace /bin/sh par /bin/bash
 +\\
 +dans /local/apps/lib/bin/R, on remplace /bin/sh par /bin/bash (est ce nécessaire?)
 +
 +===== R 2.7.1 avec studio 12 =====
 +voir le répertoire /local/apps/src/R-2.7.1
 +
 +<code>
 +setenv PATH /usr/local/wrapper/bin:/opt/studio12/SUNWspro/bin:/usr/xpg4/bin:/opt/SUNWhpc/bin:/usr/bin:/usr/ccs/bin:/opt/csw/bin:/usr/sfw/bin
 +</code>
 +et le fichier do_work32.sh
 +\\
 +les tests échouent, mais on peut faire l'install, et l'utiliser. Pour tester, on installe le package aplpack, et ça passe.
 +
 +===== Problèmes =====
 +
 +==== avec JGR et Studio12 ====
 +[[http://stats.math.uni-augsburg.de/JGR/linux.shtml|JGR]]
 +
 +<code>
 +> library(JGR)
 +Loading required package: rJava
 +Loading required package: JavaGD
 +Loading required package: iplots
 +Java Accessibility Bridge for GNOME loaded.
 +
 +
 +Please use the corresponding JGR launcher to start JGR.
 +Run JGR() for details. You can also use JGR(update=TRUE) to update JGR.
 +
 +> JGR()
 +Starting JGR ...
 +(You can use /local/apps/lib/lib/R/library/JGR/scripts/run to start JGR directly)
 +> Exception in thread "main" java.lang.NoClassDefFoundError: org/rosuda/JRI/RMainLoopCallbacks
 +        at java.lang.ClassLoader.defineClass1(Native Method)
 +        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 +        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 +        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 +        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
 +        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 +        at java.security.AccessController.doPrivileged(Native Method)
 +        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 +        at RJavaClassLoader.findClass(RJavaClassLoader.java:137)
 +        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 +        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 +        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 +        at java.lang.Class.getDeclaredMethods0(Native Method)
 +        at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
 +        at java.lang.Class.getMethod0(Class.java:2642)
 +        at java.lang.Class.getMethod(Class.java:1579)
 +        at RJavaClassLoader.bootClass(RJavaClassLoader.java:289)
 +        at RJavaClassLoader.main(RJavaClassLoader.java:326)
 +
 +</code>
 +pourtant, il est installé:
 +<code>
 +> find  /local/apps/lib/ -name "JRI*"
 +/local/apps/lib/lib/R/library/rJava/jri/JRI.jar
 +</code>
 +
 +Après avoir hacké le script de lancement (voir [[hacks]]), il y a un problème au lancement:
 +<code>
 +> bash /local/apps/lib/lib/R/library/JGR/scripts/run
 +Java Accessibility Bridge for GNOME loaded.
 +
 +Cannot find JRI native library!
 +
 +java.lang.UnsatisfiedLinkError: /local/apps/lib/lib/R/library/rJava/jri/libjri.so: Can't load IA 32-bit .so on a IA 32-bit platform
 +        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
 +        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
 +        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1660)
 +        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
 +        at java.lang.System.loadLibrary(System.java:993)
 +        at org.rosuda.JGR.JGR.<init>(JGR.java:173)
 +        at org.rosuda.JGR.JGR.main(JGR.java:514)
 +        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 +        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 +        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 +        at java.lang.reflect.Method.invoke(Method.java:585)
 +        at RJavaClassLoader.bootClass(RJavaClassLoader.java:290)
 +        at RJavaClassLoader.main(RJavaClassLoader.java:326)
 +
 +et pourtant, la lib est bien présente!
 +</code>
 +voir [[http://forum.java.sun.com/thread.jspa?threadID=792436|Can't load IA 32-bit .so on a IA 32-bit platform]]
 +
 +
 +
 +
 +
 +==== JGR et Java ====
 +Ne marche pas avec java 1.5 livré avec l'os:
 +<code>
 +nemo-root% ls -l /usr/java
 +lrwxrwxrwx   1 root     other         15 Jan 20 11:12 /usr/java -> jdk/jdk1.5.0_13
 +
 +</code>
 +On installe la version 1.6 et on teste:
 +<code>
 +nemo-root% ls -l
 +total 12
 +drwxr-xr-x   4 root     bin          512 Jan 21 17:05 instances
 +lrwxrwxrwx   1 root     other          7 Jan  4  2007 j2sdk1.4.2_12 -> ../j2se
 +lrwxrwxrwx   1 root     other         18 Jan 20 11:12 jdk1.5.0_13 -> instances/jdk1.5.0
 +lrwxrwxrwx   1 root     root          21 Jan 21 17:05 jdk1.6.0_04 -> instances/jdk1.6.0_04
 +nemo-root% cd /usr
 +/usr
 +nemo-root% rm java
 +rm: remove java (yes/no)? y
 +nemo-root% ln -s jdk/jdk1.6.0_04/ java
 +nemo-root% ls -l java
 +lrwxrwxrwx   1 root     root          16 Jan 21 17:08 java -> jdk/jdk1.6.0_04/
 +>  /local/apps/lib/bin/R CMD javareconf
 +Java interpreter : /usr/bin/java
 +Java version     : 1.6.0_04
 +Java home path   : /usr/jdk/instances/jdk1.6.0_04/jre
 +Java compiler    : /usr/bin/javac
 +Java headers gen.: /usr/bin/javah
 +Java archive tool: /usr/bin/jar
 +Java library path: $(JAVA_HOME)/lib/i386/server:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386:.:/usr/jdk/packages/lib/i386:/lib:/usr/lib
 +JNI linker flags : -L$(JAVA_HOME)/lib/i386/server -L$(JAVA_HOME)/lib/i386 -L$(JAVA_HOME)/../lib/i386 -L. -L/usr/jdk/packages/lib/i386 -L/lib -L/usr/lib -ljvm
 +JNI cpp flags    : -I/usr/jdk/instances/jdk1.6.0_04/jre/../include -I/usr/jdk/instances/jdk1.6.0_04/jre/../include/solaris
 +
 +Updating Java configuration in /local/apps/lib/lib/R
 +Done.
 +
 +</code>
 +mais quand on le lance, plante:
 +<code>
 +Starting JGR ...
 +(You can use /local/apps/lib/lib/R/library/JGR/scripts/run to start JGR directly)
 +> Cannot find JRI native library!
 +
 +java.lang.UnsatisfiedLinkError: /local/apps/lib/lib/R/library/rJava/jri/libjri.so: ld.so.1: java: fatal: relocation error: file /local/apps/lib/lib/R/lib/libR.so: symbol dcopy_: referenced symbol not found
 +        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
 +
 +</code>
 +
 +
 +
 +====== references ======
 +  * [[http://tolstoy.newcastle.edu.au/R/e2/help/07/01/9464.html|Re: [R] Solaris 10 compilation issue]]
 +  * [[http://tolstoy.newcastle.edu.au/R/e2/devel/06/11/1099.html|Re: [Rd] Making Solaris 10 x86/x64 build of R available?]]
 +  * [[http://tolstoy.newcastle.edu.au/R/e3/help/07/12/6195.html|Re: [R] Building R on Sun Solaris 10 (SPARC) using Sun Studio 12]]
 +  * [[http://vegdave.wordpress.com/2006/12/02/builld-project-r-with-hdf5-on-solaris-10-x64-in-32bit/|Builld Project R with HDF5 on Solaris 10 x64 in 32bit]]
  • notes_compil_r.1200817879.txt.gz
  • Dernière modification : 2017/08/25 09:55
  • (modification externe)