This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [ecj] Error compiling executable on i686-pc-linux-gnu
- From: Andrew Haley <aph at redhat dot com>
- To: Mohan Embar <gnustuff at thisiscool dot com>
- Cc: java at gcc dot gnu dot org
- Date: Wed, 6 Dec 2006 10:55:57 +0000
- Subject: Re: [ecj] Error compiling executable on i686-pc-linux-gnu
- References: <A5KERN827371FDPLTSMXW63ECDHB84.457648d9@d9300>
Mohan Embar writes:
> Hi All,
>
> I tried to build a Linux gcj and then do:
>
> gcj --main=HelloJ5 -o HelloJ5 HelloJ5.java
>
> A .class file gets generated in the current directory
> (and this runs okay with gij), but instead of getting
> an executable, I get:
>
> /tmp/ccmCwrnA.jar:0: error: malformed .zip archive in CLASSPATH: /tmp/ccip4wgn.zip/
>
> I'm not seeing either the .jar or .zip in /tmp.
>
> Any ideas?
I remember this one, which was a hell of a job to find.
This was caused by a change to ecj1, which once used the syntax
-fzip-dependency=%U.zip and at some other time used the syntax
-fzip-dependency %U.zip
Please find out which syntax the version of ecj1 that you are using
really wants, and we'll correct lang-specs.h accordingly.
Here's the diff:
Index: lang-specs.h
===================================================================
--- lang-specs.h (revision 118935)
+++ lang-specs.h (revision 118936)
@@ -44,8 +44,8 @@
%{foutput-class-dir*} %{g*} \
%{fsource*} %{!fsource*:-fsource=1.5} \
%{ftarget*} %{!femit-class-files|!ftarget*:-ftarget=1.5} \
- %{!findirect-dispatch:-fzip-dependency %U.zip} \
- %{!fsyntax-only:-fzip-target %U.jar}}\n \
+ %{!findirect-dispatch:-fzip-dependency=%U.zip} \
+ %{!fsyntax-only:-fzip-target=%U.jar}}\n \
%{.class|.zip|.jar|!fsyntax-only:jc1 \
%{.java|fsaw-java-file:%U.jar -fsource-filename=%i %<ffilelist-file} \
%{.class|.zip|.jar|ffilelist-file|fcompile-resource*:%i} \
Andrew.