delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/15/12:57:25

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_54,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <49BD43BB.7080808@gmail.com>
Date: Sun, 15 Mar 2009 18:06:51 +0000
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: gcc4-java: packaging error?
References: <49BD3870 DOT 3030501 AT users DOT sourceforge DOT net>
In-Reply-To: <49BD3870.3030501@users.sourceforge.net>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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
#!/bin/sh
gij -cp /bin/ecj.jar \
    org.eclipse.jdt.internal.compiler.batch.GCCMain \
    ${1+"$@"}

  However, that doesn't "just work":

DKAdmin AT 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 AT 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).

    cheers,
      DaveK


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019