From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27783 invoked by alias); 5 Jun 2011 07:38:53 -0000 Received: (qmail 27643 invoked by uid 22791); 5 Jun 2011 07:38:51 -0000 X-SWARE-Spam-Status: No, hits=1.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_GC,TW_IB,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 05 Jun 2011 07:38:37 +0000 Received: by ywg8 with SMTP id 8so1328782ywg.20 for ; Sun, 05 Jun 2011 00:38:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.181.234 with SMTP id l70mr5000467yhm.495.1307259516086; Sun, 05 Jun 2011 00:38:36 -0700 (PDT) Received: by 10.146.84.6 with HTTP; Sun, 5 Jun 2011 00:38:36 -0700 (PDT) In-Reply-To: References: <20110603141649.GA25976@rivendell.middle-earth.co.uk> Date: Sun, 05 Jun 2011 07:38:00 -0000 Message-ID: Subject: Re: error trying to exec 'ecj1': execvp: No such file or directory From: Jie Liu To: java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00009.txt.bz2 2011/6/5 Jie Liu : > 2011/6/3 Dr Andrew John Hughes : >> On 21:42 Fri 03 Jun =A0 =A0 , Jie Liu wrote: >>> Hi, >>> >>> I am trying to port gcj to RTEMS now and have got boehm-gc, libffi, >>> libjava compiled for RTEMS. But when I try to use i386-rtems-gcj to >>> compile HelloWorld for RTEMS after install, I got "error trying to >>> exec 'ecj1': execvp: No such file or directory" and don't know how to >>> fix it. Could somebody give me an help hand or an advice ? Very >>> Thanks. >>> >>> The error information can be seen below: >>> i386-rtems-gcj -v --main=3DHelloWorld HelloWorld.java -o Hello >>> Using built-in specs. >>> Reading specs from /mnt/gcj/mytoolchain/lib/gcc/i386-rtems/4.7.0/libgcj= .spec >>> rename spec startfile to startfileorig >>> rename spec lib to liborig >>> COLLECT_GCC=3Di386-rtems-gcj >>> COLLECT_LTO_WRAPPER=3D/mnt/gcj/mytoolchain/libexec/gcc/i386-rtems/4.7.0= /lto-wrapper >>> Target: i386-rtems >>> Configured with: ../gcc-trunk/configure --enable-threads=3Drtems >>> --with-gnu-as --enable-multilib --enable-newlib-mb >>> --enable-newlib-iconv --with-gnu-ld --with-newlib --verbose >>> --with-system-zlib --disable-nls >>> --enable-version-specific-runtime-libs --enable-languages=3Dc,c++,java >>> --target=3Di386-rtems --prefix=3D/mnt/gcj/mytoolchain/ >>> --with-gmp=3D/mnt/gcj/gcj-rtems-work/gmpmpfrmpc >>> --with-mpfr=3D/mnt/gcj/gcj-rtems-work/gmpmpfrmpc >>> --with-mpc=3D/mnt/gcj/gcj-rtems-work/gmpmpfrmpc >>> Thread model: rtems >>> gcc version 4.7.0 20110409 (experimental) (GCC) >>> COLLECT_GCC_OPTIONS=3D'-fsaw-java-file' '-v' '-o' 'Hello' >>> '-fbootclasspath=3D./:/mnt/gcj/mytoolchain/share/java/libgcj-4.7.0.jar' >>> '-g1' '-mtune=3Di386' '-march=3Di386' >>> =A0ecj1 HelloWorld.java -g1 >>> -fbootclasspath=3D./:/mnt/gcj/mytoolchain/share/java/libgcj-4.7.0.jar >>> -g1 -fsource=3D1.5 -ftarget=3D1.5 -fzip-dependency /tmp/ccuWIrFF.zip >>> -fzip-target /tmp/cc7in4l3.jar >>> i386-rtems-gcj: error trying to exec 'ecj1': execvp: No such file or di= rectory >>> make: *** [Hello] Error 1 >>> >>> Best Regards, >>> Jie >> >> Did you supply the build with an ecj.jar? =A0contrib/download_ecj will o= btain one >> for you. =A0ecj1 is a natively compiled ecj binary used by gcj to compil= e Java >> source code to bytecode: >> >> $ file /home/andrew/build/gcj/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0= /ecj1 >> /home/andrew/build/gcj/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/ecj1: = ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (us= es shared libs), for GNU/Linux 2.6.9, not stripped >> >> -- >> Andrew :) >> >> Free Java Software Engineer >> Red Hat, Inc. (http://www.redhat.com) >> >> Support Free Java! >> Contribute to GNU Classpath and IcedTea >> http://www.gnu.org/software/classpath >> http://icedtea.classpath.org >> PGP Key: F5862A37 (https://keys.indymedia.org/) >> Fingerprint =3D EA30 D855 D50F 90CD F54D =A00698 0713 C3ED F586 2A37 >> > > Thank you very much, Andrew. :) > I have got my cross ecj1 under your help. > [rtems@localhost libjava]$ file > /mnt/gcj/mytoolchain/libexec/gcc/i386-rtems/4.7.0/ecj1 > /mnt/gcj/mytoolchain/libexec/gcc/i386-rtems/4.7.0/ecj1: ELF 32-bit LSB > executable, Intel 80386, version 1 (SYSV), dynamically linked (uses > shared libs), for GNU/Linux 2.6.32, not stripped > > But when I run this ecj1, an error occurred: > [rtems@localhost libjava]$ > /mnt/gcj/mytoolchain/libexec/gcc/i386-rtems/4.7.0/ecj1 > Exception in thread "main" java.lang.NoClassDefFoundError: > org.eclipse.jdt.internal.compiler.batch.GCCMain > =A0 at gnu.java.lang.MainThread.run(libgcj.so.11) > Caused by: java.lang.ClassNotFoundException: > org.eclipse.jdt.internal.compiler.batch.GCCMain not found in > gnu.gcj.runtime.SystemClassLoader{urls=3D[file:./], > parent=3Dgnu.gcj.runtime.ExtensionClassLoader{urls=3D[], parent=3Dnull}} > =A0 at java.net.URLClassLoader.findClass(libgcj.so.11) > =A0 at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.11) > =A0 at java.lang.ClassLoader.loadClass(libgcj.so.11) > =A0 at java.lang.ClassLoader.loadClass(libgcj.so.11) > =A0 at gnu.java.lang.MainThread.run(libgcj.so.11) > While the local ecj1 is running well : > [rtems@localhost test]$ /usr/libexec/gcc/i686-redhat-linux/4.5.1/ecj1 > [rtems@localhost test]$ > Hi, This problem is fixed by export CLASSPATH:=3D.:/usr/share/java/ecj.jar --jie > Is there someone who has encountered the same question? Any reply will > be welcome. > > Best Regards, > Jie >