Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 141940 - jaxme-0.3.1-r1 compiled with sun-jdk-1.5 breaks the compilation of dom4j-1.6.1-r1
Summary: jaxme-0.3.1-r1 compiled with sun-jdk-1.5 breaks the compilation of dom4j-1.6....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-27 15:16 UTC by Wiktor Wandachowicz
Modified: 2006-07-28 03:01 UTC (History)
1 user (show)

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


Attachments
jaxme-0.3.1-r1.ebuild.diff (jaxme-0.3.1-r1.ebuild.diff,863 bytes, patch)
2006-07-27 15:20 UTC, Wiktor Wandachowicz
Details | Diff
jaxme-dom4j-problems.txt plus emerge --info (jaxme-dom4j-problems.txt,17.35 KB, text/plain)
2006-07-28 00:30 UTC, Wiktor Wandachowicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wiktor Wandachowicz 2006-07-27 15:16:19 UTC
Recent upgrade, mixed results:

>>> Emerging (5 of 8) dev-java/jaxme-0.3.1-r1 to /
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * checking ws-jaxme-0.3.1-src.tar.gz ;-) ...                            [ ok ]
 * Using: sun-jdk-1.5
>>> Unpacking source...

...

BUILD SUCCESSFUL
Total time: 15 seconds
>>> Source compiled.
>>> Test phase [not enabled]: dev-java/jaxme-0.3.1-r1

>>> Install jaxme-0.3.1-r1 into /var/tmp/portage/jaxme-0.3.1-r1/image/ category dev-java
>>> Completed installing jaxme-0.3.1-r1 into /var/tmp/portage/jaxme-0.3.1-r1/image/

man:
>>> Merging dev-java/jaxme-0.3.1-r1 to /
--- /usr/
--- /usr/share/
--- /usr/share/jaxme/
>>> /usr/share/jaxme/package.env
--- /usr/share/jaxme/lib/
>>> /usr/share/jaxme/lib/jaxmepm.jar
>>> /usr/share/jaxme/lib/jaxme2-rt.jar
>>> /usr/share/jaxme/lib/jaxme2.jar
>>> /usr/share/jaxme/lib/jaxmejs.jar
>>> /usr/share/jaxme/lib/jaxmeapi.jar
>>> /usr/share/jaxme/lib/jaxmexs.jar
--- /usr/share/doc/
>>> /usr/share/doc/jaxme-0.3.1-r1/
>>> /usr/share/doc/jaxme-0.3.1-r1/NOTICE.gz
>>> Regenerating /etc/ld.so.cache...
>>> dev-java/jaxme-0.3.1-r1 merged.

 dev-java/jaxme
    selected: 0.3.1
   protected: 0.3.1-r1
     omitted: none

...

>>> Emerging (6 of 8) dev-java/dom4j-1.6.1-r1 to /
 * checking ebuild checksums ;-) ...                                                                                                                   [ ok ] * checking auxfile checksums ;-) ...                                                                                                                  [ ok ] * checking miscfile checksums ;-) ...                                                                                                                 [ ok ] * checking dom4j-1.6.1.tar.gz ;-) ...                                                                                                                 [ ok ] * Using: sun-jdk-1.4
>>> Unpacking source...
>>> Unpacking dom4j-1.6.1.tar.gz to /var/tmp/portage/dom4j-1.6.1-r1/work
tar: A lone zero block at 78061
>>> Source unpacked.
Rewriting ./build.xml
>>> Compiling source in /var/tmp/portage/dom4j-1.6.1-r1/work/dom4j-1.6.1 ...
Buildfile: build.xml

init:
     [echo] ----------- dom4j 1.6.1 [2005] ------------

clean:

init:
     [echo] ----------- dom4j 1.6.1 [2005] ------------

prepare:
    [mkdir] Created dir: /var/tmp/portage/dom4j-1.6.1-r1/work/dom4j-1.6.1/build

prepare-src:
    [mkdir] Created dir: /var/tmp/portage/dom4j-1.6.1-r1/work/dom4j-1.6.1/build/src
    [mkdir] Created dir: /var/tmp/portage/dom4j-1.6.1-r1/work/dom4j-1.6.1/build/classes
     [copy] Copying 179 files to /var/tmp/portage/dom4j-1.6.1-r1/work/dom4j-1.6.1/build/src

compile:
    [javac] Compiling 166 source files to /var/tmp/portage/dom4j-1.6.1-r1/work/dom4j-1.6.1/build/classes
    [javac] /var/tmp/portage/dom4j-1.6.1-r1/work/dom4j-1.6.1/build/src/org/dom4j/jaxb/JAXBSupport.java:12: cannot access javax.xml.bind.JAXBContext
    [javac] bad class file: /var/tmp/portage/dom4j-1.6.1-r1/work/dom4j-1.6.1/lib/jaxmeapi.jar(javax/xml/bind/JAXBContext.class)
    [javac] class file has wrong version 49.0, should be 48.0
    [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
    [javac] import javax.xml.bind.JAXBContext;
    [javac]                       ^
    [javac] 1 error


Apparently jaxmeapi.jar contains classes in Java 5.0 format, while dom4j
expects them to be in Java 1.4 format (just look at the error). I've already
found more information on dom4j in bug #75646 and bug #124049 but not being
sure if this broken dependency is known I decided to file a new bug report.

Even though I know about build JVM switching, this time something is wrong.
I've made a small modification to the jaxme's ebuild and it compiled fine
with sun-jdk-1.4. This way newer dom4j also compiled fine and that's the
reason for 'minor' severity of this bug.

But why was it needed in the first place?
Comment 1 Wiktor Wandachowicz 2006-07-27 15:20:53 UTC
Created attachment 92877 [details, diff]
jaxme-0.3.1-r1.ebuild.diff

RDEPEND and DEPEND modifications that limit jaxme to use {jre,jdk}-1.4*
instead of sun-jdk-1.5, even if the latter is installed.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-07-27 15:38:48 UTC
See http://www.gentoo.org/proj/en/java/java-upgrade.xml first.
Comment 3 Wiktor Wandachowicz 2006-07-27 23:29:45 UTC
(In reply to comment #2)
> See http://www.gentoo.org/proj/en/java/java-upgrade.xml first.

Ok, thanks. But I've migrated to Generation-2 a long time ago, when it was
still called migration-overlay - see gentoo-java mailing archives for example:
http://news.gmane.org/gmane.linux.gentoo.java

Both ebuilds, jaxme-0.3.1-r1.ebuild and dom4j-1.6.1-r1 were commited yesterday:
* http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/jaxme/
* http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/dom4j/

However, there are some unexpected interdependencies. Namely, dom4j is being built with jdk-1.4 and it depends on jaxme which happens to be compiled with jdk-1.5. Obviously, it cannot work.

> But why was it needed in the first place?

Let me rephrase that: why was my local modification needed, when build-time JVM switching is already in place? I'd be more than happy if my "patch" was not necessary at all.


I'll try to reproduce the bug on another machine and let you know how it went.
Here's my current configuration from the first test system, ~x86:

# equery list sun-jdk
[ Searching for package 'sun-jdk' in all categories among: ]
 * installed packages
[I--] [ ~] dev-java/sun-jdk-1.4.2.12 (1.4)
[I--] [ ~] dev-java/sun-jdk-1.5.0.07-r1 (1.5)

# java-config-1 -L
[sun-jdk-1.4.2.12] "Sun JDK 1.4.2.12" (/etc/env.d/java/20sun-jdk-1.4.2.12) *

# java-config-2 -L
1) Sun JDK 1.4.2.12 [sun-jdk-1.4] (/usr/share/java-config-2/vm/sun-jdk-1.4)
*) Sun JDK 1.5.0.07 [sun-jdk-1.5] (/usr/share/java-config-2/vm/sun-jdk-1.5)


# equery which jaxme
/usr/portage/dev-java/jaxme/jaxme-0.3.1-r1.ebuild

# grep inherit `equery which jaxme`
inherit java-pkg-2 java-ant-2 eutils

# equery which dom4j
/usr/portage/dev-java/dom4j/dom4j-1.6.1-r1.ebuild

# grep inherit `equery which dom4j`
inherit java-pkg-2 java-ant-2
Comment 4 Wiktor Wandachowicz 2006-07-28 00:30:22 UTC
Created attachment 92894 [details]
jaxme-dom4j-problems.txt plus emerge --info

Alas, the problem persists. Here's a listing of packages and the output of interesting errors. This is the result of emerging dom4j cleanly - as a new package on this second (~amd64) machine.

On the first machine there was tomcat installed and both jaxme and dom4j packages were its dependencies. So a problem raised when they were upgraded simultaneously.
Comment 5 Wiktor Wandachowicz 2006-07-28 00:32:59 UTC
Tested on two independent installations. Reopening, as the problem is not related to the Java upgrade procedure.
Comment 6 Wiktor Wandachowicz 2006-07-28 00:35:19 UTC
CC'ing Krzysiek Pawlik in hope that he can do something about it.
Comment 7 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-07-28 01:21:10 UTC
jaxme uses build<foo>.xml files - I've modified java-ant-2.eclass a bit and the ebuild works now ok - all build files got rewritten.
Comment 8 Wiktor Wandachowicz 2006-07-28 03:01:06 UTC
Thanks, that fixed the issue.

# emerge --sync
# emerge -avC jaxme
# emerge -av dom4j

... and all is fine. Good job!