I have tried to update dev-java/xalan from 2.5.2 to 2.6.0. It fails no matter which version of Java I have installed. I have currently tested with: sun-jdk-1.5.0 blackdown-jdk-1.4.2_rc1 blackdown-jdk-1.4.1 All fail. Reproducible: Always Steps to Reproduce: Just do "emerge dev-java/xalan" Actual Results: >>> emerge (1 of 1) dev-java/xalan-2.6.0 to / >>> md5 src_uri ;-) xalan-j_2_6_0-src.tar.gz >>> Unpacking source... >>> Unpacking xalan-j_2_6_0-src.tar.gz to /var/tmp/portage/xalan-2.6.0/work tar: A lone zero block at 36857 >>> Source unpacked. Buildfile: build.xml prepare: [echo] Project:Xalan-Java version:2_6_0 build.xml $Revision: 1.206 $ [mkdir] Created dir: /var/tmp/portage/xalan-2.6.0/work/xalan-j_2_6_0/build [mkdir] Created dir: /var/tmp/portage/xalan-2.6.0/work/xalan-j_2_6_0/build/classes xml.compile: [echo] Compiling DTM implementation and utilities BUILD FAILED java.lang.UnsupportedClassVersionError: junit/framework/Test (Unsupported major. minor version 49.0) Total time: 14 seconds !!! ERROR: dev-java/xalan-2.6.0 failed. !!! Function src_compile, Line 33, Exitcode 1 !!! build failed !!! If you need support, post the topmost build error, NOT this status message. Expected Results: The package should have been installed. I did try with latest stable portage. There is no change in the problem with Xalan with either version of portage. Portage 2.0.51_rc9 (default-x86-1.4, gcc-3.4.1, glibc-2.3.4.20040808-r1, 2.6.9-rc2-mm1 i686) =================================================== ============== System uname: 2.6.9-rc2-mm1 i686 Pentium III (Katmai) Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 Headers: sys-kernel/linux26-headers-2.6.8.1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/ share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/ bind /var/qmail/alias /var/qmail/control /var/vpopmail/domains /var/vpopmail/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox" GENTOO_MIRRORS="http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://ftp.ipv6. uni-muenster.de/pub/linux/distributions/gentoo ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp. uninett.no/pub/linux/Gentoo http://ds.thn.htu.se/linux/gentoo http://mirror.pudas.net/ gentoo ftp://mirror.pudas.net/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://vlaai.snt.ipv6.utwente.nl/gentoo-portage" USE="X aavm accessibility acpi apache2 avi bcmath berkdb bitmap-fonts bzlib calendar crypt ctype curl dba dio encode esd exif extensions f77 fam flac flash foomaticdb ftp gd gdbm gif gmp gnome gnutls gpm gtk gtk2 hal howl imap imlib ipv6 jabber java javascript jce jikes jpeg ldap libg++ libwww mad maildir mhash mikmod ming mmx motif mozilla mpeg msn mysql ncurses nls nntp nptl oggvorbis opengl oscar pam pcntl pcre pdflib perl pic png posix python qt quicktime readline samba sasl sdl session shared simplexml slang snmp sockets spell spl ssh ssl svga tcltk tcpd tidy tiff truetype unicode x86 xml xml2 xmlrpc xmms xprint xsl xv yahoo zlib"
you compiled things with 1.5, now those things won't work with 1.4, and some things don't compile with 1.5, you used package.unmask and successfully shot yourself in the food
I am not sure I understand. I haven't unmasked or added ~x86 keyword to xalan. Only to jdk 1.5.0 which I wanted to test to see if this was the problem.
I have installed sun-jdk-1.5.0 (OK, IT IS ~AMD64, just listen a bit more :-) and when I tried to compile Xalan 2.6.0 *today* (nov 19th, 2004) it failed with an error that target 1.1 is not source-compatible with 1.5. This can be resolved by modifying build.xml file: 1) add the attribute source='1.3' to element 'javac' at line 266 (255? I don't remember :). However this opens a new bug: Xalan 2.6.0 is compatible ONLY with DOM Level 2, whereas Java 5.0 introduces DOM Level 3 library. 2) This *could* be resolved by downloading DOM Level 2 jar and modifying element baselibraries (or like that, just below the javac element) to a value like: "../path/to/dom.jar:xalan.base.libraries". I'm going to investigate more to this issue. I suggest that the bug is reopened because it seems that the bug is not ~-related.
Created attachment 44285 [details] JAXP API obviously containing older version of javax.transform package.
Created attachment 44286 [details] DOM Level 2 implementation Java 5.0 introduces DOM Level 3 and Xalan does not like that. DOM Level 2 is required to compile Xalan.
I finally made it to emerge Xalan on Java 1.5, yahooo :). I had no problems with the "Unsupported major. minor version 49.0" bug at all, and I have resolved all bugs that I encountered. Here is what I did: 1) /var/tmp/portage/xalan-2.6.0/work/xalan-j_2_6_0/build.xml:256 add attribute source="1.3" to the javac element. This forces the compiler to be source-compatible with java 1.3 (assert is not a keyword, etc). 2) :187 JAVA 1.5 ONLY, I GUESS insert elements <pathelement path="/home/vyzivus/jwsdp-1.4/jaxp/lib/endorsed/dom.jar"/> <pathelement path="/home/vyzivus/jwsdp-1.4/jaxp/lib/jaxp-api.jar"/> before the element that is already on that line. I am posting those two JARs as attachments. dom.jar is DOM Level 2 jar file, and jaxp-api.jar contains older version of javax.transform package. Both are taken from JWSDP-1.4, that is freely available at SUN pages. This may be a problem because of SUN's license - you must agree to some license before downloading JWSDP. The license appears to be the same license as the sun-jdk-1.5.0 license. Interesting is that these two libs seems NOT required for running xalan :-) 3) :291 add attribute source="1.3" to the javac element 4) why not add this script /usr/bin/xalan containing only a single line java -jar /usr/share/xalan/lib/xalan.jar $* the script would allow us to use xalan in shell. I have resolved the issue hence I *strongly* encourage to reopen the bug. Thanx
Created attachment 45550 [details, diff] patch to fix build.xml to explicitly specify the source and target for javac The attached patch modifies the build.xml by adding a javac.target propery which defaults to 1.3 and forces all javac targets to use it. The code compiles with jdk1.5 also if the target is 1.4 or 1.5 but I think for now it's enough that the target is something that can be used with multiple jdk version. In the future we could modify the target to depend on the jdk used. I would also strongly like to ask someone to reopen this bug as the current ebuild does not build at least with amd64/jdk1.5.0. To use the patch this must be added to the ebuild: src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/xalan-jdk15.patch }
The above patch works also with xalan-2.6.0-r1, just add the epatch line after the cd ${S} line in the src_unpack() function.
I'd like to ask why the bug is marked as invalid? The bug is real - try to emerge xalan on jdk15, and the bug seems to have been fixed. Is the fix in portage yet?
Yes, The patch seem to work. At least it could be uncluded in portage but be masked by ~arch or something like that for now?
The patch works for xalan-2.6.0-r2. I suggest to apply the patch when compiling xalan on java version 5.0.
*** Bug 90699 has been marked as a duplicate of this bug. ***
patch works perfectly. please apply to portage tree
I was able to get this to build with jdk 1.5 using the patch attached above. I copied the 2.6.0-r2 ebuild, and made a new one. I had to add epatch ${FILESDIR}/xalan-jdk15.patch to the end of src_unpack (as mentioned above), but I also had to remove the goofy rm -f *.jar from line 34 of the ebuild, since that was deleting the jars that the patch tries to use.
I second the previous posts. I was able to compile xalan-2.6.0-r2 just fine under sun-jdk-1.5.0 using the patch from comment #7, so the solution mentioned in comment #14 should lead to the improved ebuild xalan-2.6.0-r3. Please reconsider creating a new ebuild. Everything what's needed is already in this bug report!
the patch fixed it for me too ... pls add to curent tree!
Hi, I also got errors compiling xalan-2.6.0-r2 on my AMD64. Here are the errors : [javac] WARNING [javac] The -source switch defaults to 1.5 in JDK 1.5. [javac] If you specify -target 1.1 you now must also specify -source 1.2. [javac] Ant will implicitly add -source 1.2 for you. Please change your build file. [javac] /var/tmp/portage/xalan-2.6.0-r2/work/xalan-j_2_6_0/src/org/apache/xml/utils/XMLString.java:610: warning: unmappable character for encoding UTF8 [javac] * "Fahrvergn�gen".toUpperCase() returns "FAHRVERGN�GEN" [javac] ^ [javac] /var/tmp/portage/xalan-2.6.0-r2/work/xalan-j_2_6_0/src/org/apache/xml/utils/XMLString.java:610: warning: unmappable character for encoding UTF8 [javac] * "Fahrvergn�gen".toUpperCase() returns "FAHRVERGN�GEN" [javac] ^ [javac] /var/tmp/portage/xalan-2.6.0-r2/work/xalan-j_2_6_0/src/org/apache/xml/utils/XMLStringDefault.java:716: warning: unmappable character for encoding UTF8 [javac] * "Fahrvergn�gen".toUpperCase() returns "FAHRVERGN�GEN" [javac] ^ [javac] /var/tmp/portage/xalan-2.6.0-r2/work/xalan-j_2_6_0/src/org/apache/xml/utils/XMLStringDefault.java:716: warning: unmappable character for encoding UTF8 [javac] * "Fahrvergn�gen".toUpperCase() returns "FAHRVERGN�GEN" [javac] ^ [javac] /var/tmp/portage/xalan-2.6.0-r2/work/xalan-j_2_6_0/src/org/apache/xml/dtm/ref/DTMNodeProxy.java:54: org.apache.xml.dtm.ref.DTMNodeProxy is not abstract and does not override abstract method getUserData(java.lang.String) in org.w3c.dom.Node [javac] public class DTMNodeProxy [javac] ^ [javac] /var/tmp/portage/xalan-2.6.0-r2/work/xalan-j_2_6_0/src/org/apache/xml/dtm/ref/DTMNodeProxy.java:1327: org.apache.xml.dtm.ref.DTMNodeProxy.DTMNodeProxyImplementation is not abstract and does not override abstract method getFeature(java.lang.String,java.lang.String) in org.w3c.dom.DOMImplementation [javac] static class DTMNodeProxyImplementation implements DOMImplementation [javac] ^ [javac] /var/tmp/portage/xalan-2.6.0-r2/work/xalan-j_2_6_0/src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java:48: org.apache.xml.dtm.ref.dom2dtm.DOM2DTMdefaultNamespaceDeclarationNode is not abstract and does not override abstract method isId() in org.w3c.dom.Attr [javac] public class DOM2DTMdefaultNamespaceDeclarationNode implements Attr [javac] ^ [javac] /var/tmp/portage/xalan-2.6.0-r2/work/xalan-j_2_6_0/src/org/apache/xml/utils/UnImplNode.java:44: org.apache.xml.utils.UnImplNode is not abstract and does not override abstract method getUserData(java.lang.String) in org.w3c.dom.Node [javac] public class UnImplNode implements Node, Element, NodeList, Document [javac] ^ [javac] Note: * uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] 4 errors [javac] 4 warnings BUILD FAILED /var/tmp/portage/xalan-2.6.0-r2/work/xalan-j_2_6_0/build.xml:256: Compile failed; see the compiler error output for details. I solved the problem using the patch for the build.xml, and modifying the src_unpack section of the ebuild : src_unpack() { unpack ${A} cd ${S}/bin rm -f *.jar java-pkg_jar-from xerces-2 java-pkg_jar-from javacup javacup.jar java_cup.jar java-pkg_jar-from javacup javacup.jar runtime.jar java-pkg_jar-from bcel bcel.jar BCEL.jar java-pkg_jar-from jakarta-regexp-1.3 jakarta-regexp.jar regexp.jar java-pkg_jar-from bsf-2.3 #java-pkg_jar-from jtidy #java-pkg_jar-from jlex jlex.jar JLex.jar # >>>>>>>>> START OF ADDED LINES <<<<<<<<<<<< cd ${S} epatch ${FILESDIR}/xalan-jdk15.patch # >>>>>>>>> END OF ADDED LINES <<<<<<<<<<<< } Hope that help someone else... Oh, btw, I don't know how to solve those UTF8 Warnings... Any ideas are welcome ;-) Tristan.
*** Bug 111699 has been marked as a duplicate of this bug. ***
-r3 fails too, why not applying this patch? it works perfectly, with jikes too :) jdk 1.5 portage is around...so i see no problems.
*** Bug 114879 has been marked as a duplicate of this bug. ***
I have tried xalan-2.7.0 and it compiles without problems. I've just copied xalan-2.6.0-r3.ebuild and removed reference to xalan-2.7.0-docs.tar.bz2 file because I didn't find the file at their website.