Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115535 - sys-libs/db-4.2.52_p2-r1 uses a wrong JVM with USE="java" enabled
Summary: sys-libs/db-4.2.52_p2-r1 uses a wrong JVM with USE="java" enabled
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal
Assignee: Thomas Matthijs (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-14 07:42 UTC by Wiktor Wandachowicz
Modified: 2005-12-14 13:21 UTC (History)
0 users

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 Wiktor Wandachowicz 2005-12-14 07:42:22 UTC
I'm using the axxo-overlay revision 1467.

Today I 'emerge --sync'ed and did 'emerge -pvuD world' as usual. It showed
that the perl and db updates are available, among others. I have both
sun-jdk-1.4.10-r1 and sun-jdk-1.5.0.05-r1 installed (in that order), but
I've used java-config -S to set the default JVM to the 1.4 one.

While watching the configure part for the 'db', I've spotted something
intriguing:

# emerge -avuD1 perl

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild     U ] sys-libs/db-4.2.52_p2-r1 [4.2.52_p2] -bootstrap -doc +java*
-nocxx -tcltk 0 kB
[ebuild     U ] dev-lang/perl-5.8.6-r8 [5.8.6-r7] +berkdb -build -debug -doc
+gdbm +ithreads -minimal -perlsuid 0 kB

Total size of downloads: 0 kB

...

checking if javac works... yes
checking for jar... jar
checking for java... java
checking for uudecode... no
configure: WARNING: I have to compile Test.class from scratch
checking if java works... yes
checking for javac... /opt/sun-jdk-1.5.0.05/bin/javac
checking absolute path of javac... /opt/sun-jdk-1.5.0.05/bin/javac
checking java version... 1.5.0_05

I double checked that the sun-jdk-1.4 is the default JVM. But sys-libs/db
always tries to use the 1.5.0.05 JVM.

I uninstalled both sun-jdk's and installed them in the reverse order
(1.5 first, then 1.4) but it didn't help.


Reproducible: Always
Steps to Reproduce:
1. checkout the current axxo-overlay
2. add its directory to the PORTDIR_OVERLAY in /etc/make.conf
3. sync the portage tree
4. make sure that USE="java" is set
5. emerge sun-jdk-1.4.10-r1 and sun-jdk-1.5.0.05-r1 (unmask if necessary)
6. try to update (or remerge) sys-libs/db

Actual Results:  
sys-libs/db always tries to use the 1.5.0.05 JVM, as presented in
an excerpt of the output of the configure part above.


Here are the versions of the packages in question:

# which java
/usr/bin/java

# ls -l /usr/bin/java
lrwxrwxrwx  1 root root 22 Dec 14 15:40 /usr/bin/java -> /usr/bin/run-java-tool

# java-config -L
*) Sun JDK 1.4.2.10 [sun-jdk-1.4] (/etc/env.d/java/20sun-jdk-1.4)
2) Sun JDK 1.5.0.05 [sun-jdk-1.5] (/etc/env.d/java/20sun-jdk-1.5)

# java -version
java version "1.4.2_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)

# emerge -pvC sun-jdk

>>> These are the packages that I would unmerge:

 dev-java/sun-jdk
    selected: 1.4.2.10-r1 1.5.0.05-r1
   protected: none
     omitted: none

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

# emerge -pv =sun-jdk-1.4* =sun-jdk-1.5*

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   Rf  ] dev-java/sun-jdk-1.4.2.10-r1  -doc +jce -nsplugin 0 kB [1]
[ebuild   Rf  ] dev-java/sun-jdk-1.5.0.05-r1  -doc +jce -nsplugin 0 kB [1]

Total size of downloads: 0 kB
Portage overlays:
 [1] /usr/local/overlays/axxo-overlay

# emerge -pv java-config

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] dev-java/java-config-2.0.18  0 kB [1]

Total size of downloads: 0 kB
Portage overlays:
 [1] /usr/local/overlays/axxo-overlay

# svn up /usr/local/overlays/axxo-overlay
At revision 1467.


Expected Results:  
The sys-libs/db should use the correct JVM selected by the java-config.

Probably it means that creating an updated ebuild and putting it in
the axxo-overlay is necessary.


# emerge --info
Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r3,
2.6.14-gentoo-r4 i686)
=================================================================
System uname: 2.6.14-gentoo-r4 i686 AMD Athlon(tm) Processor
Gentoo Base System version 1.6.13
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=i686 -mtune=athlon-tbird -fforce-addr
-momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d/java/ /etc/gconf /etc/java-config/vms/
/etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=i686 -mtune=athlon-tbird -fforce-addr
-momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe
-fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="gentoo.prz.rzeszow.pl src.gentoo.pl"
LINGUAS="pl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/axxo-overlay"
SYNC="rsync://gentoo.prz.rzeszow.pl/gentoo-portage"
USE="x86 apm bash-completion berkdb bzip2 crypt cups eds emboss encode expat
foomaticdb fortran gdbm gpm imlib ipv6 libg++ libwww mpeg ncurses nls nptl
nptlonly pam pcre pdflib perl python readline spell ssl tcpd udev unicode xml2
xv zlib linguas_pl userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Wiktor Wandachowicz 2005-12-14 07:54:54 UTC
I unmerged sun-jdk-1.5.0.05-r1 and tried to upgrade sys-libs/db.

Now the things went worse:

...

../dist/../libdb_java/db_java_wrap.c: At top level:
../dist/../libdb_java/db_java_wrap.c:7269: error: parse error before "jlong"
../dist/../libdb_java/db_java_wrap.c:7269: error: parse error before '*' token
../dist/../libdb_java/db_java_wrap.c: In function
`Java_com_sleepycat_db_db_1javaJNI_DbMpoolFile_1get_1maxsize':
../dist/../libdb_java/db_java_wrap.c:7270: error: `jlong' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7270: error: parse error before "jresult"
../dist/../libdb_java/db_java_wrap.c:7272: error: parse error before "result"
../dist/../libdb_java/db_java_wrap.c:7274: error: `jenv' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7275: error: `jcls' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7276: error: `jarg1' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7285: error: `result' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7290: error: `jresult' undeclared (first
use in this function)
../dist/../libdb_java/db_java_wrap.c: At top level:
../dist/../libdb_java/db_java_wrap.c:7295: error: syntax error before "void"
../dist/../libdb_java/db_java_wrap.c:7295: error: parse error before '*' token
../dist/../libdb_java/db_java_wrap.c: In function
`Java_com_sleepycat_db_db_1javaJNI_DbMpoolFile_1set_1maxsize':
../dist/../libdb_java/db_java_wrap.c:7297: error: `jlong' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7297: error: parse error before "arg2"
../dist/../libdb_java/db_java_wrap.c:7300: error: `jenv' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7301: error: `jcls' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7302: error: `jarg1' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7303: error: `arg2' undeclared (first use
in this function)
../dist/../libdb_java/db_java_wrap.c:7303: error: `jarg2' undeclared (first use
in this function)
make: *** [db_java_wrap.lo] Error 1

!!! ERROR: sys-libs/db-4.2.52_p2-r1 failed.
!!! Function src_compile, Line 91, Exitcode 2
!!! make failed
!!! If you need support, post the topmost build error, NOT this status message.


Now this becomes serious.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-12-14 07:55:17 UTC
We only support support ebuilds that are actually in portage. Using
java/java-config ebuilds from overlays, you are on your own. 
Comment 3 Wiktor Wandachowicz 2005-12-14 08:05:51 UTC
(In reply to comment #2)
> We only support support ebuilds that are actually in portage. Using
> java/java-config ebuilds from overlays, you are on your own. 

Yes I know. I'm just trying proactively to help with testing/using the
axxo-overlay, which contain the (slowly) upcoming changes to the Java
handling in Gentoo.

Please assign this bug to axxo or at least notify him of this issue.

/me reopening the bug in hope that the above is okay
Comment 4 Thomas Matthijs (RETIRED) gentoo-dev 2005-12-14 09:28:45 UTC
The switching is correct behavior
read 'prefered vm' section of 
http://gentooexperimental.org/svn/java/axxo-overlay/README/docs/java-user.html#
doc_chap3

The other error is because you are merging an ebuild not in the overlay
the overlay is always a bit behind the tree, can't update it every day, or week 
for that mather, so you have to be carefull what you merge.
Comment 5 Wiktor Wandachowicz 2005-12-14 13:21:15 UTC
Fully understood.

Thank you very much for the explanation.