Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52378 - java-config should warn loudly when JRE is set as system VM.
Summary: java-config should warn loudly when JRE is set as system VM.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Jason A. Mobarak (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-05-29 10:58 UTC by Lee Thompson
Modified: 2004-10-14 02:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lee Thompson 2004-05-29 10:58:47 UTC
emerging subversion to 1.0.4 fails



Reproducible: Always
Steps to Reproduce:
1.  Be like me and have both "dev-java/blackdown-jdk-1.4.1" and "blackdown-jre-1.4.1" emerged in to your system
2.  emerge subversion (provided you unmask so that 1.0.4 is built)
3.  Subversion fails to find "javac" as /etc/profile.env has JAVA_HOME pointed to /opt/blackdown-jre-1.4.1

Here is what I did to fix in my case
root # emerge --unmerge blackdown-jre
root # emerge jdk

Essentially, deinstall the jre, and reinstall jdk.  This points JAVA_HOME to the jdk so that javac is found.  I don't know why I had both jre and jdk on this system or if that is a valid config.

Actual Results:  
make[1]: Leaving directory
`/var/tmp/portage/subversion-1.0.4/work/subversion-
1.0.4/subversion/bindings/swig/perl'
java
configure.in: installing `./install-sh'
configure.in: installing `./mkinstalldirs'
configure.in: installing `./missing'
Makefile.am: installing `./INSTALL'
native/Makefile.am: installing `./depcomp'
apache2
apache2
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
creating config.nice
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-strip... no
checking for strip... strip
checking whether to enable maintainer-specific portions of Makefiles... no
checking for APR... yes
checking for APR-util... yes
checking for i686-pc-linux-gnu-g++... g++
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 g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for ld used by GCC... /usr/i686-pc-linux-gnu/bin/ld
checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking for a sed that does not truncate output... /bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse nm output... ok
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... 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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for i686-pc-linux-gnu-strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking whether the linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared
libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether -lc should be explicitly linked in... no
creating libtool
checking for JDK... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating native/Makefile
config.status: creating cls/Makefile
config.status: creating doc/Makefile
config.status: executing depfiles commands
Making all in src
make[1]: Entering directory
`/var/tmp/portage/subversion-1.0.4/work/subversion-
1.0.4/subversion/bindings/java/javahl/src'
CLASSPATH=../cls:./../cls:$CLASSPATH none/bin/javac -d ../cls -g
org/tigris/subversion/javahl/BlameCallback.java
org/tigris/subversion/javahl/ClientException.java
org/tigris/subversion/javahl/DirEntry.java
org/tigris/subversion/javahl/JNIError.java
org/tigris/subversion/javahl/LogMessage.java
org/tigris/subversion/javahl/NodeKind.java
org/tigris/subversion/javahl/Notify.java
org/tigris/subversion/javahl/PromptUserPassword.java
org/tigris/subversion/javahl/PromptUserPassword2.java
org/tigris/subversion/javahl/PromptUserPassword3.java
org/tigris/subversion/javahl/PropertyData.java
org/tigris/subversion/javahl/Revision.java
org/tigris/subversion/javahl/SVNClient.java
org/tigris/subversion/javahl/SVNClientInterface.java
org/tigris/subversion/javahl/SVNClientSynchronized.java
org/tigris/subversion/javahl/Status.java
/bin/sh: line 1: none/bin/javac: No such file or directory
make[1]: *** [classnoinst.stamp] Error 127
make[1]: Leaving directory
`/var/tmp/portage/subversion-1.0.4/work/subversion-
1.0.4/subversion/bindings/java/javahl/src'
make: *** [all-recursive] Error 1

!!! ERROR: dev-util/subversion-1.0.4 failed.
!!! Function src_compile, Line 154, Exitcode 2
!!! Compilation failed

rooh root # which javac
which: no javac in
(/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-
gnu/gcc-bin/3.3:/usr/X11R6/bin:/opt/blackdown-jre-
1.4.1/bin:/usr/qt/3/bin:/usr/kde/3.2/sbin:/usr/kde/3.2/bin)


Expected Results:  
Possibly the ebuild should have a condition that jre not be installed?  Just 
guessing...
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-06-02 13:56:50 UTC
This is indeed a problem. We should probably prevent users from setting a JRE
as their system VM, or at least warn loudly about it.

Becase, after you've set a JRE as the default VM, you can no longer install
java packages, or packages that require any kind of java compiler reliably.

(If you're clever, you can use the jikes compile, and the standard library
from the JRE, and this may be sufficient in most cases, but cannot be 
guaranteed to work for the more complex cases).
Comment 2 Jason A. Mobarak (RETIRED) gentoo-dev 2004-07-05 11:16:40 UTC
Loud complaining is implemented in 1.2.7
Comment 3 Thomas Matthijs (RETIRED) gentoo-dev 2004-10-14 02:11:39 UTC
marking resolved