Liaw, Andy
2006-Oct-03 19:30 UTC
[R] how do I tell configure where to find Java? [Broadcast]
Before I do that, I would need to remove the gcj stuff that are in /usr/bin. If I know how to remove gcj, I'd gladly do that. However, for the particular version of the OS, the entire GCC seems to be bundled into one rpm, and I could not remove just the gcj component. Neither do I wish to mess with files that are part of some RPMs--- in my experience that's invitation for trouble later. Best, Andy From: mike waters> > I'm not familiar with gcj, but my initial reaction would be a > ln -s for the relevant compiler executable from /usr/java > into /usr/bin. > > -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Liaw, Andy > Sent: 03 October 2006 19:40 > To: r-help > Subject: [R] how do I tell configure where to find Java? > > Dear R-help, > > I'm trying to build R-2.4.0 on our Opteron-based Scyld > cluster. The system has gcj (the GNU Java compiler, part of > GCC) stuff in /usr/bin. When I installed jdk 1.5.08, the > install script placed it in /usr/java (I didn't have a > choice, as the script didn't offer that option). Now when I > run configure in R-2.4.0, it finds gcj, which is not what I > want to use. Is there a way to tell configure where to look > for Java? I tried configure --help but didn't see anything > related to Java. > > Best, > Andy > > Andy Liaw, PhD > Biometrics Research PO Box 2000 RY33-300 > Merck Research Labs Rahway, NJ 07065 > andy_liaw(a)merck.com 732-594-0820 > > > > -------------------------------------------------------------- > -------------- > -- > Notice: This e-mail message, together with any > attachments,...{{dropped}} > > ______________________________________________ > R-help at stat.math.ethz.ch 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. > > > >------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments,...{{dropped}}
Peter Dalgaard
2006-Oct-03 20:10 UTC
[R] how do I tell configure where to find Java? [Broadcast]
"Liaw, Andy" <andy_liaw at merck.com> writes:> Before I do that, I would need to remove the gcj stuff that are in /usr/bin. > If I know how to remove gcj, I'd gladly do that. However, for the > particular version of the OS, the entire GCC seems to be bundled into one > rpm, and I could not remove just the gcj component. Neither do I wish to > mess with files that are part of some RPMs--- in my experience that's > invitation for trouble later. > > Best, > AndyOdd, I've done nothing in particular on FC5 and I got [pd at titmouse2 BUILD]$ grep -i java Makeconf JAVA = /usr/bin/java JAVA_HOME = /usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre JAVA_LD_LIBRARY_PATH $(JAVA_HOME)/lib/i386/client:$(JAVA_HOME)/lib/i386:$(JAVA_HOME)/../lib/i386:/usr/local/lib JAVA_LIBS = -L$(JAVA_HOME)/lib/i386/client -L$(JAVA_HOME)/lib/i386 -L$(JAVA_HOME)/../lib/i386 -L/usr/local/lib -ljvm JAVAC = /usr/bin/javac I suspect the installation of java was according to http://www.fedorafaq.org/#java and some of this has installed links from /usr/bin/javac to /usr/lib/jvm/java-1.5.0-sun/bin/javac (via /etc/alternatives/javac) Otherwise, there's always the option of actually reading the configure script... I notice that it starts off looking for JAVA_HOME.> From: mike waters > > > > I'm not familiar with gcj, but my initial reaction would be a > > ln -s for the relevant compiler executable from /usr/java > > into /usr/bin. > > > > -----Original Message----- > > From: r-help-bounces at stat.math.ethz.ch > > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Liaw, Andy > > Sent: 03 October 2006 19:40 > > To: r-help > > Subject: [R] how do I tell configure where to find Java? > > > > Dear R-help, > > > > I'm trying to build R-2.4.0 on our Opteron-based Scyld > > cluster. The system has gcj (the GNU Java compiler, part of > > GCC) stuff in /usr/bin. When I installed jdk 1.5.08, the > > install script placed it in /usr/java (I didn't have a > > choice, as the script didn't offer that option). Now when I > > run configure in R-2.4.0, it finds gcj, which is not what I > > want to use. Is there a way to tell configure where to look > > for Java? I tried configure --help but didn't see anything > > related to Java. > > > > Best, > > Andy > > > > Andy Liaw, PhD > > Biometrics Research PO Box 2000 RY33-300 > > Merck Research Labs Rahway, NJ 07065 > > andy_liaw(a)merck.com 732-594-0820 > > > > > > > > -------------------------------------------------------------- > > -------------- > > -- > > Notice: This e-mail message, together with any > > attachments,...{{dropped}} > > > > ______________________________________________ > > R-help at stat.math.ethz.ch 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. > > > > > > > > > > > ------------------------------------------------------------------------------ > Notice: This e-mail message, together with any attachments,...{{dropped}} > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >-- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Logan Lewis
2006-Oct-03 20:10 UTC
[R] how do I tell configure where to find Java? [Broadcast]
Andy, On Tuesday 03 October 2006 3:30 pm, Liaw, Andy wrote:> Before I do that, I would need to remove the gcj stuff that are in > /usr/bin. If I know how to remove gcj, I'd gladly do that. However, for > the particular version of the OS, the entire GCC seems to be bundled into > one rpm, and I could not remove just the gcj component. Neither do I wish > to mess with files that are part of some RPMs--- in my experience that's > invitation for trouble later.The Red Hat way of dealing with different packages providing the same binaries is "alternatives". You will see a bunch of links in /etc/alternatives, and the command /usr/sbin/alternatives allows you to switch between options that provide the same binaries. The trouble is that the Sun JDK package does not interface into this system, and doesn't show up as an option when you execute /usr/sbin/alternatives --config java. I'm fairly confident you can manually add the JDK as an option (somebody out there must've written it up). This would probably be the most correct way of doing it within the context of RH's utilities. You can probably also just remove gcj's links (I haven't tested this, so be careful) and make sure that the Sun Java binaries are in your path. For my home system, I just set my path to have the /usr/java/... path come first. Logan
mike waters
2006-Oct-03 20:12 UTC
[R] how do I tell configure where to find Java? [Broadcast]
For a jre you could create a file called /etc/profile.d/java.sh containing the following (JAVA_HOME path will need to point to the correct directory for your particular Java version): #!/bin/sh JAVA_HOME=/usr/java/jre1.5.0_08 export JAVA_HOME JAVA_BIN=$JAVA_HOME/bin CLASSPATH=$CLASSPATH:$JAVA_HOME:$JAVA_HOME/lib PATH=$JAVA_BIN:$PATH export JAVA_BIN CLASSPATH PATH -----Original Message----- From: Liaw, Andy [mailto:andy_liaw at merck.com] Sent: 03 October 2006 20:31 To: mike waters Cc: 'r-help' Subject: RE: [R] how do I tell configure where to find Java? [Broadcast] Before I do that, I would need to remove the gcj stuff that are in /usr/bin. If I know how to remove gcj, I'd gladly do that. However, for the particular version of the OS, the entire GCC seems to be bundled into one rpm, and I could not remove just the gcj component. Neither do I wish to mess with files that are part of some RPMs--- in my experience that's invitation for trouble later. Best, Andy From: mike waters> > I'm not familiar with gcj, but my initial reaction would be a ln -s > for the relevant compiler executable from /usr/java into /usr/bin. > > -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Liaw, Andy > Sent: 03 October 2006 19:40 > To: r-help > Subject: [R] how do I tell configure where to find Java? > > Dear R-help, > > I'm trying to build R-2.4.0 on our Opteron-based Scyld cluster. The > system has gcj (the GNU Java compiler, part of > GCC) stuff in /usr/bin. When I installed jdk 1.5.08, the install > script placed it in /usr/java (I didn't have a choice, as the script > didn't offer that option). Now when I run configure in R-2.4.0, it > finds gcj, which is not what I want to use. Is there a way to tell > configure where to look for Java? I tried configure --help but didn't > see anything related to Java. > > Best, > Andy > > Andy Liaw, PhD > Biometrics Research PO Box 2000 RY33-300 > Merck Research Labs Rahway, NJ 07065 > andy_liaw(a)merck.com 732-594-0820 > > > > -------------------------------------------------------------- > -------------- > -- > Notice: This e-mail message, together with any > attachments,...{{dropped}} > > ______________________________________________ > R-help at stat.math.ethz.ch 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. > > > >---------------------------------------------------------------------------- -- Notice: This e-mail message, together with any attachments,...{{dropped}}