Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failing on R 3.1.0 #8

Closed
mssp11 opened this issue Apr 2, 2014 · 7 comments
Closed

Installation failing on R 3.1.0 #8

mssp11 opened this issue Apr 2, 2014 · 7 comments

Comments

@mssp11
Copy link

mssp11 commented Apr 2, 2014

* installing source package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -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
configure: checking whether gcc -std=gnu99 supports static inline...
yes
checking whether setjmp.h is POSIX.1 compatible... yes
checking whether sigsetjmp is declared... yes
checking whether siglongjmp is declared... 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/lib/jvm/java-6-openjdk-amd64/jre/../include'
java libs : '-L/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server -ljvm'
checking whether Java run-time works... yes
checking whether -Xrs is supported... yes
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 headless init is enabled... 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/RtmpfEnBeU/R.INSTALL57bb5b186eda/rJava/jri)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc -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 -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -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 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
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c Rglue.c -o Rglue.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c arrayc.c -o arrayc.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c callJNI.c -o callJNI.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c callback.c -o callback.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c fields.c -o fields.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c init.c -o init.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c jri_glue.c -o jri_glue.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c loader.c -o loader.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c otables.c -o otables.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c rJava.c -o rJava.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -O3 -pipe -g -c tools.c -o tools.o
gcc -std=gnu99 -shared -o rJava.so Rglue.o arrayc.o callJNI.o callback.o fields.o init.o jri_glue.o loader.o otables.o rJava.o tools.o -L/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server -ljvm -L/usr/lib/R/lib -lR
(cd ../jri && make)
make[1]: Entering directory /tmp/RtmpfEnBeU/R.INSTALL57bb5b186eda/rJava/jri' make -C src JRI.jar make[2]: Entering directory/tmp/RtmpfEnBeU/R.INSTALL57bb5b186eda/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 ../package-info.java
/usr/bin/javah -d . -classpath . org.rosuda.JRI.Rengine
gcc -std=gnu99 -c -o Rengine.o Rengine.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -O3 -pipe -g -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -I/usr/share/R/include -I/usr/share/R/include
gcc -std=gnu99 -c -o jri.o jri.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -O3 -pipe -g -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -I/usr/share/R/include -I/usr/share/R/include
gcc -std=gnu99 -c -o Rcallbacks.o Rcallbacks.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -O3 -pipe -g -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -I/usr/share/R/include -I/usr/share/R/include
gcc -std=gnu99 -c -o Rinit.o Rinit.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -O3 -pipe -g -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -I/usr/share/R/include -I/usr/share/R/include
gcc -std=gnu99 -c -o globals.o globals.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -O3 -pipe -g -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include
gcc -std=gnu99 -c -o rjava.o rjava.c -g -Iinclude -DRIF_HAS_CSTACK -DRIF_HAS_RSIGHAND -O3 -pipe -g -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic -I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include
rjava.c: In function ‘RJava_init_ctrl’:
rjava.c:51:8: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
rjava.c:52:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
rjava.c: In function ‘RJava_request_callback’:
rjava.c:39:8: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
rjava.c: In function ‘RJava_clear_lock’:
rjava.c:30:8: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
rjava.c: In function ‘RJava_request_lock’:
rjava.c:22:8: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
gcc -std=gnu99 -o libjri.so Rengine.o jri.o Rcallbacks.o Rinit.o globals.o rjava.o -shared -L/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server -ljvm -Wl,--export-dynamic -fopenmp -L/usr/lib/R/lib -lR -lpcre -llzma -lbz2 -lrt -ldl -lm
/usr/bin/ld: cannot find -llzma
collect2: ld returned 1 exit status
make[2]: *** [libjri.so] Error 1
make[2]: Leaving directory /tmp/RtmpfEnBeU/R.INSTALL57bb5b186eda/rJava/jri/src' make[1]: *** [src/JRI.jar] Error 2 make[1]: Leaving directory/tmp/RtmpfEnBeU/R.INSTALL57bb5b186eda/rJava/jri'
make: *** [jri] Error 2
ERROR: compilation failed for package ‘rJava’

  • removing ‘/home/cohen/R/x86_64-pc-linux-gnu-library/3.1/rJava’

The downloaded source packages are in
‘/tmp/RtmpGTuZNb/downloaded_packages’
Warning message:
In install.packages("rJava", dependencies = T) :
installation of package ‘rJava’ had non-zero exit status

@dkalisch
Copy link

dkalisch commented Apr 4, 2014

It seems that I have the same problem on Ubuntu 12.04:

gcc -std=gnu99 -o libjri.so Rengine.o jri.o Rcallbacks.o Rinit.o globals.o rjava.o  -shared -L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm -Wl,--export-dynamic -fopenmp  -L/usr/lib/R/lib -lR -lpcre -llzma -lbz2 -lrt -ldl -lm
/usr/bin/ld: cannot find -llzma
collect2: ld returned 1 exit status
make[2]: *** [libjri.so] Error 1
make[2]: Leaving directory `/tmp/Rtmp6DgVdK/R.INSTALL385e554abf17/rJava/jri/src'
make[1]: *** [src/JRI.jar] Error 2
make[1]: Leaving directory `/tmp/Rtmp6DgVdK/R.INSTALL385e554abf17/rJava/jri'
make: *** [jri] Error 2
ERROR: compilation failed for package ‘rJava’
* removing ‘/R/packages/rJava’
Warning in install.packages :
  installation of package ‘rJava’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpGIKOF1/downloaded_packages’

@mdrzazga
Copy link

mdrzazga commented Apr 8, 2014

You need liblzma.so . For Ubuntu :
sudo apt-get install liblzma-dev

@QuantumDamage
Copy link

Installing liblzma-dev also helps on Debian Wheezy.

@s-u
Copy link
Owner

s-u commented May 23, 2014

This is not really an rJava issue since the lzma flags come from R and not rJava.

@s-u s-u closed this as completed May 23, 2014
@e18r
Copy link

e18r commented Dec 16, 2015

Thank you. It worked!

@gloriousglory
Copy link

sudo apt-get install liblzma-dev worked! Thank you.

@mandar2174
Copy link

liblzma-dev package not available for centos.how i can install that package on centos.i tried both yum install liblzma-dev and lzma-dev but it is saying No package liblzma-dev available.I am using centos 6.6 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants