Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
notes_compil_r [2008/01/20 09:31] – créée gerard | notes_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 ===== | ||
+ | < | ||
+ | w2100-henry% ssh devel1@nemo | ||
+ | > echo $PATH | ||
+ | / | ||
+ | > setenv PATH / | ||
+ | > / | ||
+ | * Installing to library '/ | ||
+ | * Installing *source* package ' | ||
+ | ** R | ||
+ | ** inst | ||
+ | ** preparing package for lazy loading | ||
+ | Loading required package: tcltk | ||
+ | Error in firstlib(which.lib.loc, | ||
+ | Tcl/Tk support is not available on this system | ||
+ | Error: package ' | ||
+ | Execution halted | ||
+ | ERROR: lazy loading failed for package ' | ||
+ | ** Removing '/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== astuce pour installer un package dans le compte user ===== | ||
+ | il faut créer un répertoire tel qu' | ||
+ | < | ||
+ | nemo-henry% mkdir -p R/ | ||
+ | nemo-henry% pwd | ||
+ | / | ||
+ | nemo-henry% / | ||
+ | * Installing to library '/ | ||
+ | * Installing *source* package ' | ||
+ | ** R | ||
+ | ** inst | ||
+ | ** preparing package for lazy loading | ||
+ | Loading required package: tcltk | ||
+ | Loading Tcl/Tk interface ... done | ||
+ | ** help | ||
+ | >>> | ||
+ | | ||
+ | aplpack.package | ||
+ | bagplot | ||
+ | boxplot2D | ||
+ | faces | ||
+ | spin3R | ||
+ | stem.leaf | ||
+ | ** building package indices ... | ||
+ | * DONE (aplpack) | ||
+ | </ | ||
+ | |||
+ | ====== Notes de compilation ====== | ||
+ | |||
+ | |||
+ | ===== Version 2.4.1 ===== | ||
* [[http:// | * [[http:// | ||
- | ====== Version 2.6.1 ====== | + | ===== Version 2.6.1 ===== |
+ | |||
+ | ==== compilation avec gcc ==== | ||
+ | voir / | ||
+ | |||
+ | < | ||
+ | > ~/ | ||
+ | Java interpreter : / | ||
+ | Java version | ||
+ | Java home path : / | ||
+ | Java compiler | ||
+ | Java headers gen.: / | ||
+ | Java archive tool: / | ||
+ | Java library path: $(JAVA_HOME)/ | ||
+ | JNI linker flags : -L$(JAVA_HOME)/ | ||
+ | JNI cpp flags : -I/ | ||
+ | |||
+ | Updating Java configuration in / | ||
+ | Done. | ||
+ | |||
+ | </ | ||
+ | On utilise le gcc de blastwave, mais le f95 de SunStudio12: | ||
+ | < | ||
+ | > setenv PATH / | ||
+ | </ | ||
+ | puis on installe JGR: | ||
+ | < | ||
+ | > / | ||
+ | </ | ||
+ | |||
+ | ==== compilation sunstudio12 32 bits ==== | ||
Le script pour compiler | Le script pour compiler | ||
< | < | ||
Ligne 31: | Ligne 117: | ||
echo "make install"; | echo "make install"; | ||
if [ $? -ne 0 ];then echo "make install failed"; | if [ $? -ne 0 ];then echo "make install failed"; | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | / | ||
+ | * Installing *source* package ' | ||
+ | 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... / | ||
+ | checking for egrep... / | ||
+ | checking for ANSI C header files... yes | ||
+ | checking for sys/wait.h that is POSIX.1 compatible... yes | ||
+ | checking for sys/ | ||
+ | checking for sys/ | ||
+ | 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/ | ||
+ | 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 : '/ | ||
+ | archiver | ||
+ | compiler | ||
+ | header prep.: '/ | ||
+ | cpp flags : ' | ||
+ | java libs : ' | ||
+ | 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: | ||
+ | config.status: | ||
+ | === configuring in jri (/ | ||
+ | configure: running /bin/bash ./configure ' | ||
+ | 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... / | ||
+ | checking for egrep... / | ||
+ | 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: | ||
+ | config.status: | ||
+ | config.status: | ||
+ | ** libs | ||
+ | cc -I/ | ||
+ | cc -I/ | ||
+ | cc -I/ | ||
+ | cc -I/ | ||
+ | cc -I/ | ||
+ | cc -I/ | ||
+ | " | ||
+ | pointer to void " | ||
+ | " | ||
+ | pointer to void " | ||
+ | cc -I/ | ||
+ | cc -I/ | ||
+ | cc -I/ | ||
+ | cc -I/ | ||
+ | cc -G -R/ | ||
+ | make -C ../jri/ | ||
+ | make[1]: Entering directory `/ | ||
+ | make -C src JRI.jar | ||
+ | make[2]: Entering directory `/ | ||
+ | / | ||
+ | / | ||
+ | cc -c -o Rengine.o Rengine.c -g -Iinclude | ||
+ | cc -c -o jri.o jri.c -g -Iinclude | ||
+ | cc -c -o Rcallbacks.o Rcallbacks.c -g -Iinclude | ||
+ | cc -c -o Rinit.o Rinit.c -g -Iinclude | ||
+ | cc -c -o globals.o globals.c -g -Iinclude | ||
+ | cc -c -o rjava.o rjava.c -g -Iinclude | ||
+ | cc -o libjri.so Rengine.o jri.o Rcallbacks.o Rinit.o globals.o rjava.o | ||
+ | / | ||
+ | / | ||
+ | make[2]: Leaving directory `/ | ||
+ | rm -f libjri.so | ||
+ | cp src/ | ||
+ | / | ||
+ | Note: examples/ | ||
+ | Note: Recompile with -Xlint: | ||
+ | / | ||
+ | Note: examples/ | ||
+ | Note: Recompile with -Xlint: | ||
+ | make[1]: Leaving directory `/ | ||
+ | ** R | ||
+ | ** inst | ||
+ | ** preparing package for lazy loading | ||
+ | ** help | ||
+ | >>> | ||
+ | | ||
+ | accessOp | ||
+ | jarray | ||
+ | jarrayRef-class | ||
+ | jcall | ||
+ | jcast | ||
+ | jcastToArray | ||
+ | jcheck | ||
+ | jengine | ||
+ | jequals | ||
+ | jfield | ||
+ | jfloat-class | ||
+ | jfloat | ||
+ | jinit | ||
+ | jmemprof | ||
+ | jnew text html latex | ||
+ | jnull | ||
+ | jobjRef-class | ||
+ | jpackage | ||
+ | jreflection | ||
+ | jsimplify | ||
+ | loader | ||
+ | show text html latex | ||
+ | ** building package indices ... | ||
+ | * DONE (rJava) | ||
+ | |||
+ | The downloaded packages are in | ||
+ | / | ||
+ | Updating HTML index of packages in ' | ||
</ | </ | ||
Le check échoue!? | Le check échoue!? | ||
Pour lancer, voir le script /bin/R26 | Pour lancer, voir le script /bin/R26 | ||
+ | |||
+ | |||
+ | ==== Hacks ==== | ||
+ | dans / | ||
+ | \\ | ||
+ | dans / | ||
+ | |||
+ | ===== R 2.7.1 avec studio 12 ===== | ||
+ | voir le répertoire / | ||
+ | |||
+ | < | ||
+ | setenv PATH / | ||
+ | </ | ||
+ | et le fichier do_work32.sh | ||
+ | \\ | ||
+ | les tests échouent, mais on peut faire l' | ||
+ | |||
+ | ===== Problèmes ===== | ||
+ | |||
+ | ==== avec JGR et Studio12 ==== | ||
+ | [[http:// | ||
+ | |||
+ | < | ||
+ | > 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 / | ||
+ | > Exception in thread " | ||
+ | at java.lang.ClassLoader.defineClass1(Native Method) | ||
+ | at java.lang.ClassLoader.defineClass(ClassLoader.java: | ||
+ | at java.security.SecureClassLoader.defineClass(SecureClassLoader.java: | ||
+ | at java.net.URLClassLoader.defineClass(URLClassLoader.java: | ||
+ | at java.net.URLClassLoader.access$100(URLClassLoader.java: | ||
+ | at java.net.URLClassLoader$1.run(URLClassLoader.java: | ||
+ | at java.security.AccessController.doPrivileged(Native Method) | ||
+ | at java.net.URLClassLoader.findClass(URLClassLoader.java: | ||
+ | at RJavaClassLoader.findClass(RJavaClassLoader.java: | ||
+ | at java.lang.ClassLoader.loadClass(ClassLoader.java: | ||
+ | at java.lang.ClassLoader.loadClass(ClassLoader.java: | ||
+ | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: | ||
+ | at java.lang.Class.getDeclaredMethods0(Native Method) | ||
+ | at java.lang.Class.privateGetDeclaredMethods(Class.java: | ||
+ | at java.lang.Class.getMethod0(Class.java: | ||
+ | at java.lang.Class.getMethod(Class.java: | ||
+ | at RJavaClassLoader.bootClass(RJavaClassLoader.java: | ||
+ | at RJavaClassLoader.main(RJavaClassLoader.java: | ||
+ | |||
+ | </ | ||
+ | pourtant, il est installé: | ||
+ | < | ||
+ | > find / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Après avoir hacké le script de lancement (voir [[hacks]]), il y a un problème au lancement: | ||
+ | < | ||
+ | > bash / | ||
+ | Java Accessibility Bridge for GNOME loaded. | ||
+ | |||
+ | Cannot find JRI native library! | ||
+ | |||
+ | java.lang.UnsatisfiedLinkError: | ||
+ | at java.lang.ClassLoader$NativeLibrary.load(Native Method) | ||
+ | at java.lang.ClassLoader.loadLibrary0(ClassLoader.java: | ||
+ | at java.lang.ClassLoader.loadLibrary(ClassLoader.java: | ||
+ | at java.lang.Runtime.loadLibrary0(Runtime.java: | ||
+ | at java.lang.System.loadLibrary(System.java: | ||
+ | at org.rosuda.JGR.JGR.< | ||
+ | at org.rosuda.JGR.JGR.main(JGR.java: | ||
+ | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | ||
+ | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: | ||
+ | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: | ||
+ | at java.lang.reflect.Method.invoke(Method.java: | ||
+ | at RJavaClassLoader.bootClass(RJavaClassLoader.java: | ||
+ | at RJavaClassLoader.main(RJavaClassLoader.java: | ||
+ | > | ||
+ | et pourtant, la lib est bien présente! | ||
+ | </ | ||
+ | voir [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== JGR et Java ==== | ||
+ | Ne marche pas avec java 1.5 livré avec l'os: | ||
+ | < | ||
+ | nemo-root% ls -l /usr/java | ||
+ | lrwxrwxrwx | ||
+ | |||
+ | </ | ||
+ | On installe la version 1.6 et on teste: | ||
+ | < | ||
+ | nemo-root% ls -l | ||
+ | total 12 | ||
+ | drwxr-xr-x | ||
+ | lrwxrwxrwx | ||
+ | lrwxrwxrwx | ||
+ | lrwxrwxrwx | ||
+ | nemo-root% cd /usr | ||
+ | /usr | ||
+ | nemo-root% rm java | ||
+ | rm: remove java (yes/no)? y | ||
+ | nemo-root% ln -s jdk/ | ||
+ | nemo-root% ls -l java | ||
+ | lrwxrwxrwx | ||
+ | > / | ||
+ | Java interpreter : / | ||
+ | Java version | ||
+ | Java home path : / | ||
+ | Java compiler | ||
+ | Java headers gen.: / | ||
+ | Java archive tool: / | ||
+ | Java library path: $(JAVA_HOME)/ | ||
+ | JNI linker flags : -L$(JAVA_HOME)/ | ||
+ | JNI cpp flags : -I/ | ||
+ | |||
+ | Updating Java configuration in / | ||
+ | Done. | ||
+ | |||
+ | </ | ||
+ | mais quand on le lance, plante: | ||
+ | < | ||
+ | Starting JGR ... | ||
+ | (You can use / | ||
+ | > Cannot find JRI native library! | ||
+ | |||
+ | java.lang.UnsatisfiedLinkError: | ||
+ | at java.lang.ClassLoader$NativeLibrary.load(Native Method) | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ====== references ====== | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// |