Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 160845 - dev-java/ehcache-1.2.4 build failing as using 1.4 instead of required 1.5
Summary: dev-java/ehcache-1.2.4 build failing as using 1.4 instead of required 1.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-08 09:57 UTC by Alistair Bush (RETIRED)
Modified: 2007-01-17 00:44 UTC (History)
0 users

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


Attachments
add java5 use flag to ehcache (ehcache.patch,1.15 KB, patch)
2007-01-12 19:57 UTC, Alistair Bush (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alistair Bush (RETIRED) gentoo-dev 2007-01-08 09:57:00 UTC
dev-java/ehcache-1.2.4 should depend on >=virtual/jdk-1.5 instead of >=virtual/jdk-1.4

dev-java/ehcache-1.2.4 uses java.util.Queue which is only available since java 1.5

see http://java.sun.com/j2se/1.5.0/docs/api/java/util/Queue.html


compile output below

>>> Compiling source in /var/tmp/portage/dev-java/ehcache-1.2.4/work/ehcache-1.2.4 ...
./net/sf/ehcache/constructs/asynchronous/AsynchronousCommandExecutor.java:30: cannot resolve symbol
symbol  : class Queue
location: package util
import java.util.Queue;
                 ^
./net/sf/ehcache/constructs/asynchronous/AsynchronousCommandExecutor.java:342: cannot resolve symbol
symbol  : class Queue
location: class net.sf.ehcache.constructs.asynchronous.AsynchronousCommandExecutor
    private void remove(Queue queue, String uid, String reason) {


GENTOO_VM=blackdown-jdk-1.4.2  CLASSPATH="" JAVA_HOME="/opt/blackdown-jdk-1.4.2.03"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac"
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-01-08 12:01:31 UTC
from RELEASE_NOTES.txt:
ehcache supports 1.4, 1.5 and 1.6 at runtime. When compiling from source, the build process requires at least JDK1.5.

This means at runtime it probably switches implementations based on JDK version used. So we should stick to 1.4 bytecode and maybe have java5 useflag which would delete the offending classes?

Also the dependencies maybe be somehow off:
"Ehcache requires commons-logging from Apache's Jakarta project."

ebuild specifies more depends and concurrent-util isn't even used in the getjars call
Comment 2 Alistair Bush (RETIRED) gentoo-dev 2007-01-12 19:57:37 UTC
Created attachment 106723 [details, diff]
add java5 use flag to ehcache

This patch added a java5 use flag and also removes unrequired dependencies.
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-01-17 00:44:20 UTC
In the end I've decided not to add another ad-hoc local java5 useflag until we decide on some policy for these. So the jdk/jre dep is raised to 1.5 in ehcache-1.2.4-r1, but it's forcing 1.4 bytecode for compatibility. It's what upstream does anyway. Some people hate having 1.4 JDK, so why be shy and force installation of 1.5 when there's no big reason to.