Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40775 - sys-libs/db-4.1.25_p1-r3 problems with USE="java" selected: "configure: error: no acceptable jar program found in $PATH"
Summary: sys-libs/db-4.1.25_p1-r3 problems with USE="java" selected: "configure: error...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Paul de Vrieze (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-07 18:22 UTC by hodak
Modified: 2006-06-05 13:43 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 hodak 2004-02-07 18:22:18 UTC
I know that there are already bug reports with this problem, but all that are found are closed. The fix seems to be to use java-config to use jdk instead of jre. This works fine. But the point of this bug report is that if db can be built only with jdk then ebuild should check if jdk is selected and if not it should prompt user to run java-conf and then retry emerging db. Or something similar, at least einfo message, in current form the no acceptable jar program message will confuse many people.
BTW, I do not know about java, but is it not possible to use jdk directly regardless of whatever java-config points to?

Reproducible: Always
Steps to Reproduce:
1.emerge -upD world
2.
3.

Actual Results:  
configure: error: no acceptable jar program found in $PATH

!!! ERROR: sys-libs/db-4.1.25_p1-r3 failed.
!!! Function src_compile, Line 95, Exitcode 1
!!! (no error message) 

Expected Results:  
db should emerge without problems

emerge info

Portage 2.0.50 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.22-gentoo-r5)
=================================================================
System uname: 2.4.22-gentoo-r5 i686 AMD Athlon(TM) XP 2400+
Gentoo Base System version 1.4.3.10
Autoconf: sys-devel/autoconf-2.58
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="rsync://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo
ftp://gentoo.noved.org/ http://adelie.polymtl.ca/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib apm avi berkdb cdr crypt cups directfb encode esd fbcon fftw
foomaticdb gdbm gif gnome gpm gtk gtk2 guile imlib java javascript jpeg ldap
libg++ libwww mad mikmod motif mozilla mpeg ncurses nls oggvorbis opengl oss pam
pdflib perl png python quicktime readline sdl slang spell ssl svga tcltk tcpd
tetex truetype x86 xml2 xmms xv zlib"
Comment 1 Paul de Vrieze (RETIRED) gentoo-dev 2004-02-08 05:11:42 UTC
Most of the time there is no point to have a JRE when you allready have a JDK, but I'll look into using java-config to get the jdk location and build the path
Comment 2 Mark Knecht 2004-02-24 18:06:47 UTC
I'm having this problem on two machines, but I cannot find the closed bugs discussed in the first line of this post, and I guess I need to know how to use java-config to get around this or better yet get it fixed.

Is anyone making headway?

Thanks!
Comment 3 hodak 2004-02-24 18:25:07 UTC
The bug reports I meant were 26639 and 26368. 
But the solution (or better workaround) is to use jdk instead of jre. If I am not mistaken jre is not needed when jdk is installed, so umerging jre should solve problem (without using java-config, which BTW is trivial). 
Comment 4 Paul de Vrieze (RETIRED) gentoo-dev 2004-02-25 13:02:09 UTC
You are right the jdk is a superset of a jre. In most cases one would want to have a jdk installed. A jre is mostly usefull if you are bandwidth or space constrained and only want to be able to view applets.
Comment 5 Sandro Bonazzola (RETIRED) gentoo-dev 2004-04-22 10:47:36 UTC
As I've discussed in bug #40761 a jdk or a jre is not required in order to compile db-4 with java support. 
Here is the procedure with gentoo 2004.0, gcc with java support enabled:
USE=java emerge gcc
ln -s /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include \ 
/usr/i686-pc-linux-gnu/gcc-bin/3.3/include
JAVACFLAGS="-C" JAVA_HOME="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3" JAR=gcj-jar JAVAC=gcj emerge -O db

avoiding 180Mb download....
So, in the ebuild for db-4 it's not necessary any JDK or JRE.
There's another bugs that hurt me: java-config does not recognize gcc as a complete jdk/jre. gij, gcj and gcj-jar are equivalent to any javac, java, jar command. Free to use your preferred compiler :-)
-- 
Sandro
Comment 6 Sandro Bonazzola (RETIRED) gentoo-dev 2004-04-22 11:04:57 UTC
Just an additional note: sys-libs/db-4.x may improve the selection of an available java compiler / interpreter / jar, just adding a test for gcj, gij, gcj-jar in the configure script.
-- 
Sandro
Comment 7 Paul de Vrieze (RETIRED) gentoo-dev 2004-04-26 04:46:36 UTC
Adding tests in a configure script provided by a package is allways cumbersome. I would prefer a virtual jdk as described in bug #40761
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-06-05 05:12:15 UTC
About time to close this? Attempts to compile anything against JRE are pretty much futile, you can't do that. java-config moans pretty loud about this, after all. PEBKAC is not exactly an ebuild bug.
Comment 9 Paul de Vrieze (RETIRED) gentoo-dev 2006-06-05 13:43:59 UTC
Agreed. Perhaps at some point in the future gcj will function as a proper jdk and this will work. Until then, just use a jdk.