Re: [R] installing rJava

2013-07-30 Thread Yihui Xie
You can install it from Michael Rutter's PPA:

sudo apt-add-repository -y ppa:marutter/c2d4u
sudo apt-get update
sudo apt-get install r-cran-rjava

The last time I tried the official Ubuntu repository, rJava still did
not work under R 3.0.x (because R 3.0.x requires recompiling all R
packages). I'm not sure if that has changed or not. Michael's
repository has been working well for me (including many other R
packages that have system dependencies).

Regards,
Yihui
--
Yihui Xie 
Phone: 206-667-4385 Web: http://yihui.name
Fred Hutchinson Cancer Research Center, Seattle


On Tue, Jul 30, 2013 at 9:28 PM, Erin Hodgess  wrote:
> Dear R People:
>
> I am trying to install rJava on an Ubuntu 13.04 64 bit system.  But the
> Java part is causing me fits.  Here is the code:
>
>> install.packages("rJava",depen=TRUE)
> Installing package into ‘/home/erin/R/x86_64-pc-linux-gnu-library/3.0’
> (as ‘lib’ is unspecified)
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'http://cran.at.r-project.org/src/contrib/rJava_0.9-4.tar.gz'
> Content type 'application/x-gzip' length 498108 bytes (486 Kb)
> opened URL
> ==
> downloaded 486 Kb
>
> * installing *source* package ‘rJava’ ...
> ** package ‘rJava’ successfully unpacked and MD5 sums checked
> 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 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/lib/jvm/jdk1.7.0_25/jre/bin/java'
> archiver: '/usr/lib/jvm/jdk1.7.0_25/bin/jar'
> compiler: '/usr/lib/jvm/jdk1.7.0_25/bin/javac'
> header prep.: '/usr/lib/jvm/jdk1.7.0_25/bin/javah'
> cpp flags   : ''
> java libs   : ''
> configure: error: One or more Java configuration variables are not set.
> Make sure R is configured with full Java support (including JDK). Run
> R CMD javareconf
> as root to add Java support to R.
>
> If you don't have root privileges, run
> R CMD javareconf -e
> to set all Java-related variables and then install rJava.
>
> ERROR: configuration failed for package ‘rJava’
> * removing ‘/home/erin/R/x86_64-pc-linux-gnu-library/3.0/rJava’
>
> The downloaded source packages are in
> ‘/tmp/RtmpSzdy7i/downloaded_packages’
> Warning message:
> In install.packages("rJava", depen = TRUE) :
>   installation of package ‘rJava’ had non-zero exit status
>> sessionInfo()
> R version 3.0.1 (2013-05-16)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
>  [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
>  [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
>  [7] LC_PAPER=C LC_NAME=C
>  [9] LC_ADDRESS=C   LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods   base
>
> loaded via a namespace (and not attached):
> [1] tcltk_3.0.1 tools_3.0.1
>> q()
> Save workspace image? [y/n/c]: y
>
> Now here is the command line:
>
> erin@erin-Lenovo-IdeaPad-Y480:~$ sudo R CMD javareconf
> Java interpreter : /usr/bin/java
> Java version : 1.7.0_25
> Java home path   : /usr/lib/jvm/jdk1.7.0_25/jre
> Java compiler: /usr/bin/javac
> Java headers gen.: /usr/bin/javah
> Java archive tool: /usr/bin/jar
>
> trying to compile and link a JNI progam
> detected JNI cpp flags: -I$(JAVA_HOME)/../include
> -I$(JAVA_HOME)/../include/linux
> detected JNI linker flags : -L$(JAVA_HOME)/lib/i386/client -ljvm
> gcc -std=gnu99 -I/usr/share/R/include -DNDEBU

Re: [R] installing rJava

2013-07-30 Thread Orvalho Augusto
It is really strange what I see on this output. Your machine is 64 bit
(i386) and the libjvm is being compiled to 32 bit (I do not know what could
elicit such behavior).

Can you try and JDK 6 version?

I am on a ubuntu 12.04 64 bit and I have rJava:
orvaquim@orvaquimcism:~$ R CMD javareconf -e
Java interpreter : /usr/bin/java
Java version : 1.6.0_27
Java home path   : /usr/lib/jvm/java-6-openjdk-amd64/jre
Java compiler: /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI progam
detected JNI cpp flags: -I$(JAVA_HOME)/../include
detected JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -ljvm
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG
-I/usr/lib/jvm/java-6-openjdk-amd64/jre/../include -fpic  -O3 -pipe
-g  -c conftest.c -o conftest.o
gcc -std=gnu99 -shared -o conftest.so conftest.o
-L/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server -ljvm
-L/usr/lib/R/lib -lR

The following Java variables have been exported:
JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH
Running: /bin/bash

Hope it helps
Caveman




On Wed, Jul 31, 2013 at 6:28 AM, Erin Hodgess wrote:

> Dear R People:
>
> I am trying to install rJava on an Ubuntu 13.04 64 bit system.  But the
> Java part is causing me fits.  Here is the code:
>
> > install.packages("rJava",depen=TRUE)
> Installing package into ‘/home/erin/R/x86_64-pc-linux-gnu-library/3.0’
> (as ‘lib’ is unspecified)
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'http://cran.at.r-project.org/src/contrib/rJava_0.9-4.tar.gz'
> Content type 'application/x-gzip' length 498108 bytes (486 Kb)
> opened URL
> ==
> downloaded 486 Kb
>
> * installing *source* package ‘rJava’ ...
> ** package ‘rJava’ successfully unpacked and MD5 sums checked
> 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 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/lib/jvm/jdk1.7.0_25/jre/bin/java'
> archiver: '/usr/lib/jvm/jdk1.7.0_25/bin/jar'
> compiler: '/usr/lib/jvm/jdk1.7.0_25/bin/javac'
> header prep.: '/usr/lib/jvm/jdk1.7.0_25/bin/javah'
> cpp flags   : ''
> java libs   : ''
> configure: error: One or more Java configuration variables are not set.
> Make sure R is configured with full Java support (including JDK). Run
> R CMD javareconf
> as root to add Java support to R.
>
> If you don't have root privileges, run
> R CMD javareconf -e
> to set all Java-related variables and then install rJava.
>
> ERROR: configuration failed for package ‘rJava’
> * removing ‘/home/erin/R/x86_64-pc-linux-gnu-library/3.0/rJava’
>
> The downloaded source packages are in
> ‘/tmp/RtmpSzdy7i/downloaded_packages’
> Warning message:
> In install.packages("rJava", depen = TRUE) :
>   installation of package ‘rJava’ had non-zero exit status
> > sessionInfo()
> R version 3.0.1 (2013-05-16)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>  [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
>  [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
>  [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
>  [7] LC_PAPER=C LC_NAME=C
>  [9] LC_ADDRESS=C   LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics  grDevices utils datasets  methods   base
>
> loaded via a namespace (and not attached):
> [1] tcltk_3.0.1 tools_3.0.1
> > q()
> Save workspace image? [y/n/c]: y
>
>

[R] installing rJava

2013-07-30 Thread Erin Hodgess
Dear R People:

I am trying to install rJava on an Ubuntu 13.04 64 bit system.  But the
Java part is causing me fits.  Here is the code:

> install.packages("rJava",depen=TRUE)
Installing package into ‘/home/erin/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://cran.at.r-project.org/src/contrib/rJava_0.9-4.tar.gz'
Content type 'application/x-gzip' length 498108 bytes (486 Kb)
opened URL
==
downloaded 486 Kb

* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
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 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/lib/jvm/jdk1.7.0_25/jre/bin/java'
archiver: '/usr/lib/jvm/jdk1.7.0_25/bin/jar'
compiler: '/usr/lib/jvm/jdk1.7.0_25/bin/javac'
header prep.: '/usr/lib/jvm/jdk1.7.0_25/bin/javah'
cpp flags   : ''
java libs   : ''
configure: error: One or more Java configuration variables are not set.
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.

If you don't have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.

ERROR: configuration failed for package ‘rJava’
* removing ‘/home/erin/R/x86_64-pc-linux-gnu-library/3.0/rJava’

The downloaded source packages are in
‘/tmp/RtmpSzdy7i/downloaded_packages’
Warning message:
In install.packages("rJava", depen = TRUE) :
  installation of package ‘rJava’ had non-zero exit status
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=C LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] tcltk_3.0.1 tools_3.0.1
> q()
Save workspace image? [y/n/c]: y

Now here is the command line:

erin@erin-Lenovo-IdeaPad-Y480:~$ sudo R CMD javareconf
Java interpreter : /usr/bin/java
Java version : 1.7.0_25
Java home path   : /usr/lib/jvm/jdk1.7.0_25/jre
Java compiler: /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar

trying to compile and link a JNI progam
detected JNI cpp flags: -I$(JAVA_HOME)/../include
-I$(JAVA_HOME)/../include/linux
detected JNI linker flags : -L$(JAVA_HOME)/lib/i386/client -ljvm
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG
-I/usr/lib/jvm/jdk1.7.0_25/jre/../include
-I/usr/lib/jvm/jdk1.7.0_25/jre/../include/linux -fpic  -O2 -pipe -g  -c
conftest.c -o conftest.o
gcc -std=gnu99 -shared -o conftest.so conftest.o
-L/usr/lib/jvm/jdk1.7.0_25/jre/lib/i386/client -ljvm -L/usr/lib/R/lib -lR
/usr/bin/ld: skipping incompatible
/usr/lib/jvm/jdk1.7.0_25/jre/lib/i386/client/libjvm.so when searching for
-ljvm
/usr/bin/ld: cannot find -ljvm
collect2: error: ld returned 1 exit status
make: *** [conftest.so] Error 1
Unable to compile a JNI program


Java library path:
JNI cpp flags:
JNI linker flags :
Updating Java configuration in /usr/lib/R
Done.

erin@erin-Lenovo-IdeaPad-Y480:~$

I'm thinking that there is a problem with shared/static libraries,
perhaps?


Has anyone else run into this, please?  Any help much appreciated.

Sincerely,
Erin


-- 
Erin 

Re: [R] Installing rJava from source on Mac

2011-11-24 Thread Prof Brian Ripley
This is not an appropriate topic for R-help (see the posting guide), and 
it is what R-sig-mac is there for.


'on Mac' is not specific enough: they will need to know your exact OS.

But it looks like a path problem.  Those tools are part of Xcode, and 
tools in its path is not being found *when the package installation is 
being run*.  And as the comment inline below shows, you didn't tell us 
how you did this.


BTW, your R is very old, and the posting guide asked you to update 
before posting.  I don't think that would solve the immediate problem 
here, but it might avoid subsequent ones.



On 24/11/2011 09:34, christiaan pauw wrote:

Hi Everybody


I am trying to install the latest version of JavaGD from source but get the
following error.



You omitted what you did here.


trying URL 'http://cran.za.r-project.org/src/contrib/JavaGD_0.5-4.tar.gz'

Content type 'application/x-gzip' length 102242 bytes (99 Kb)

opened URL

==

downloaded 99 Kb


* installing *source* package ‘JavaGD’ ...

/Library/Frameworks/R.framework/Resources/bin/config: line 143: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 144: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 220: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 143: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 144: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 220: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 143: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 144: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 220: make:
command not found

checking for gcc... no

checking for cc... no

checking for cl.exe... no

configure: error: no acceptable C compiler found in $PATH

See `config.log' for more details.

ERROR: configuration failed for package ‘JavaGD’


line 143, 144 and 220  reads as follows:

143: LIBR=`eval $query VAR=LIBR`

144: STATIC_LIBR=`eval $query VAR=STATIC_LIBR`


220: eval "${query} VAR=${var}"


I do have gcc installed:
(from terminal)
$ which gcc
/Developer/usr/bin/gcc

Can anyone guide me on how to resolve this. sessionInfo below

thanks in advance
Christiaan


sessionInfo()

R version 2.11.1 (2010-05-31)
x86_64-apple-darwin9.8.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_2.11.1
Warning messages:

[[alternative HTML version deleted]]




__
R-help@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.



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@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.


[R] Installing rJava from source on Mac

2011-11-24 Thread christiaan pauw
Hi Everybody


I am trying to install the latest version of JavaGD from source but get the
following error.


trying URL 'http://cran.za.r-project.org/src/contrib/JavaGD_0.5-4.tar.gz'

Content type 'application/x-gzip' length 102242 bytes (99 Kb)

opened URL

==

downloaded 99 Kb


* installing *source* package ‘JavaGD’ ...

/Library/Frameworks/R.framework/Resources/bin/config: line 143: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 144: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 220: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 143: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 144: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 220: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 143: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 144: make:
command not found

/Library/Frameworks/R.framework/Resources/bin/config: line 220: make:
command not found

checking for gcc... no

checking for cc... no

checking for cl.exe... no

configure: error: no acceptable C compiler found in $PATH

See `config.log' for more details.

ERROR: configuration failed for package ‘JavaGD’


line 143, 144 and 220  reads as follows:

143: LIBR=`eval $query VAR=LIBR`

144: STATIC_LIBR=`eval $query VAR=STATIC_LIBR`


220: eval "${query} VAR=${var}"


I do have gcc installed:
(from terminal)
$ which gcc
/Developer/usr/bin/gcc

Can anyone guide me on how to resolve this. sessionInfo below

thanks in advance
Christiaan

> sessionInfo()
R version 2.11.1 (2010-05-31)
x86_64-apple-darwin9.8.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_2.11.1
Warning messages:

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Installing rJava fails

2011-03-24 Thread jcheng liu
Dear Orvalho Augusto,

Thanks for your response. But we met a new problem. We set as waht you said
in the last email and run installing agian. But we got the error:
rJava.h:22:17: error: jni.h: No such file or directory.
Actually we had found "jni.h" under {JAVA_HOME}/../include and the path had
been set in "JNI linker flags". So we so confuded.

Thanks,
Jiacheng

The below is the detail information.


commandline $ R CMD INSTALL rJava_0.9-0.tar.gz

output:

* installing to library
‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
* installing *source* package ‘rJava’ ...
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 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$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux'
java libs   : '-L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64
-L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib64
-L/lib64 -L/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)... no
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... no
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/zzz.R
config.status: creating src/config.h
** libs
gcc -std=gnu99
-I/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/include -I.
-I/usr/java/jre1.6.0_24/../include -I/usr/java/jre1.6.0_24/../include/linux
-I/usr/local/include-fpic  -g -O2 -c Rglue.c -o Rglue.o
In file included from Rglue.c:2:
rJava.h:22:17: error: jni.h: No such file or directory
In file included from Rglue.c:2:
rJava.h:123: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’ token
rJava.h:125: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’ token
rJava.h:126: error: expected ‘)’ before ‘*’ token
rJava.h:127: error: expected ‘)’ before ‘*’ token
rJava.h:129: warning: parameter names (without types) in function
declaration
rJava.h:130: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘getSimpleClassNames’
rJava.h:131: warning: parameter names (without types) in function
declaration
rJava.h:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘*’ token
rJava.h:138: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaStringClass’
rJava.h:139: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaObjectClass’
rJava.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaClassClass’
rJava.h:141: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘javaFieldClass’
rJava.h:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘rj_RJavaTools_Class’
rJava.h:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_forName’
rJava.h:145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getName’
rJava.h:146: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getSimpleName’
rJava.h:147: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getSuperclass’
rJava.h:148: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘mid_getType’
rJava.h:149: error: expected ‘=’,

Re: [R] Installing rJava fails

2011-03-18 Thread Orvalho Augusto
It seems that you are not alone with that error  (
http://stackoverflow.com/questions/3311940/r-rjava-package-install-failing).

Defining only JAVA_HOME he would find everything else.

Backup your /etc/R before do this.

Running the R CMD javareconf is to place variables like this in
/etc/R/Makeconf (hope the experts corect me)
JAR = /usr/bin/jar
JAVA = /usr/bin/java
JAVAC = /usr/bin/javac
JAVAH = /usr/bin/javah
JAVA_HOME = /usr/lib/jvm/java-6-sun-1.6.0.24/jre
JAVA_LD_LIBRARY_PATH =
$(JAVA_HOME)/lib/i386/server:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
JAVA_LIBS = -L$(JAVA_HOME)/lib/i386/server -L$(JAVA_HOME)/lib/i386
-L$(JAVA_HOME)/../lib/i386 -L/usr/java/packages/lib/i386 -L/lib -L/usr/lib
-ljvm
JAVA_CPPFLAGS = -I$(JAVA_HOME)/../include -I$(JAVA_HOME)/../include/linux

Add it manually. Pay attention the amd64 versus my i386. Place on variable
sections

Edit /etc/R/ldpahs place before if test -n...
: ${JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/jre}
:
${R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/i386/server:${JAVA_HOME}/lib/i386:${JAVA_HOME}/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib}

Again correct with your paths.

And try to install rJava.

Caveman


On Fri, Mar 18, 2011 at 7:30 PM, jcheng liu  wrote:

>  Dear Orvalho Augusto,
> Thank so much for you response!
> We had run R CMD javareconf -e, and even R CMD javareconf in administrator.
>
> Actually, we had install the JDK. And in the output, only the item of JNI
> cpp flages could not be detected(I listed output below). What does the item
> mean? What need we install?
>
> Thanks,
> Jiacheng
>
> R CMD javareconf -e
>
> Java interpreter : /usr/bin/java
> Java version : 1.6.0_24
> Java home path   : /usr/java/jre1.6.0_24
> Java compiler: /usr/bin/javac
> Java headers gen.: /usr/bin/javah
> Java archive tool: /usr/bin/jar
> Java library path:
> $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
> JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64
> -L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib64
> -L/lib64 -L/lib -L/usr/lib -ljvm
> JNI cpp flags:
>
> The following Java variables have been exported:
> JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH
> Runnig: /bin/tcsh
>
>
>
> On 3/18/2011 12:53 PM, Orvalho Augusto wrote:
>
> Run
> R CMD javareconf -e
>
> as the being suggest by the output. That will try to guess where is Java.
> Or you can install the JDK_HOME and JAVA_HOME variables.
>
> Good luck.
> Caveman
>
>
>  On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu  wrote:
>
>> Dear all,
>> Installing rJava fails. The message was listed below. I wonder why cpp
>> flag
>> could not be detected, although I had installed. Thanks!!!
>> -Jiacheng
>>
>> R CMD INSTALL rJava_0.9-0.tar.gz
>> * installing to library
>> ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
>> * installing *source* package ‘rJava’ ...
>> 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 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   : ''
>> java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
>> -L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
>> -L/usr/java/packages/lib/amd64 -L/usr/lib64 

Re: [R] Installing rJava fails

2011-03-18 Thread jcheng liu
 Dear Orvalho Augusto,
Thank so much for you response!
We had run R CMD javareconf -e, and even R CMD javareconf in administrator.
Actually, we had install the JDK. And in the output, only the item of JNI
cpp flages could not be detected(I listed output below). What does the item
mean? What need we install?

Thanks,
Jiacheng

R CMD javareconf -e

Java interpreter : /usr/bin/java
Java version : 1.6.0_24
Java home path   : /usr/java/jre1.6.0_24
Java compiler: /usr/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path:
$(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64
-L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib64
-L/lib64 -L/lib -L/usr/lib -ljvm
JNI cpp flags:

The following Java variables have been exported:
JAVA_HOME JAVA JAVAC JAVAH JAR JAVA_LIBS JAVA_CPPFLAGS JAVA_LD_LIBRARY_PATH
Runnig: /bin/tcsh


On 3/18/2011 12:53 PM, Orvalho Augusto wrote:

Run
R CMD javareconf -e

as the being suggest by the output. That will try to guess where is Java. Or
you can install the JDK_HOME and JAVA_HOME variables.

Good luck.
Caveman


 On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu  wrote:

> Dear all,
> Installing rJava fails. The message was listed below. I wonder why cpp flag
> could not be detected, although I had installed. Thanks!!!
> -Jiacheng
>
> R CMD INSTALL rJava_0.9-0.tar.gz
> * installing to library
> ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
> * installing *source* package ‘rJava’ ...
> 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 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   : ''
> java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
> -L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
> -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
> -ljvm'
> configure: error: One or more Java configuration variables are not set.
> Make sure R is configured with full Java support (including JDK). Run
> R CMD javareconf
> as root to add Java support to R.
>
> If you don't have root privileges, run
> R CMD javareconf -e
> to set all Java-related variables and then install rJava.
>
> ERROR: configuration failed for package ‘rJava’
> * removing ‘/R-2.12.0/library/rJava’
>
>[[alternative HTML version deleted]]
>
>
> __
> R-help@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.
>
>

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Installing rJava fails

2011-03-18 Thread Orvalho Augusto
Run
R CMD javareconf -e

as the being suggest by the output. That will try to guess where is Java. Or
you can install the JDK_HOME and JAVA_HOME variables.

Good luck.
Caveman


On Fri, Mar 18, 2011 at 4:39 PM, jcheng liu  wrote:

> Dear all,
> Installing rJava fails. The message was listed below. I wonder why cpp flag
> could not be detected, although I had installed. Thanks!!!
> -Jiacheng
>
> R CMD INSTALL rJava_0.9-0.tar.gz
> * installing to library
> ‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
> * installing *source* package ‘rJava’ ...
> 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 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   : ''
> java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
> -L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
> -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
> -ljvm'
> configure: error: One or more Java configuration variables are not set.
> Make sure R is configured with full Java support (including JDK). Run
> R CMD javareconf
> as root to add Java support to R.
>
> If you don't have root privileges, run
> R CMD javareconf -e
> to set all Java-related variables and then install rJava.
>
> ERROR: configuration failed for package ‘rJava’
> * removing ‘/R-2.12.0/library/rJava’
>
>[[alternative HTML version deleted]]
>
>
> __
> R-help@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.
>
>

[[alternative HTML version deleted]]

__
R-help@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.


[R] Installing rJava fails

2011-03-18 Thread jcheng liu
Dear all,
Installing rJava fails. The message was listed below. I wonder why cpp flag
could not be detected, although I had installed. Thanks!!!
-Jiacheng

R CMD INSTALL rJava_0.9-0.tar.gz
* installing to library
‘/data1/mri_researchers/wexler_data/jiacheng/R-2.12.0/library’
* installing *source* package ‘rJava’ ...
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 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   : ''
java libs   : '-L/usr/java/jre1.6.0_24/lib/amd64/server
-L/usr/java/jre1.6.0_24/lib/amd64 -L/usr/java/jre1.6.0_24/../lib/amd64
-L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib
-ljvm'
configure: error: One or more Java configuration variables are not set.
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.

If you don't have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.

ERROR: configuration failed for package ‘rJava’
* removing ‘/R-2.12.0/library/rJava’

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Installing rJava fails on Gentoo (amd64) with Sun JDK - checking JNI data types... error

2010-09-06 Thread Helgi Tomasson
Try the following:

as super-user

java-config -L 

java-config -S (put a number pointing to sun-jdk-1.6)

R CMD javareconf

export JAVA_HOME=/usr/lib/jvm/sun-jdk-1.6/jre

export R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server:
${JAVA_HOME}/lib/amd64:
${JAVA_HOME}/../lib/amd64::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

start R

install.packages("rJava")
install.packages("JGR")

then as a normal user 

C_NUMERIC=C
export LC_NUMERIC

/usr/lib/jvm/sun-jdk-1.6/jre/bin/java -Xmx512m -Djgr.load.pkgs=yes
-Djgr.loader.ver="${JGR_LOADER_VER}" -Djava.library.path=".:
${LD_LIBRARY_PATH}" -classpath "/usr/lib64/R/library/rJava/java/boot"
-Drjava.path="/usr/lib64/R/library/rJava"
-Drjava.class.path="/usr/lib64/R/library/rJava/jri/JRI.jar:/usr/lib64/R/library/iplots/java/iplots.jar:/usr/lib64/R/library/JGR/java/JGR.jar"
 -Dmain.class=org.rosuda.JGR.JGR RJavaClassLoader $*


library(JGR)
JGR()

This got JGR started on my computer. I still have problems with
dyn.load.

Best regards


Helgi Tomasson





On Fri, 2010-08-13 at 23:31 +0100, Anthony Staines wrote:
> Installing rJava fails consistently, whether installed via
> the command line as below, or through "install.packages(
> 'rJava' )", and whether 0.84 or 0.85 is used, with the
> message :-
> "checking JNI data types... configure: error: One or more
> JNI types differ from the corresponding native type. You may
> need to use non-standard compiler flags or a different
> compiler in order to fix this."
> 
> I've tried to fix it using suggestions from the r-help list,
> and the Gentoo java documentation, but had no joy so far.
> Other Java stuff works fine on this box.
> 
> # R CMD INSTALL rJava_0.8-5.tar.gz
> * installing to library ‘/usr/lib64/R/library’
> * installing *source* package ‘rJava’ ...
> checking for gcc... x86_64-pc-linux-gnu-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 x86_64-pc-linux-gnu-gcc -std=gnu99 accepts
> -g... yes
> checking for x86_64-pc-linux-gnu-gcc -std=gnu99 option to
> accept ISO C89... none needed
> checking how to run the C preprocessor...
> x86_64-pc-linux-gnu-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 x86_64-pc-linux-gnu-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:
> '/home/astaines/.gentoo/java-config-2/current-user-vm/bin/javac'
> header prep.: '/usr/bin/javah'
> cpp flags   : '-I/opt/sun-jdk-1.6.0.20/jre/../include
> -I/opt/sun-jdk-1.6.0.20/jre/../include/linux'
> java libs   : '-L/opt/sun-jdk-1.6.0.20/jre/lib/amd64/server
> -L/opt/sun-jdk-1.6.0.20/jre/lib/amd64
> -L/opt/sun-jdk-1.6.0.20/jre/../lib/amd64 -L
> -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib
> -L/usr/lib -ljvm'
> checking whether JNI programs can be compiled... yes
> checking JNI data types... configure: error: One or more JNI
> types differ from the corresponding native type. You may
> need to use non-standard compiler flags or a different
> compiler in order to fix this.
> ERROR: configuration failed for package ‘rJava’
> * removing ‘/usr/lib64/R/library/rJava’
> 
> 
> # R --version
> R version 2.11.1 (2010-05-31)
> 
> # java -showversion
> java version "1.6.0_20"
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed  mode)
> 
> The compiler mentioned in the R output :-
>   /home/astaines/.gentoo/java-config-2/current-user-vm
> is a link pointing to
>   /usr/lib/jvm/sun-jdk-1.6
> which in turn is a link pointing to
>   /opt/sun-jdk-1.6.0.20
> however, any of the three will work.
> 
> # R CMD javareconf
> *** JAVA_HOME is not a valid path, ignoring
> Java interpreter : /usr/bin/java
> Java version : 1.6.0_20
> Jav

[R] Installing rJava fails on Gentoo (amd64) with Sun JDK - checking JNI data types... error

2010-08-13 Thread Anthony Staines
Installing rJava fails consistently, whether installed via
the command line as below, or through "install.packages(
'rJava' )", and whether 0.84 or 0.85 is used, with the
message :-
"checking JNI data types... configure: error: One or more
JNI types differ from the corresponding native type. You may
need to use non-standard compiler flags or a different
compiler in order to fix this."

I've tried to fix it using suggestions from the r-help list,
and the Gentoo java documentation, but had no joy so far.
Other Java stuff works fine on this box.

# R CMD INSTALL rJava_0.8-5.tar.gz
* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘rJava’ ...
checking for gcc... x86_64-pc-linux-gnu-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 x86_64-pc-linux-gnu-gcc -std=gnu99 accepts
-g... yes
checking for x86_64-pc-linux-gnu-gcc -std=gnu99 option to
accept ISO C89... none needed
checking how to run the C preprocessor...
x86_64-pc-linux-gnu-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 x86_64-pc-linux-gnu-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:
'/home/astaines/.gentoo/java-config-2/current-user-vm/bin/javac'
header prep.: '/usr/bin/javah'
cpp flags   : '-I/opt/sun-jdk-1.6.0.20/jre/../include
-I/opt/sun-jdk-1.6.0.20/jre/../include/linux'
java libs   : '-L/opt/sun-jdk-1.6.0.20/jre/lib/amd64/server
-L/opt/sun-jdk-1.6.0.20/jre/lib/amd64
-L/opt/sun-jdk-1.6.0.20/jre/../lib/amd64 -L
-L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib
-L/usr/lib -ljvm'
checking whether JNI programs can be compiled... yes
checking JNI data types... configure: error: One or more JNI
types differ from the corresponding native type. You may
need to use non-standard compiler flags or a different
compiler in order to fix this.
ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/lib64/R/library/rJava’


# R --version
R version 2.11.1 (2010-05-31)

# java -showversion
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed  mode)

The compiler mentioned in the R output :-
/home/astaines/.gentoo/java-config-2/current-user-vm
is a link pointing to
/usr/lib/jvm/sun-jdk-1.6
which in turn is a link pointing to
/opt/sun-jdk-1.6.0.20
however, any of the three will work.

# R CMD javareconf
*** JAVA_HOME is not a valid path, ignoring
Java interpreter : /usr/bin/java
Java version : 1.6.0_20
Java home path   : /opt/sun-jdk-1.6.0.20/jre
Java compiler:
/home/astaines/.gentoo/java-config-2/current-user-vm/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: /usr/bin/jar
Java library path:
$(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/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/usr/lib64 -L/lib64 -L/lib
-L/usr/lib -ljvm
JNI cpp flags: -I$(JAVA_HOME)/../include
-I$(JAVA_HOME)/../include/linux

Updating Java configuration in /usr/lib64/R
Done.

JAVA_HOME is unset by default on my system. As suggested, by
Godmar Back, on the list I've tried setting it. The Gentoo
way is to use
JAVA_HOME=$(java-config --jdk-home)
and this produces what I think is the desired result
#printenv | grep -i JAVA_HOME
JAVA_HOME=/opt/sun-jdk-1.6.0.20

BUT

# env JAVA_HOME=/opt/sun-jdk-1.6.0.20/ R CMD javareconf
*** JAVA_HOME is not a valid path, ignoring
Java interpreter : /usr/bin/java
Java version : 1.6.0_20
Java home path   : /opt/sun-jdk-1.6.0.20/jre
Java compiler:
/home/astaines/.gentoo/java-config-2/current-user-vm/bin/javac
Java headers gen.: /

Re: [R] Installing rJava RJDBC bad interpreter: Permission denied

2009-08-26 Thread William Dunlap

> -Original Message-
> From: r-help-boun...@r-project.org 
> [mailto:r-help-boun...@r-project.org] On Behalf Of Matias Silva
> Sent: Wednesday, August 26, 2009 7:37 AM
> To: r-help@r-project.org
> Subject: [R] Installing rJava RJDBC bad interpreter: Permission denied
> 
> Trying to install the above two packages via the 
> "install.packages("package_name")" command and
> the "R CMD INSTALL file.tar.gz".
> 
> I receive the following error either way "sh: ./configure: 
> /bin/sh: bad interpreter: Permission denied".

This may mean that your /bin/sh does not have execution
permission.  (It is similar to the message you get when
you start a script with #!/bin/nosuchshell and run it with
'sh -c script'.)

What does
ls -l /bin/sh /bin/bash
show?

Bill Dunlap
TIBCO Software Inc - Spotfire Division
wdunlap tibco.com  

> I have tried to chmod and chown permissions and also ran 
> dos2unix in hopes that there is a CRLF
> in some of the tar.gz files, but that doesn't seem to fix the 
> problem.  I'm looking for any help
> I can get.  Must I compile this to get this to work because 
> of some incompatibility with the rpm packages??
> 
> * Installing *source* package ârJavaâ ...
> sh: ./configure: /bin/sh: bad interpreter: Permission denied
> ERROR: configuration failed for package ârJavaâ
> * Removing â/usr/lib64/R/library/rJavaâ
> * Installing *source* package âRJDBCâ ...
> ** R
> ** preparing package for lazy loading
> Error : package 'rJava' required by 'RJDBC' could not be found
> ERROR: lazy loading failed for package âRJDBCâ
> * Removing â/usr/lib64/R/library/RJDBCâ
> 
> I'm using the rpm version of R found here 
> http://cran.cnr.berkeley.edu/bin/linux/redhat/el5/x86_64
> I ran the "R CMD javareconf" as root and set the JAVA_HOME 
> environment variable.
> 
> Here is my system configuration:
> OS: CentOS 5.2 x86_64
> 
> JDK: java version "1.6.0_12"
> Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)
> 
> R: 2.9.1
> rJava: rJava_0.7-0.tar.gz
> RJDBC: RJDBC_0.1-5.tar.gz
> 
> Thanks for your time and knowledge.
> 
> Best,
> Matt
> 
> __
> R-help@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.
> 

__
R-help@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.


[R] Installing rJava RJDBC bad interpreter: Permission denied

2009-08-26 Thread Matias Silva
Trying to install the above two packages via the 
"install.packages("package_name")" command and
the "R CMD INSTALL file.tar.gz".

I receive the following error either way "sh: ./configure: /bin/sh: bad 
interpreter: Permission denied".
I have tried to chmod and chown permissions and also ran dos2unix in hopes that 
there is a CRLF
in some of the tar.gz files, but that doesn't seem to fix the problem.  I'm 
looking for any help
I can get.  Must I compile this to get this to work because of some 
incompatibility with the rpm packages??

* Installing *source* package ârJavaâ ...
sh: ./configure: /bin/sh: bad interpreter: Permission denied
ERROR: configuration failed for package ârJavaâ
* Removing â/usr/lib64/R/library/rJavaâ
* Installing *source* package âRJDBCâ ...
** R
** preparing package for lazy loading
Error : package 'rJava' required by 'RJDBC' could not be found
ERROR: lazy loading failed for package âRJDBCâ
* Removing â/usr/lib64/R/library/RJDBCâ

I'm using the rpm version of R found here 
http://cran.cnr.berkeley.edu/bin/linux/redhat/el5/x86_64
I ran the "R CMD javareconf" as root and set the JAVA_HOME environment variable.

Here is my system configuration:
OS: CentOS 5.2 x86_64

JDK: java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)

R: 2.9.1
rJava: rJava_0.7-0.tar.gz
RJDBC: RJDBC_0.1-5.tar.gz

Thanks for your time and knowledge.

Best,
Matt

__
R-help@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.