Bug 35923 - gcj: error trying to exec 'ecj1': execvp: No such file or directory
gcj: error trying to exec 'ecj1': execvp: No such file or directory
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: java
4.3.0
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-13 16:30 UTC by David Griffiths
Modified: 2010-02-17 15:24 UTC (History)
2 users (show)

See Also:
Host: i686-pc-cygwin
Target: i686-pc-cygwin
Build: i686-pc-cygwin
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Griffiths 2008-04-13 16:30:24 UTC
I get the following error on a clean 4.3.0 build when trying (eg) "gcj foo.java":

gcj: error trying to exec 'ecj1': execvp: No such file or directory

I'm a bit puzzled by bug 32712 being listed as resolved and even more so by the references to just needing to run "./contrib/download_ecj". I tried this (on a clean installation) and it made no difference. I also tried specifying the location of ecj.jar with:

 ./configure --with-ecj-jar=/home/dgriff/gcc-4.3.0/ecj.jar

again, that made no difference.
Comment 1 Brian Dessent 2008-04-13 23:59:35 UTC
Subject: Re:   New: gcj: error trying to exec 'ecj1': execvp: No 
 such file or directory

david dot griffiths at gmail dot com wrote:

> gcj: error trying to exec 'ecj1': execvp: No such file or directory

Run the command with -v to show what it's trying to exec, and paste the
output as well as the actual location of ecj1.
Comment 2 David Griffiths 2008-04-14 12:25:45 UTC
Well there is no ecj1 - that's the problem I think. It didn't build it. Presumably nobody has noticed this before because they are picking up an old version of ecj1? Anyway, here's the -v output:

/home/dgriff> gcj -v foo.java
Using built-in specs.
Reading specs from /lib/libgcj.spec
rename spec lib to liborig
Target: i686-pc-cygwin
Configured with: ./configure
Thread model: single
gcc version 4.3.0 (GCC) 
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-v' '-fbootclasspath=.;C/:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C/:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;C/:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C/:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cisuz.jar;C/:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C/:\PROGRA~1\IBM\SQLLIB\bin;C/:\PROGRA~1\IBM\SQLLIB\java\common.jar;C/:\Program Files\Java\jre1.6.0_02\lib\ext\QTJava.zip:/usr/local/share/java/libgcj-4.3.0.jar' '-g1' '-mtune=generic'
 ecj1 foo.java -g1 -fbootclasspath=.;C/:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C/:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;C/:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C/:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cisuz.jar;C/:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C/:\PROGRA~1\IBM\SQLLIB\bin;C/:\PROGRA~1\IBM\SQLLIB\java\common.jar;C/:\Program Files\Java\jre1.6.0_02\lib\ext\QTJava.zip:/usr/local/share/java/libgcj-4.3.0.jar -g1 -fsource=1.5 -ftarget=1.5 -fzip-dependency /cygdrive/c/DOCUME~1/dgriff/LOCALS~1/Temp/ccQkBX0B.zip -fzip-target /cygdrive/c/DOCUME~1/dgriff/LOCALS~1/Temp/ccwv2KR3.jar
gcj: error trying to exec 'ecj1': execvp: No such file or directory

Also, the result of find:

/home/dgriff/gcc-4.3.0> find . -iname ecj\*
./ecj.jar
/home/dgriff/gcc-4.3.0> cd /usr
/usr> find . -iname ecj\*
/usr> cd
Comment 3 Brian Dessent 2008-04-15 04:07:44 UTC
Subject: Re:  gcj: error trying to exec 'ecj1': execvp: No such 
 file or directory

david dot griffiths at gmail dot com wrote:

> Well there is no ecj1 - that's the problem I think. It didn't build it.

ecj1 is just a wrapper script that runs ecj.jar to generate the
bytecode, see <http://gcc.gnu.org/ml/java/2008-04/msg00006.html>.

> Configured with: ./configure

Not good.  Try building in an empty dir outside of the source dir as the
install directions state and see if that fixes the problem.
Comment 4 David Griffiths 2008-04-16 14:31:58 UTC
Hi, made no difference. I created a separate gcc-4.3.0-build directory and placed the ecj.jar both in there and in the top level source director (just to be sure).

Note that the build directory contains no libjava on completion, not sure if it should? (As that's the only place that seems to refer to ecj1). I am just doing "./configure" but that should build java by default, right? The config.log certainly contains lines like "build_configargs='--cache-file=../config.cache '--enable-languages=c,c++,fortran,java,objc' --program-transform-name='s,y,y,''".
Comment 5 Brian Dessent 2008-04-16 14:50:05 UTC
Subject: Re:  gcj: error trying to exec 'ecj1': execvp: No such 
 file or directory

david dot griffiths at gmail dot com wrote:

> Note that the build directory contains no libjava on completion, not sure if it
> should? (As that's the only place that seems to refer to ecj1). I am just doing
> "./configure" but that should build java by default, right? The config.log
> certainly contains lines like "build_configargs='--cache-file=../config.cache
> '--enable-languages=c,c++,fortran,java,objc'
> --program-transform-name='s,y,y,''".

Oh, this is Cygwin.  Ick.  gcj support for Cygwin is very iffy.  Last
time I tried you had to --enable-libjava to get it to build libjava as
it was disabled by default.  And even then it will only build a static
libjava which is not very useful.  Also the default SJLJ EH makes
performance nearly intolerable, so you'll probably want to switch to
Dwarf-2 EH.  I'm not sure if all the required patches for DW2 EH to 
function correctly on MinGW/Cygwin are in the FSF tree or not.  (Along
with the other problems with DW2 EH on Win32...)

If you google a little I think you can find hacks for building a MinGW
shared libjava which you might be able to adapt, but I don't know.  I
wouldn't expect much.
Comment 6 Sebastián Magrí 2008-06-13 01:28:36 UTC
I'm getting the same message on a Gentoo/amd64 box... It's reported on gentoo bugzilla http://bugs.gentoo.org/show_bug.cgi?id=225605
Comment 7 littlestar 2009-02-03 08:43:24 UTC
4.3.3 on Linux has the same problem.

Target Milestone: 4.3.3?
Comment 8 Norman Brake 2009-03-03 16:23:12 UTC
4.3.3 on Solaris 2.8 has the problem also.
Comment 9 Jerry Quinn 2009-05-28 20:59:06 UTC
Same problem with a clean build of gcc 4.4.0 on fc7 x86_64
Comment 10 Dave Korn 2010-02-17 15:24:35 UTC
This bug was originally caused by the fact that libjava was disabled in noconfigdirs for cygwin at the time the report was filed.  This has long since been fixed.

The last four comments are incorrect in assuming that they have the same bug.  Same error message != same bug; libjava is enabled in configdir on those targets.  If those reporters are still having problems, they should open separate reports and give full details there.