0

I am attempting to install rJava on Suse SLES 12. I have installed JDK 7 (7u51), fixed my JAVA_HOME, run sudo R CMD javareconf and installed the package suggested here: rJava won't install on openSUSE 13.2.

gcc -std=gnu99 -o libjri.so Rengine.o jri.o Rcallbacks.o Rinit.o globals.o rjava.o  -shared -L/usr/java/jdk1.7.0_51/jre/lib/amd64/server -ljvm -Wl,--export-dynamic -fopenmp  -L/usr/lib64/R/lib -lR -lpcre -llzma -lz -lrt -ldl -lm -licuuc -licui18n
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lpcre
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -llzma
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
Makefile.all:38: recipe for target 'libjri.so' failed
make[2]: *** [libjri.so] Error 1
make[2]: Leaving directory '/tmp/RtmptpO8Z9/R.INSTALL7e795f7a8704/rJava/jri/src'
Makefile.all:21: recipe for target 'src/JRI.jar' failed
make[1]: *** [src/JRI.jar] Error 2
make[1]: Leaving directory '/tmp/RtmptpO8Z9/R.INSTALL7e795f7a8704/rJava/jri'
Makevars:14: recipe for target 'jri' failed
make: *** [jri] Error 2
ERROR: compilation failed for package ‘rJava’
* removing ‘/opt/node_apps/acas-2016-02-03-13-07-09/r_libs/rJava’

I have attempted to update zypper install libpcre1 and zypper install liblzma5, but updating them did not change the error message.

I know that on Ubuntu there is a liblzma-dev that could help (https://github.com/s-u/rJava/issues/8), but I can't find a similar package for Suse.

Does anyone know what I am missing?

Community
  • 1
  • 1
waternova
  • 1,472
  • 3
  • 16
  • 22
  • You're missing the libraries it lists - check your system to find if you have them at all and where (`libpcre.so`, `liblzma.so` and `libz.so`). It's possible that you have them with some suffix which prevents linking. – Simon Urbanek Feb 04 '16 at 03:33

1 Answers1

1

Please install the following RPM packages

  • xz-devel
  • pcre-devel
  • pcre-devel-static
  • zlib-devel

and try again. I'm not quite sure right now, but if that didn't help, please make sure that these packages are installed aswell:

  • xz
  • libpcre1
  • liblzma5
CupRacer
  • 149
  • 7