gcc4-java: packaging error?

Dave Korn dave.korn.cygwin@googlemail.com
Sun Mar 15 17:57:00 GMT 2009

Yaakov (Cygwin/X) wrote:

> Dave,
> Trying gcj-4 with the standard java hello world program:
> $ gcj-4 -C Hello.java
> gcj-4: error trying to exec 'ecj1': execvp: No such file or directory
> $ gcj-4 Hello.java
> gcj-4: error trying to exec 'ecj1': execvp: No such file or directory
> Huh?

  IIUC, GCJ accepts both java source (.java) and byte code (.class) files and
compiles them to native assembly.  In order to compile .java files to
bytecode, it relies on the Eclipse Java compiler front-end.

  I do not know yet if the Eclipse Java compiler license is compatible with
the Cygwin license, so for the moment I haven't shipped it in the distro.
(OTOH it now looks like maybe I could have used it while building libgcj
without needing to distribute it.)

  The advice I have found so far is to download it from
ftp://sourceware.org/pub/java/ecj-latest.jar and then use a wrapper script
named ecj1 to invoke it:

$ cat ecj1
gij -cp /bin/ecj.jar \
    org.eclipse.jdt.internal.compiler.batch.GCCMain \

  However, that doesn't "just work":

DKAdmin@ubik /tmp/java
$ gcj-4 -C Hello.java
      1 [main] gij 1504 _cygtls::handle_exceptions: Error while dumping state
(probably corrupted stack)
/usr/bin/ecj1: line 4:  1504 Segmentation fault      (core dumped) gij -cp
/bin/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain ${1+"$@"}

DKAdmin@ubik /tmp/java

  There are bugs in the java distro right now  which I'll try and fix before
the next major release (but not for the rapid-respin I'm liable to do first).


Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list