You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by Simon Pepping <sp...@leverkruid.eu> on 2010/06/02 12:03:05 UTC

build problems with java 1.4

I believe the branch has all required changes for the release. I built
the dist successfully with java 1.6. When I try to build the target
compile-copy-resources, I get errors:

/fsc/source/xmlgraphics-commons-branch-1_4/build.xml:196: Failed to copy /fsc/source/xmlgraphics-commons-branch-1_4/src/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory to /fsc/source/xmlgraphics-commons-branch-1_4/build/classes/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory due to Invalid argument

I am setting JAVA_HOME to the top directory of a Sun SDK containing
java 1.4.2 on a Debian GNU/Linux system:

>$JAVA_HOME/bin/java -version
java version "1.4.2_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b06)
Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)

I have no idea how this problem is caused. How can a simple copy
command fail? The interactions between ant and java are a mystery to
me.

Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Yes, Forrest doesn't do well with Java 1.4. I'm always using at least
Java 1.5 for the Forrest run.

On 30.06.2010 15:43:00 Simon Pepping wrote:
> I have been able to circumvent the reported problem by using ant
> 1.7. A new problem appeared: With jdk14 forrest fails to generate
> changes.html, changes.rss and changes.pdf. It may be that the plugin
> input.projectInfo does not work well with jdk14.
> 
> I used the following workaround:
> jdk14: ant distclean
> jdk6:  ant docs
> jdk14: dist-src
> jdk14: dist-bin, which runs the docs target again
> jdk14: maven-artifacts
> 
> This uses the trick that forrest is run each time, but does not clean
> out its target directory.
> 
> In order that you can check for yourself that this trick produces a
> correct build, I have uploaded the build artifacts to
> http://people.apache.org/~spepping/. I added my signature to the KEYS
> file in the branch only after this build, so you can only find it in
> subversion, or in the fop KEYS file.
> 
> I will now proceed to merge recent trunk change sets into the branch,
> tag and build the final artifacts.
> 
> Simon
> 
> On Wed, Jun 02, 2010 at 12:03:05PM +0200, Simon Pepping wrote:
> > I believe the branch has all required changes for the release. I built
> > the dist successfully with java 1.6. When I try to build the target
> > compile-copy-resources, I get errors:
> > 
> > /fsc/source/xmlgraphics-commons-branch-1_4/build.xml:196: Failed to copy /fsc/source/xmlgraphics-commons-branch-1_4/src/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory to /fsc/source/xmlgraphics-commons-branch-1_4/build/classes/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory due to Invalid argument
> 
> -- 
> Simon Pepping
> home page: http://www.leverkruid.eu
> 


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by Simon Pepping <sp...@leverkruid.eu>.
I updated the build artifacts in
http://people.apache.org/~spepping/. These would be identical to the
release artifacts if I would tag the branch now.

Simon

On Wed, Jun 30, 2010 at 03:43:00PM +0200, Simon Pepping wrote:
> I have been able to circumvent the reported problem by using ant
> 1.7. A new problem appeared: With jdk14 forrest fails to generate
> changes.html, changes.rss and changes.pdf. It may be that the plugin
> input.projectInfo does not work well with jdk14.
> 
> I used the following workaround:
> jdk14: ant distclean
> jdk6:  ant docs
> jdk14: dist-src
> jdk14: dist-bin, which runs the docs target again
> jdk14: maven-artifacts
> 
> This uses the trick that forrest is run each time, but does not clean
> out its target directory.
> 
> In order that you can check for yourself that this trick produces a
> correct build, I have uploaded the build artifacts to
> http://people.apache.org/~spepping/. I added my signature to the KEYS
> file in the branch only after this build, so you can only find it in
> subversion, or in the fop KEYS file.
> 
> I will now proceed to merge recent trunk change sets into the branch,
> tag and build the final artifacts.
> 
> Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by Simon Pepping <sp...@leverkruid.eu>.
I have been able to circumvent the reported problem by using ant
1.7. A new problem appeared: With jdk14 forrest fails to generate
changes.html, changes.rss and changes.pdf. It may be that the plugin
input.projectInfo does not work well with jdk14.

I used the following workaround:
jdk14: ant distclean
jdk6:  ant docs
jdk14: dist-src
jdk14: dist-bin, which runs the docs target again
jdk14: maven-artifacts

This uses the trick that forrest is run each time, but does not clean
out its target directory.

In order that you can check for yourself that this trick produces a
correct build, I have uploaded the build artifacts to
http://people.apache.org/~spepping/. I added my signature to the KEYS
file in the branch only after this build, so you can only find it in
subversion, or in the fop KEYS file.

I will now proceed to merge recent trunk change sets into the branch,
tag and build the final artifacts.

Simon

On Wed, Jun 02, 2010 at 12:03:05PM +0200, Simon Pepping wrote:
> I believe the branch has all required changes for the release. I built
> the dist successfully with java 1.6. When I try to build the target
> compile-copy-resources, I get errors:
> 
> /fsc/source/xmlgraphics-commons-branch-1_4/build.xml:196: Failed to copy /fsc/source/xmlgraphics-commons-branch-1_4/src/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory to /fsc/source/xmlgraphics-commons-branch-1_4/build/classes/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory due to Invalid argument

-- 
Simon Pepping
home page: http://www.leverkruid.eu

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by Manuel Mall <ma...@apache.org>.

J.Pietschmann wrote:
> 
> On 07.06.2010 10:12, Simon Pepping wrote:
>> So, once we have proven that the code can be compiled with jdk 1.4
>> without such warnings, we can safely compile with jdk 1.6?
> 
> Well, the logical answer should be "Yes" but then I've had builds
> in the past where results didn't quite match the theory.
> 
> J.Pietschmann
> 
> 
I had problems in the past. For example

    new BigDecimal(1)

compiles under Java 1.4 into

   public BigDecimal(double val)

but under 1.5 and later it compiles into (introduced in 1.5)

   public BigDecimal(int val)

So the same code compiles fine under both platforms but because of the new
constructor signatures introduced the code compiled under 1.5 will not run
under 1.4.

May be there is a compiler switch telling it to ignore methods/constructors
with an @since Javadoc comment later than the target platform but I don't
think so.
-- 
View this message in context: http://old.nabble.com/build-problems-with-java-1.4-tp28752403p28828248.html
Sent from the Xml Graphics - General mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by "J.Pietschmann" <j3...@yahoo.de>.
On 07.06.2010 10:12, Simon Pepping wrote:
> So, once we have proven that the code can be compiled with jdk 1.4
> without such warnings, we can safely compile with jdk 1.6?

Well, the logical answer should be "Yes" but then I've had builds
in the past where results didn't quite match the theory.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by Simon Pepping <sp...@leverkruid.eu>.
On Sun, Jun 06, 2010 at 07:57:58PM +0200, J.Pietschmann wrote:
> On 04.06.2010 19:45, Simon Pepping wrote:
> >I have a question: The ant build file says:
> >
> >property name="javac.target" value="1.4"
> >
> >Why is that not enough? Does it not cause sdk 6 to do compilation for
> >java 1.4?
> 
> This generates bytecode compatible with a 1.4 JVM but doesn't
> flag RTL functionality which is in 1.5+ but not in 1.4, therefore
> if somehow 1.5+ features have crept in, the result is likely
> unusable in a 1.4 environment.

So, once we have proven that the code can be compiled with jdk 1.4
without such warnings, we can safely compile with jdk 1.6?

Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by "J.Pietschmann" <j3...@yahoo.de>.
On 04.06.2010 19:45, Simon Pepping wrote:
> I have a question: The ant build file says:
>
> property name="javac.target" value="1.4"
>
> Why is that not enough? Does it not cause sdk 6 to do compilation for
> java 1.4?

This generates bytecode compatible with a 1.4 JVM but doesn't
flag RTL functionality which is in 1.5+ but not in 1.4, therefore
if somehow 1.5+ features have crept in, the result is likely
unusable in a 1.4 environment.

J.Pietschmann



---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by Simon Pepping <sp...@leverkruid.eu>.
On Thu, Jun 03, 2010 at 06:34:08AM -0700, The Web Maestro wrote:
> Maybe there's a problem w Ant 1.8.0? Have you tried Ant 1.7.x?

I will probably try that. But I am not particularly interested in
compatibility problems with versions, and I am not going to spend a
whole lot of time on this problem. If I cannot get ant and jdk 1.4 to
work together, I will ask someone else to build the artifacts.

I have a question: The ant build file says:

property name="javac.target" value="1.4"

Why is that not enough? Does it not cause sdk 6 to do compilation for
java 1.4?

Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by The Web Maestro <th...@gmail.com>.
Maybe there's a problem w Ant 1.8.0? Have you tried Ant 1.7.x?

Clay

On Wednesday, June 2, 2010, Simon Pepping <sp...@leverkruid.eu> wrote:
>>ant compile
> Buildfile: /fsc/source/xmlgraphics-commons-branch-1_4/build.xml
>
> info:
>      [echo] ------------------- Apache XML Graphics Commons 1.4 [1999-2010] ----------------
>      [echo] See build.properties and build-local.properties for additional build settings
>      [echo] Apache Ant version 1.8.0 compiled on March 11 2010
>      [echo] VM: 1.4.2_11-b06, Sun Microsystems Inc.
>      [echo] JAVA_HOME: /usr/local/java
>
> init-avail:
>      [echo] Sun-private JPEG Support PRESENT
>      [echo] JUnit Support PRESENT
>      [echo] IKVM Support NOT Present
>
> ...
>
> compile-copy-resources:
>      [copy] Copying 8 files to /fsc/source/xmlgraphics-commons-branch-1_4/build/classes
>
> BUILD FAILED
> /fsc/source/xmlgraphics-commons-branch-1_4/build.xml:196: Failed to copy /fsc/source/xmlgraphics-commons-branch-1_4/src/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory to /fsc/source/xmlgraphics-commons-branch-1_4/build/classes/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory due to Invalid argument
>
>>$JAVA_HOME/bin/java -version
> java version "1.4.2_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b06)
> Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)
>
>
> On Wed, Jun 02, 2010 at 05:19:49PM +0200, Jeremias Maerki wrote:
>> I've just compiled the branch using Sun JDK 1.4.2_19 on by Ubuntu 9.04
>> and that worked fine. What Ant version are you using? I get the
>> following at the beginning of the build:
>>
>> info:
>>      [echo] ------------------- Apache XML Graphics Commons 1.4 [1999-2010] ----------------
>>      [echo] See build.properties and build-local.properties for additional build settings
>>      [echo] Apache Ant version 1.7.1 compiled on June 27 2008
>>      [echo] VM: 1.4.2_19-b04, Sun Microsystems Inc.
>>      [echo] JAVA_HOME: /opt/j2sdk1.4.2_19
>>
>> init-avail:
>>      [echo] Sun-private JPEG Support PRESENT
>>      [echo] JUnit Support PRESENT
>>      [echo] IKVM Support NOT Present
>>
>> Just for comparison:
>>
>> jeremias@atom:~/dev/xgc-branch$ $JAVA_HOME/bin/java -version
>> java version "1.4.2_19"
>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_19-b04)
>> Java HotSpot(TM) Client VM (build 1.4.2_19-b04, mixed mode)
>>
>> The only thing I'm struggling with is getting Xvfb or PJA working on
>> that headless server, so the tests don't currently run through.
>
> --
> Simon Pepping
> home page: http://www.leverkruid.eu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: general-help@xmlgraphics.apache.org
>
>

-- 
Regards,

The Web Maestro
-- 
<th...@gmail.com> - <http://ourlil.com/>
My religion is simple. My religion is kindness.
- HH The 14th Dalai Lama of Tibet

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by Simon Pepping <sp...@leverkruid.eu>.
>ant compile
Buildfile: /fsc/source/xmlgraphics-commons-branch-1_4/build.xml

info:
     [echo] ------------------- Apache XML Graphics Commons 1.4 [1999-2010] ----------------
     [echo] See build.properties and build-local.properties for additional build settings
     [echo] Apache Ant version 1.8.0 compiled on March 11 2010
     [echo] VM: 1.4.2_11-b06, Sun Microsystems Inc.
     [echo] JAVA_HOME: /usr/local/java

init-avail:
     [echo] Sun-private JPEG Support PRESENT
     [echo] JUnit Support PRESENT
     [echo] IKVM Support NOT Present

...

compile-copy-resources:
     [copy] Copying 8 files to /fsc/source/xmlgraphics-commons-branch-1_4/build/classes

BUILD FAILED
/fsc/source/xmlgraphics-commons-branch-1_4/build.xml:196: Failed to copy /fsc/source/xmlgraphics-commons-branch-1_4/src/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory to /fsc/source/xmlgraphics-commons-branch-1_4/build/classes/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory due to Invalid argument

>$JAVA_HOME/bin/java -version
java version "1.4.2_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b06)
Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)


On Wed, Jun 02, 2010 at 05:19:49PM +0200, Jeremias Maerki wrote:
> I've just compiled the branch using Sun JDK 1.4.2_19 on by Ubuntu 9.04
> and that worked fine. What Ant version are you using? I get the
> following at the beginning of the build:
> 
> info:
>      [echo] ------------------- Apache XML Graphics Commons 1.4 [1999-2010] ----------------
>      [echo] See build.properties and build-local.properties for additional build settings
>      [echo] Apache Ant version 1.7.1 compiled on June 27 2008
>      [echo] VM: 1.4.2_19-b04, Sun Microsystems Inc.
>      [echo] JAVA_HOME: /opt/j2sdk1.4.2_19
> 
> init-avail:
>      [echo] Sun-private JPEG Support PRESENT
>      [echo] JUnit Support PRESENT
>      [echo] IKVM Support NOT Present
> 
> Just for comparison:
> 
> jeremias@atom:~/dev/xgc-branch$ $JAVA_HOME/bin/java -version
> java version "1.4.2_19"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_19-b04)
> Java HotSpot(TM) Client VM (build 1.4.2_19-b04, mixed mode)
> 
> The only thing I'm struggling with is getting Xvfb or PJA working on
> that headless server, so the tests don't currently run through.

-- 
Simon Pepping
home page: http://www.leverkruid.eu

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: build problems with java 1.4

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I've just compiled the branch using Sun JDK 1.4.2_19 on by Ubuntu 9.04
and that worked fine. What Ant version are you using? I get the
following at the beginning of the build:

info:
     [echo] ------------------- Apache XML Graphics Commons 1.4 [1999-2010] ----------------
     [echo] See build.properties and build-local.properties for additional build settings
     [echo] Apache Ant version 1.7.1 compiled on June 27 2008
     [echo] VM: 1.4.2_19-b04, Sun Microsystems Inc.
     [echo] JAVA_HOME: /opt/j2sdk1.4.2_19

init-avail:
     [echo] Sun-private JPEG Support PRESENT
     [echo] JUnit Support PRESENT
     [echo] IKVM Support NOT Present

Just for comparison:

jeremias@atom:~/dev/xgc-branch$ $JAVA_HOME/bin/java -version
java version "1.4.2_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_19-b04)
Java HotSpot(TM) Client VM (build 1.4.2_19-b04, mixed mode)

The only thing I'm struggling with is getting Xvfb or PJA working on
that headless server, so the tests don't currently run through.

On 02.06.2010 12:03:05 Simon Pepping wrote:
> I believe the branch has all required changes for the release. I built
> the dist successfully with java 1.6. When I try to build the target
> compile-copy-resources, I get errors:
> 
> /fsc/source/xmlgraphics-commons-branch-1_4/build.xml:196: Failed to copy /fsc/source/xmlgraphics-commons-branch-1_4/src/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory to /fsc/source/xmlgraphics-commons-branch-1_4/build/classes/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory due to Invalid argument
> 
> I am setting JAVA_HOME to the top directory of a Sun SDK containing
> java 1.4.2 on a Debian GNU/Linux system:
> 
> >$JAVA_HOME/bin/java -version
> java version "1.4.2_11"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b06)
> Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)
> 
> I have no idea how this problem is caused. How can a simple copy
> command fail? The interactions between ant and java are a mystery to
> me.
> 
> Simon
> 
> -- 
> Simon Pepping
> home page: http://www.leverkruid.eu
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org