Bug#304524: libxerces2-java: FTBFS: Semantic Errors

Wolfgang Baer Wolfgang Baer <WBaer@gmx.de>, 304524@bugs.debian.org
Sun Apr 17 14:09:03 2005


Michael Koch wrote:
> On Sat, Apr 16, 2005 at 07:40:27PM +0200, Wolfgang Baer wrote:
[...]
>>
>>(2) Include DOM Level 2 source classes in the debian directory
>>and use the trick that source takes precedence over binary classes
>>from the runtime during compilation.
>>
>>If no one has objections or another working approach I will prepare
>>a new upload for possibility 2. 
> 
> 
> In order not to incluce DOM Level 2 compatible classes in several
> packages we should either create a package for them and make packages
> depend on it or use patches (writing them if needed) to make the
> software build with DOM level 3. That isnt too hard either.

Hi Michael,

well it's not that easy.

For the first suggestion: We have already a DOM Level 2 package 
(libjaxp1.2-java), but the problem is to use it INSTEAD the system
classes of this namespace during compilation. This is possible
with the proprietary vm's but I haven't succeeded with the free vm's
and believe me I invested a lot of time to try all possible stuff
(all bootclasspath manipulation options for both kaffe and sablevm).

After several hours of tests I found the following:

Using jikes as the build compiler needs an explicit setting of the
bootclasspath. So compilation against kaffe would need e.g.
-bootclasspath /usr/share/kaffe/Klasses.jar to succeed.

If we at this point prepend the bootclasspath with the needed DOM Level
2 package it takes precedence over the DOM classes in the runtime jar.
So jikes -bootclasspath \ 
/usr/share/jaxp-1.2.jar:/usr/share/kaffe/Klasses.jar
would work for compilation.

However we use ant to build. The problem is that the 1.6.2 release
of ant is based on a jikes compiler implementation which had no
-bootclasspath option - therefore all bootclasspath/sourcepath/extdirs
options given in the javac task in the build.xml file has no effect
and only gets appended to the classpath.

This is changed in the 1.6.3beta1 release of ant which can handle
the bootclasspath and other options of newer jikes versions.
With this version it would only be needed to patch the build.xml
file used to include a bootclasspath option as described above
where the packages which should be used for overriding the runtime
classes DURING compilation are prepended.

I don't know if it is wanted to update libant1.6-java to a
beta release such close to the sarge release. However we could
backport the jikes implementation - this is what I have done
for testing purposes. But there is also a good change that this
different behaviour of ant together with jikes as build compiler
will break compilation of other packages which would be a
problem to find out such close to release.

So my prefered way would be to use my given option with including
the DOM Level 2 sources for getting libxerces2-java to compile
for the near sarge release.

After sarge - we can switch to the ant 1.6.3beta1 release and
compile without the included DOM Level 2 sources through a patched
build.xml via the bootclasspath option.

For the second suggestion: Although maybe possible - it will break
ALL applications which use the experimental DOM Level 3 implementation
parts included in xerces 2.6.2. This experimental DOM Level 3
implementation in xerces uses for some parts (which weren't specified
in the draft Level 3 implementation at the time xerces released)
different namespaces.

Wolfgang