Having trouble with new Java packages?

2007-02-28 16:24:37 PST

Tags: , ,

If you're updating some Java packages, like Azureus and its dependancies, and something fails spectacularly to build, the following prefix to emerge may fix that:

JAVA_PKG_FORCE_VM="sun-jdk-1.5" JAVA_PKG_BSFIX="off"  \
JAVA_PKG_FORCE_COMPILER="ecj-3.2" JAVA_PKG_FORCE_CFLAGS="-source 1.5  -target 1.5" \
emerge  ... -va

From what I can tell the problem stems from Java build scripts not specifying what version of Java they need and so Portage defaults to blackdown-java 1.4. Sadly, these packages need Java 1.5 for generics etc. The above command forces Portage to use Sun Java 1.5.

One Response to “Having trouble with new Java packages?”

  1. Petteri Räty Says:

    betelgeuse@pena /usr/portage/eclass $ grep JAVA_PKG_FORCE_CFLAGS *
    betelgeuse@pena /usr/portage/eclass $

    So I don’t think there is such a thing as JAVA_PKG_FORCE_CFLAGS. How about letting the Gentoo Java developers know about the bugs via http://bugs.gentoo.org or #gentoo-java on freenode? If something is using generics it should depend on >=virtual/jdk-1.5. If it depends on >=virtual/jdk-1.4, it’s a bug. But basically using JAVA_PKG_BSFIX=”off” will mean you are not going to get support from us because using that is more than likely to lead to class version issues at some point because the generated bytecode will be for example for 1.6 when you use sun-jdk-1.6 and it will then break if you some day go back to sun-jdk-1.5.

Leave a Reply

Valid XHTML 1.0!
Valid CSS!
Mindstab.net is proudly powered by WordPress
Entries (RSS) and Comments (RSS).
20 queries. 0.437 seconds.