Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40761 - sys-libs/db + USE="java"
Summary: sys-libs/db + USE="java"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Paul de Vrieze (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-07 14:36 UTC by Spider (RETIRED)
Modified: 2004-04-26 04:44 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 Spider (RETIRED) gentoo-dev 2004-02-07 14:36:25 UTC
i think this package has a misused case of DEPEND vs RDEPEND.

This is whats installed with USE="java"

sys-libs/db-4.1.25_p1-r3 *
CONTENTS:
/usr
/usr/include
/usr/include/db4.1
/usr/include/db4.1/cxx_common.h
/usr/include/db4.1/cxx_except.h
/usr/include/db4.1/db.h
/usr/include/db4.1/db_185.h
/usr/include/db4.1/db_cxx.h
/usr/lib
/usr/lib/libdb-4.1.so
/usr/lib/libdb-4.1.la
/usr/lib/libdb_cxx-4.1.so
/usr/lib/libdb_cxx-4.1.la
/usr/lib/libdb_java-4.1.so
/usr/lib/libdb_java-4.1.la
/usr/lib/libdb_tcl-4.1.so
/usr/lib/libdb_tcl-4.1.la
/usr/lib/libdb-4.1.a
/usr/lib/libdb_cxx-4.1.a
/usr/lib/libdb_java-4.1.a
/usr/lib/libdb_tcl-4.1.a
/usr/lib/libdb.so -> libdb-4.1.so
/usr/lib/libdb_cxx.so -> libdb_cxx-4.1.so
/usr/lib/libdb_tcl.so -> libdb_tcl-4.1.so
/usr/lib/libdb_java.so -> libdb_java-4.1.so
/usr/lib/libdb.a -> libdb-4.1.a
/usr/lib/libdb_cxx.a -> libdb_cxx-4.1.a
/usr/lib/libdb_tcl.a -> libdb_tcl-4.1.a
/usr/lib/libdb_java.a -> libdb_java-4.1.a
/usr/lib/db-4.1.jar
/usr/bin
/usr/bin/db4.1_deadlock
/usr/bin/db4.1_dump
/usr/bin/db4.1_load
/usr/bin/db4.1_printlog
/usr/bin/db4.1_recover
/usr/bin/db4.1_stat
/usr/bin/db4.1_verify
/usr/bin/db4.1_archive
/usr/bin/db4.1_checkpoint
/usr/bin/db4.1_upgrade
/usr/sbin
/usr/sbin/berkeley_db41_svc
/usr/include/db.h -> db4.1/db.h
/usr/include/db_185.h -> db4.1/db_185.h

Nothing here seems to require the RDEPEND of jdk.
DEPEND="tcltk? ( dev-lang/tcl )
        java? ( virtual/jdk )"



I'd suggest a change here to be:

DEPEND="tcltk? ( dev-lang/tcl )
        java? ( virtual/jdk )"

RDEPEND="tcltk? ( dev-lang/tcl )
        java? ( virtual/jre )"


As this would fit better for end user systems.
Comment 1 Paul de Vrieze (RETIRED) gentoo-dev 2004-02-08 04:28:09 UTC
You are probably correct. I'll change it
Comment 2 Adrian Almenar 2004-02-19 19:38:37 UTC
i dont agree with this change to compile the java part of db, you need a jdk not a jre.
Comment 3 Paul de Vrieze (RETIRED) gentoo-dev 2004-02-20 03:39:25 UTC
The dependency will require a jdk when compiling, but only a jre when running (allthough it probably does not make that much sense as as far as I know, there are no packages that actually use the db java bindings (so a jdk would be needed anyway).
Comment 4 Spider (RETIRED) gentoo-dev 2004-02-20 04:09:36 UTC
Well here's the logic:
all jdk's provide a jre.
to build this you need a jdk.
To build something against this, you need a jdk.

To use this, you need a jre. (Well, not really?)
To use something built against it, you need a jre.

Comment 5 Sandro Bonazzola (RETIRED) gentoo-dev 2004-04-22 10:44:24 UTC
It's not quite true.
A JDK or a JRE is not strictly required. GCC is sufficient in order to build db 4 with java flag enabled.
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 Paul de Vrieze (RETIRED) gentoo-dev 2004-04-26 04:38:56 UTC
I see this as a java-config bug. At the moment that gcc provides a functional equivalent to any other jdk, there should be no problem to use it. Currently however using gcj is not straightforward at all and environment variables need to be used. Further the gcj class library is not up to specs with respect to an official jdk. Also native bindings might not work as expected.

The solution would be to have gcc or a separate ebuild provide a set of scripts that wrap the gcj binaries into the names used by other jdk's. At that point it would be possible to set java to gcj in java-config and have db's java support be build by gcj. Note however that this will probably be an unsupported setup until gcj's library will be more or less equivalent to sun's.
Comment 7 Paul de Vrieze (RETIRED) gentoo-dev 2004-04-26 04:44:31 UTC
The change is in the package, so closing the bug