Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26368 - sys-libs/db requires jar
Summary: sys-libs/db requires jar
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Paul de Vrieze (RETIRED)
URL:
Whiteboard:
Keywords:
: 27884 28529 30560 31443 31779 (view as bug list)
Depends on: 30562
Blocks: db4
  Show dependency tree
 
Reported: 2003-08-10 19:15 UTC by Aron Griffis (RETIRED)
Modified: 2004-01-22 13:20 UTC (History)
7 users (show)

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


Attachments
Updated ebuild to build properly when a JRE is selected as the user's current Java VM. (db-4.0.14-r2) (db-4.0.14-r2.ebuild,3.10 KB, text/plain)
2003-10-19 20:19 UTC, Lyle Hanson
Details
Updated ebuild to build properly when a JRE is selected as the user's Java VM (db-4.1.25) (db-4.1.25.ebuild,3.62 KB, text/plain)
2003-10-19 20:24 UTC, Lyle Hanson
Details
Updated ebuild to build properly when a JRE is selected as the user's Java VM (db-4.1.25_p1-r1) (db-4.1.25_p1-r1.ebuild,3.15 KB, text/plain)
2003-10-19 20:55 UTC, Lyle Hanson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Griffis (RETIRED) gentoo-dev 2003-08-10 19:15:23 UTC
...
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 SOSUFFIX from libtool... so
checking for javac... no
checking for gcj... gcj -C
checking if gcj -C works... yes
checking for jar... no
configure: error: no acceptable jar program found in $PATH

!!! ERROR: sys-libs/db-4.0.14 failed.
!!! Function src_compile, Line 45, Exitcode 1
!!! (no error message)

-------------------------------------------------------------
Portage 2.0.48-r7 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20-gaming-r5 i686 AMD Athlon(tm) Processor
GENTOO_MIRRORS="http://gentoo.linux.no/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/"
CONFIG_PROTECT_MASK="/etc/ethereal /etc/gnome-vfs-2.0 /etc/gtk-2.0 /etc/init.d
/etc/pam.d /etc/postfix/sample /etc/sound /etc/X11/app-defaults /etc/X11/gdm
/etc/X11/rstart /etc/X11/serverconfig /etc/X11/Sessions /etc/X11/starthere
/etc/X11/sysconfig /etc/X11/xdm /etc/X11/xinit /etc/X11/xkb /etc/gconf /etc/env.d"
PORTDIR="/usr/local/home/agriffis/portage"
DISTDIR="/usr/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm avi crypt cups encode foomaticdb gif jpeg mad mikmod mmx
mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml
alsa gdbm berkdb readline tetex bonobo tcltk java guile X sdl tcpd pam libwww
ssl imlib oggvorbis gnome gtk qt opengl mozilla cdr scanner -arts -esd -gpm -kde
-motif -slang -svga cscope decss dvd gtk2 imap lcms libg++ mozcalendar ofx pda
perl python ruby tiff wmf"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j4"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache distcc cvs keepwork userpriv usersandbox"
Comment 1 Adrian Almenar 2003-08-10 21:22:53 UTC
Can you give us an output of java-config --list-available-vms ?? 
Comment 2 Paul de Vrieze (RETIRED) gentoo-dev 2003-08-11 01:31:30 UTC
Your useflags specify java support, but apparently it is not available. Please specify the right jdk with java-config and then run rc-update
Comment 3 Serge Matveev 2003-08-11 02:12:20 UTC
I have same problem:

$ java-config --list-available-vms
 [blackdown-jdk-1.4.1] Blackdown JDK 1.4.1 (/etc/env.d/java/20blackdown-jdk-1.4.1) ()
$ cat /etc/env.d/java/20blackdown-jdk-1.4.1
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Karl Trygve Kalleberg
# Maintainer: Tools Team <tools@gentoo.org>
# $Header: /home/cvsroot/gentoo-x86/dev-java/blackdown-jdk/files/blackdown-jdk-1.4.1,v 1.1 2003/02/18 10:05:00 cretin Exp $

VERSION="Blackdown JDK 1.4.1"
JAVA_HOME=/opt/blackdown-jdk-1.4.1
CLASSPATH=/opt/blackdown-jdk-1.4.1/jre/lib/rt.jar:.
JDK_HOME=/opt/blackdown-jdk-1.4.1
JAVAC=${JAVA_HOME}/bin/javac
ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
ADDLDPATH="/opt/blackdown-jdk-1.4.1/jre/lib/i386/:/opt/blackdown-jdk-1.4.1/jre/lib/i386/native_threads/"
MANPATH=/opt/blackdown-jdk-1.4.1/man
ENV_VARS="JAVA_HOME CLASSPATH JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH"

Comment 4 Adrian Almenar 2003-08-11 05:44:38 UTC
As root: 
- Run java-config --set-system-vm=blackdown-jdk-1.4.1. 
- Do source /etc/profile 
- emerge db 
Comment 5 Grant Goodyear (RETIRED) gentoo-dev 2003-08-11 07:38:42 UTC
It used to be the case that emerging the first jdk or jre automatically set
the necessary java settings for that jdk/jre.  Did that go away by design,
and should it have?  
Comment 6 Adrian Almenar 2003-08-11 09:30:42 UTC
Theres a problem with setting the java VM, im still lokking at it, but i dont have enought time to work on it, and also finish the new java-config that should fix some bugs that the old version has.

If anyone its interested in helping out on that issue, should be great, then contact me and i can guide you through some of the issues of this.
Comment 7 Aron Griffis (RETIRED) gentoo-dev 2003-08-12 07:35:42 UTC
FYI, I have USE=java but I've never intentionally emerged anything java related.  My assumption is that things should "just work" in that case, not requiring any additional commands from me.  I'm willing to enter some extra java-config commands to repair my own installation, but IMHO it shouldn't be considered a resolution to this bug.

# java-config --list-available-vms
 [blackdown-jre-1.4.1] Blackdown JRE 1.4.1 (/etc/env.d/java/20blackdown-jre-1.4.1) (*)
 [blackdown-jdk-1.4.1] Blackdown JDK 1.4.1 (/etc/env.d/java/20blackdown-jdk-1.4.1) ()

# java-config --set-system-vm=blackdown-jdk-1.4.1

At this point emerging db-4.0.14 works correctly.  Thanks!  Why didn't it work when set to the JRE?
Comment 8 Adrian Almenar 2003-08-12 08:27:34 UTC
Its because you need a JDK to compile JRE doesnt have javac (Java Compiler) so maybe thats the problem.

Also i think its caused cause your default VM its a JRE and not JDK.

I dont know how we can solve this if the user by default has a JRE.

Remove JRE's from portage and use JDK for everyone, in the end the difference is that one has javac and the other no.

Suggestions ???
Comment 9 SpanKY gentoo-dev 2003-09-04 04:31:18 UTC
*** Bug 27884 has been marked as a duplicate of this bug. ***
Comment 10 Hartwig Brandl 2003-09-15 10:02:34 UTC
I'm having the exact same problem.
The JRE was previously installed as some dependency, and was thus selected as my VM.

The work-around worked for me.
Comment 11 Mike666 2003-09-20 22:00:42 UTC
For what it's worth: Comment #7 got me through the problem.
Thank you very much!

Ever since I got Gentoo1.4 I've never emerged anything Java-related but still somehow I had Blackdown's JDK and JRE without my SPECIFIC knowledge (I had to look around to find out. If I we're a novice maybe I'd never find out.)

Comment 12 Guy 2003-09-21 05:33:49 UTC
I've run into the same problem myself. 
 
On my personal machines, the system-vm was set = blackdown-jdk-1.4.1. However, 
on my mother's machine, the system-vm was set = blackdown-jre-1.4.1. This is 
strange to me because I built all these systems and there should be no 
significant differences. 
 
And of course, any ebuild requiring the use of the java compiler (JAVAC) would 
not run on her machine. I fixed it by using java-config to set/reset from jre 
to jdk. 
 
What I don't understand is 
 
1} Why her machine was using jre to begin with. 
 
2} The error message is about not being able to find a valid 'jar' file. 
CLASSPATH is identical between the jre and jdk environment settings. The 
message should refer to a lack of JAVAC. 
 
3} If you're a java developer {I'm not} and you set user-vm to java-jdk, 
shouldn't the JAVAC environmental variable be added to your environment? It 
wasn't during my testing of java-config. 
 
:-) 
 
 
Comment 13 Paul de Vrieze (RETIRED) gentoo-dev 2003-10-07 06:05:59 UTC
*** Bug 30560 has been marked as a duplicate of this bug. ***
Comment 14 Lyle Hanson 2003-10-18 18:24:16 UTC
*** Bug 31443 has been marked as a duplicate of this bug. ***
Comment 15 Lyle Hanson 2003-10-18 22:08:34 UTC
I've just noticed the same problem, and was able to compile and emerge db
by selecting a JDK rather than a JRE as my vm.  The problem that remains,
however, seems to be that the db ebuild should not depend on the user's currently
selected vm; it should be able to find the path to a JDK so it can use javac,
jar, etc.  Just because a user has a certain JRE selected as their preferred
vm doesn't mean the programs that the db ebuild wants to use aren't available
to it, right?

So a proposed solution involves looking in /etc/env.d/java/ for a JDK and
grabbing its JDK_HOME to use in the ebuild's PATH.  It would then find 'jar'
and happily build.  An alternative would be to exit with a message asking
the user to select a JDK and re-try the emerge.
Comment 16 Lyle Hanson 2003-10-19 20:19:57 UTC
Created attachment 19508 [details]
Updated ebuild to build properly when a JRE is selected as the user's current Java VM. (db-4.0.14-r2)

This updated ebuild (db-4.0.14-r2) checks /etc/env.d/java/ for an installed
JDK
to use for building if USE=java is defined.  Previously, the build would
die in
./configure if the user's JDK wasn't in the $PATH.

Hopefully this functionality will eventually be available in java-config,
see
Bug <a href="http://bugs.gentoo.org/show_bug.cgi?id=30562">30562</a>.
Comment 17 Lyle Hanson 2003-10-19 20:24:16 UTC
Created attachment 19509 [details]
Updated ebuild to build properly when a JRE is selected as the user's Java VM (db-4.1.25)

Same as last comment, except this ebuild is for db-4.1.25.
Comment 18 Lyle Hanson 2003-10-19 20:55:46 UTC
Created attachment 19510 [details]
Updated ebuild to build properly when a JRE is selected as the user's Java VM (db-4.1.25_p1-r1)

This is a newer ebuild than db-4.1.25.	Didn't catch that at first.
Comment 19 Martin Holzer (RETIRED) gentoo-dev 2003-12-07 17:01:21 UTC
*** Bug 28529 has been marked as a duplicate of this bug. ***
Comment 20 Martin Holzer (RETIRED) gentoo-dev 2003-12-07 17:02:36 UTC
*** Bug 31779 has been marked as a duplicate of this bug. ***
Comment 21 Stephen Torri 2003-12-08 07:15:59 UTC
The steps provided here do not clear up the issue I have building db. On a machine which I have attempted to have a non-X box because it is a firewall I get an error about db.jar:

gcc -c -I. -I../dist/../include -I../dist/../include_auto -D_GNU_SOURCE -D_REENTRANT -I/opt/blackdown-jdk-1.4.1/include -I/opt/blackdown-jdk-1.4.1/include/linux -march=pentium2 -O3 -pipe ../dist/../common/util_sig.c  -fPIC -DPIC -o .libs/util_sig.lo
cd ./classes && jar cf ../db.jar com/sleepycat/db
make: *** [db.jar] Error 137
make: *** Waiting for unfinished jobs....


I only have one jdk installed:
storri@firewall storri $ java-config --list-available-vms
[blackdown-jdk-1.4.1] "Blackdown JDK 1.4.1" (/etc/env.d/java/20blackdown-jdk-1.4.1) *

The USE flags are:

storri@firewall storri $ sudo emerge info
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.20-gentoo-r9)
=================================================================
System uname: 2.4.20-gentoo-r9 i686 Pentium II (Deschutes)
Gentoo Base System version 1.4.3.10p1
distcc 2.11.1 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium2 -O3 -pipe"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium2 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 apm arts crypt encode foomaticdb gif jpeg libg++ libwww mad mikmod mmx ncurses nls pdflib png spell svga xml2 zlib gdbm berkdb slang readline mysql gpm tcpd pam ssl sasl perl python ldap kerberos java"
Comment 22 Paul de Vrieze (RETIRED) gentoo-dev 2003-12-13 05:56:38 UTC
stephen, some more output would be helpfull here. I have not really any idea what error 137 is, so without any more elaborate error messages I can't do much
Comment 23 Stephen Torri 2003-12-13 15:02:01 UTC
My present status is:

Blackdown-jdk-1.4.1 installed.

firewall root # java-config -L
[blackdown-jdk-1.4.1] "Blackdown JDK 1.4.1" (/etc/env.d/java/20blackdown-jdk-1.4.1) *

Error message that gives Error 137:

gcc -c -I. -I../dist/../include -I../dist/../include_auto -D_GNU_SOURCE -D_REENTRANT -I/opt/blackdown-jdk-1.4.1/include -I/opt/blackdown-jdk-1.4.1/include/linux -march=pentium2 -O3 -pipe ../dist/../db_checkpoint/db_checkpoint.c  -fPIC -DPIC -o .libs/db_checkpoint.lo
cd ./classes && jar cf ../db.jar com/sleepycat/db
make: *** [db.jar] Error 137
make: *** Waiting for unfinished jobs....

This was reported at the end of the emerge messages:

   !!! ERROR: sys-libs/db-4.0.14-r2 failed.
   !!! Function src_compile, Line 74, Exitcode 2
   !!! (no error message)

In reference to the why make reported the value:

     These errors are not really `make' errors at all.  They mean that a
     program that `make' invoked as part of a command script returned a
     non-0 error code (`Error NN'), which `make' interprets as failure,
     or it exited in some other abnormal fashion (with a signal of some
     type).  *Note Errors in Commands: Errors.

The last command executed was 'jar'. There is no 'db.jar' in the build_unix/classes directory. Running the command as stated above results in 
the message "Killed" being reported to the command line.

Comment 24 Paul de Vrieze (RETIRED) gentoo-dev 2004-01-22 13:20:14 UTC
I know that it are not make errors, but I can't really determine what they are. As the original bug should be fixed by now I'll close the bug