public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* gcj: error trying to exec 'ecj1': execvp
@ 2009-04-20 12:49 David Michel
  2009-04-20 12:55 ` Andrew Haley
  0 siblings, 1 reply; 13+ messages in thread
From: David Michel @ 2009-04-20 12:49 UTC (permalink / raw)
  To: java

Hi All,

I recently installed the newest gcj 4.4 (see
http://gcc.gnu.org/ml/java/2009-03/msg00028.html) and I am trying to
compile a awt/swing project.

As I have an older version of gcj (4.2) installed on the system, I
call gcj with its complete path and I updated LD_LIBRARY_PATH such as

$ echo $LD_LIBRARY_PATH
:/usr/local/lib/:/local/gcc-4_4-branch/install/lib/

So I'm trying to compile foo.java into its object file foo.o like so:

$ /local/gcc-4_4-branch/install/bin/gcj -O0 -g0 -v  -c foo.java -o foo.o
Using built-in specs.
Reading specs from
/local/gcc-4_4-branch/install/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: i686-pc-linux-gnu
Configured with:
/home/micd/gcc-4_4-branch/obj-x86_64-unknown-linux-gnu/../configure
--enable-languages=java --prefix=/local/gcc-4_4-branch/install
--enable-java-home --enable-java-awt=gtk
Thread model: posix
gcc version 4.4.0 20090331 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-O0' '-g0' '-v' '-c' '-o'
'foo.o' '-fbootclasspath=./:/local/gcc-4_4-branch/install/share/java/libgcj-4.4.0.jar'
'-shared-libgcc' '-mtune=generic'
 ecj1 foo.java -g0
-fbootclasspath=./:/local/gcc-4_4-branch/install/share/java/libgcj-4.4.0.jar
-g0 -fsource=1.5 -ftarget=1.5 -fzip-dependency /tmp/cc3BLQiG.zip
-fzip-target /tmp/ccQkVPqc.jar
gcj: error trying to exec 'ecj1': execvp: No such file or directory

How can I solve this ? Isn't ecj a reference to the Eclipse java
compiler (what is it doing with gcc) ? and what is execvp ?

Many thanks in advance for your help!

David

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-20 12:49 gcj: error trying to exec 'ecj1': execvp David Michel
@ 2009-04-20 12:55 ` Andrew Haley
  2009-04-20 13:27   ` David Michel
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Haley @ 2009-04-20 12:55 UTC (permalink / raw)
  To: David Michel; +Cc: java

David Michel wrote:
> Hi All,
> 
> I recently installed the newest gcj 4.4 (see
> http://gcc.gnu.org/ml/java/2009-03/msg00028.html) and I am trying to
> compile a awt/swing project.
> 
> As I have an older version of gcj (4.2) installed on the system, I
> call gcj with its complete path and I updated LD_LIBRARY_PATH such as
> 
> $ echo $LD_LIBRARY_PATH
> :/usr/local/lib/:/local/gcc-4_4-branch/install/lib/
> 
> So I'm trying to compile foo.java into its object file foo.o like so:
> 
> $ /local/gcc-4_4-branch/install/bin/gcj -O0 -g0 -v  -c foo.java -o foo.o
> Using built-in specs.
> Reading specs from
> /local/gcc-4_4-branch/install/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../libgcj.spec
> rename spec startfile to startfileorig
> rename spec lib to liborig
> Target: i686-pc-linux-gnu
> Configured with:
> /home/micd/gcc-4_4-branch/obj-x86_64-unknown-linux-gnu/../configure
> --enable-languages=java --prefix=/local/gcc-4_4-branch/install
> --enable-java-home --enable-java-awt=gtk
> Thread model: posix
> gcc version 4.4.0 20090331 (prerelease) (GCC)
> COLLECT_GCC_OPTIONS='-fsaw-java-file' '-O0' '-g0' '-v' '-c' '-o'
> 'foo.o' '-fbootclasspath=./:/local/gcc-4_4-branch/install/share/java/libgcj-4.4.0.jar'
> '-shared-libgcc' '-mtune=generic'
>  ecj1 foo.java -g0
> -fbootclasspath=./:/local/gcc-4_4-branch/install/share/java/libgcj-4.4.0.jar
> -g0 -fsource=1.5 -ftarget=1.5 -fzip-dependency /tmp/cc3BLQiG.zip
> -fzip-target /tmp/ccQkVPqc.jar
> gcj: error trying to exec 'ecj1': execvp: No such file or directory
> 
> How can I solve this ? Isn't ecj a reference to the Eclipse java
> compiler (what is it doing with gcc) ? and what is execvp ?

http://gcc.gnu.org/install/configure.html:

--with-ecj-jar=filename This option can be used to specify the
    location of an external jar file containing the Eclipse Java
    compiler. A specially modified version of this compiler is used by
    gcj to parse .java source files. If this option is given, the
    `libjava' build will create and install an ecj1 executable which
    uses this jar file at runtime.

    If this option is not given, but an ecj.jar file is found in the
    topmost source tree at configure time, then the `libgcj' build
    will create and install ecj1, and will also install the discovered
    ecj.jar into a suitable place in the install tree.

    If ecj1 is not installed, then the user will have to supply one on
    his path in order for gcj to properly parse .java source files. A
    suitable jar is available from ftp://sourceware.org/pub/java/.

Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-20 12:55 ` Andrew Haley
@ 2009-04-20 13:27   ` David Michel
  2009-04-20 13:39     ` Andrew Haley
  0 siblings, 1 reply; 13+ messages in thread
From: David Michel @ 2009-04-20 13:27 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

Hi Andrew,

Thanks a lot for this link!

Do I have to rename the ecj-4.3.jar to ecj.jar to be recognised ?

what do you mean exactly by "topmost source tree" ? Is
~/gcc-4_4-branch (i.e. the main folder created by the the svn checkout
command) OK ?

How can I make sure that the ./configure script has "found" it ?

Cheers

David

2009/4/20 Andrew Haley <aph@redhat.com>:
> David Michel wrote:
>> Hi All,
>>
>> I recently installed the newest gcj 4.4 (see
>> http://gcc.gnu.org/ml/java/2009-03/msg00028.html) and I am trying to
>> compile a awt/swing project.
>>
>> As I have an older version of gcj (4.2) installed on the system, I
>> call gcj with its complete path and I updated LD_LIBRARY_PATH such as
>>
>> $ echo $LD_LIBRARY_PATH
>> :/usr/local/lib/:/local/gcc-4_4-branch/install/lib/
>>
>> So I'm trying to compile foo.java into its object file foo.o like so:
>>
>> $ /local/gcc-4_4-branch/install/bin/gcj -O0 -g0 -v  -c foo.java -o foo.o
>> Using built-in specs.
>> Reading specs from
>> /local/gcc-4_4-branch/install/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../libgcj.spec
>> rename spec startfile to startfileorig
>> rename spec lib to liborig
>> Target: i686-pc-linux-gnu
>> Configured with:
>> /home/micd/gcc-4_4-branch/obj-x86_64-unknown-linux-gnu/../configure
>> --enable-languages=java --prefix=/local/gcc-4_4-branch/install
>> --enable-java-home --enable-java-awt=gtk
>> Thread model: posix
>> gcc version 4.4.0 20090331 (prerelease) (GCC)
>> COLLECT_GCC_OPTIONS='-fsaw-java-file' '-O0' '-g0' '-v' '-c' '-o'
>> 'foo.o' '-fbootclasspath=./:/local/gcc-4_4-branch/install/share/java/libgcj-4.4.0.jar'
>> '-shared-libgcc' '-mtune=generic'
>>  ecj1 foo.java -g0
>> -fbootclasspath=./:/local/gcc-4_4-branch/install/share/java/libgcj-4.4.0.jar
>> -g0 -fsource=1.5 -ftarget=1.5 -fzip-dependency /tmp/cc3BLQiG.zip
>> -fzip-target /tmp/ccQkVPqc.jar
>> gcj: error trying to exec 'ecj1': execvp: No such file or directory
>>
>> How can I solve this ? Isn't ecj a reference to the Eclipse java
>> compiler (what is it doing with gcc) ? and what is execvp ?
>
> http://gcc.gnu.org/install/configure.html:
>
> --with-ecj-jar=filename This option can be used to specify the
>    location of an external jar file containing the Eclipse Java
>    compiler. A specially modified version of this compiler is used by
>    gcj to parse .java source files. If this option is given, the
>    `libjava' build will create and install an ecj1 executable which
>    uses this jar file at runtime.
>
>    If this option is not given, but an ecj.jar file is found in the
>    topmost source tree at configure time, then the `libgcj' build
>    will create and install ecj1, and will also install the discovered
>    ecj.jar into a suitable place in the install tree.
>
>    If ecj1 is not installed, then the user will have to supply one on
>    his path in order for gcj to properly parse .java source files. A
>    suitable jar is available from ftp://sourceware.org/pub/java/.
>
> Andrew.
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-20 13:27   ` David Michel
@ 2009-04-20 13:39     ` Andrew Haley
  2009-04-20 13:53       ` David Michel
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Haley @ 2009-04-20 13:39 UTC (permalink / raw)
  To: David Michel; +Cc: java

David Michel wrote:
> Hi Andrew,
> 
> Thanks a lot for this link!
> 
> Do I have to rename the ecj-4.3.jar to ecj.jar to be recognised ?

ecj1 is a script that looks like this:

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

> what do you mean exactly by "topmost source tree" ? Is
> ~/gcc-4_4-branch (i.e. the main folder created by the the svn checkout
> command) OK ?

Yes.

> How can I make sure that the ./configure script has "found" it ?

Go into the top of the gcc source tree and type
./contrib/download_ecj

Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-20 13:39     ` Andrew Haley
@ 2009-04-20 13:53       ` David Michel
  2009-04-22  9:53         ` David Michel
  0 siblings, 1 reply; 13+ messages in thread
From: David Michel @ 2009-04-20 13:53 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

I get an error when doing ./contrib/download_ecj

$ contrib/download_ecj
[sudo] password for micd:
Verbose mode on.
Hash mark printing on (1024 bytes/hash mark).
331 Anonymous login ok, send your complete email address as your password
230-
                *** Welcome to the ftp server for sourceware.org/gcc.gnu.org ***

     You are user 20 out of a maximum of 30 authorized anonymous logins.
     The current time here is Mon Apr 20 13:46:01 2009.
     If you experience any problems here, contact : overseers at this site


230 Anonymous login ok, restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
250 CWD command successful
200 Type set to I
local: ecj-latest.jar remote: ecj-latest.jar
421 Service not available, remote server has closed connection
mv: cannot stat `ecj-latest.jar': No such file or directory


This might be due to very restrictive firewall settings... so I'll
download ecj-latest.jar and put it in the gcc source tree as ecj.jar
and redo the configure ; make ; make install process...

Cheers

David


2009/4/20 Andrew Haley <aph@redhat.com>:
> David Michel wrote:
>> Hi Andrew,
>>
>> Thanks a lot for this link!
>>
>> Do I have to rename the ecj-4.3.jar to ecj.jar to be recognised ?
>
> ecj1 is a script that looks like this:
>
> #!/bin/sh
> gij -cp <somepath>/ecj.jar \
>    org.eclipse.jdt.internal.compiler.batch.GCCMain \
>    ${1+"$@"}
>
>> what do you mean exactly by "topmost source tree" ? Is
>> ~/gcc-4_4-branch (i.e. the main folder created by the the svn checkout
>> command) OK ?
>
> Yes.
>
>> How can I make sure that the ./configure script has "found" it ?
>
> Go into the top of the gcc source tree and type
> ./contrib/download_ecj
>
> Andrew.
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-20 13:53       ` David Michel
@ 2009-04-22  9:53         ` David Michel
  2009-04-22 10:03           ` Andrew Haley
  0 siblings, 1 reply; 13+ messages in thread
From: David Michel @ 2009-04-22  9:53 UTC (permalink / raw)
  To: Andrew Haley, java

Thanks it compiles fine now, but now I get an Exception at runtime:

Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
   at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
   at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
   at java.awt.Window.<init>(Window.java:133)
   at java.awt.Frame.<init>(Frame.java:246)
   at javax.swing.JFrame.<init>(JFrame.java:114)
   at nl.kbna.dioscuri.GUI.<init>(dioscuri)
   at nl.kbna.dioscuri.GUI.<init>(dioscuri)
   at nl.kbna.dioscuri.GUI.main(dioscuri)
Caused by: java.lang.ClassNotFoundException:
   at java.lang.Class.forName(natClass.cc:101)
   at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
   ...7 more

I simply run this for all the java source code to produce the object files:
/local/gcc-4_4-branch/install/bin/gcj -O0 -g0 -c "--classpath=./:"
foo.java -o foo.o

and then, link them together with:
/local/gcc-4_4-branch/install/bin/gcj -O0 -g0 --main=GUI foo1.o
foo2.o..... -o ./a.out

Obviously, it seems that it cannot find AWT, but I don't know why and
how to solve this.

Many Thanks in advance for your help

David

2009/4/20 David Michel <dmichel76@googlemail.com>
>
> I get an error when doing ./contrib/download_ecj
>
> $ contrib/download_ecj
> [sudo] password for micd:
> Verbose mode on.
> Hash mark printing on (1024 bytes/hash mark).
> 331 Anonymous login ok, send your complete email address as your password
> 230-
>                *** Welcome to the ftp server for sourceware.org/gcc.gnu.org ***
>
>     You are user 20 out of a maximum of 30 authorized anonymous logins.
>     The current time here is Mon Apr 20 13:46:01 2009.
>     If you experience any problems here, contact : overseers at this site
>
>
> 230 Anonymous login ok, restrictions apply.
> Remote system type is UNIX.
> Using binary mode to transfer files.
> 250 CWD command successful
> 200 Type set to I
> local: ecj-latest.jar remote: ecj-latest.jar
> 421 Service not available, remote server has closed connection
> mv: cannot stat `ecj-latest.jar': No such file or directory
>
>
> This might be due to very restrictive firewall settings... so I'll
> download ecj-latest.jar and put it in the gcc source tree as ecj.jar
> and redo the configure ; make ; make install process...
>
> Cheers
>
> David
>
>
> 2009/4/20 Andrew Haley <aph@redhat.com>:
> > David Michel wrote:
> >> Hi Andrew,
> >>
> >> Thanks a lot for this link!
> >>
> >> Do I have to rename the ecj-4.3.jar to ecj.jar to be recognised ?
> >
> > ecj1 is a script that looks like this:
> >
> > #!/bin/sh
> > gij -cp <somepath>/ecj.jar \
> >    org.eclipse.jdt.internal.compiler.batch.GCCMain \
> >    ${1+"$@"}
> >
> >> what do you mean exactly by "topmost source tree" ? Is
> >> ~/gcc-4_4-branch (i.e. the main folder created by the the svn checkout
> >> command) OK ?
> >
> > Yes.
> >
> >> How can I make sure that the ./configure script has "found" it ?
> >
> > Go into the top of the gcc source tree and type
> > ./contrib/download_ecj
> >
> > Andrew.
> >

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-22  9:53         ` David Michel
@ 2009-04-22 10:03           ` Andrew Haley
  2009-04-22 10:14             ` David Michel
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Haley @ 2009-04-22 10:03 UTC (permalink / raw)
  To: David Michel; +Cc: java

David Michel wrote:
> Thanks it compiles fine now, but now I get an Exception at runtime:
> 
> Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
>    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
>    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
>    at java.awt.Window.<init>(Window.java:133)
>    at java.awt.Frame.<init>(Frame.java:246)
>    at javax.swing.JFrame.<init>(JFrame.java:114)
>    at nl.kbna.dioscuri.GUI.<init>(dioscuri)
>    at nl.kbna.dioscuri.GUI.<init>(dioscuri)
>    at nl.kbna.dioscuri.GUI.main(dioscuri)
> Caused by: java.lang.ClassNotFoundException:
>    at java.lang.Class.forName(natClass.cc:101)
>    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
>    ...7 more
> 
> I simply run this for all the java source code to produce the object files:
> /local/gcc-4_4-branch/install/bin/gcj -O0 -g0 -c "--classpath=./:"
> foo.java -o foo.o
> 
> and then, link them together with:
> /local/gcc-4_4-branch/install/bin/gcj -O0 -g0 --main=GUI foo1.o
> foo2.o..... -o ./a.out
> 
> Obviously, it seems that it cannot find AWT, but I don't know why and
> how to solve this.

http://gcc.gnu.org/install/configure.html

AWT-Specific Options

--with-x
    Use the X Window System.

--enable-java-awt=PEER(S)

    Specifies the AWT peer library or libraries to build alongside
    `libgcj'. If this option is unspecified or disabled, AWT will be
    non-functional. Current valid values are gtk and xlib. Multiple
    libraries should be separated by a comma
    (i.e. --enable-java-awt=gtk,xlib).

I'd use gtk.

Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-22 10:03           ` Andrew Haley
@ 2009-04-22 10:14             ` David Michel
  2009-04-22 10:43               ` Andrew Haley
  0 siblings, 1 reply; 13+ messages in thread
From: David Michel @ 2009-04-22 10:14 UTC (permalink / raw)
  To: Andrew Haley, java

But I did put use the options:
$ ./configure --enable-languages=java
--prefix=/local/gcc-4_4-branch/install --enable-java-home
--enable-java-awt=gtk

although I didn't put --with-x

Is that the problem ?

cheers

David




2009/4/22 Andrew Haley <aph@redhat.com>
>
> David Michel wrote:
> > Thanks it compiles fine now, but now I get an Exception at runtime:
> >
> > Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
> >    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:607)
> >    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:103)
> >    at java.awt.Window.<init>(Window.java:133)
> >    at java.awt.Frame.<init>(Frame.java:246)
> >    at javax.swing.JFrame.<init>(JFrame.java:114)
> >    at nl.kbna.dioscuri.GUI.<init>(dioscuri)
> >    at nl.kbna.dioscuri.GUI.<init>(dioscuri)
> >    at nl.kbna.dioscuri.GUI.main(dioscuri)
> > Caused by: java.lang.ClassNotFoundException:
> >    at java.lang.Class.forName(natClass.cc:101)
> >    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:583)
> >    ...7 more
> >
> > I simply run this for all the java source code to produce the object files:
> > /local/gcc-4_4-branch/install/bin/gcj -O0 -g0 -c "--classpath=./:"
> > foo.java -o foo.o
> >
> > and then, link them together with:
> > /local/gcc-4_4-branch/install/bin/gcj -O0 -g0 --main=GUI foo1.o
> > foo2.o..... -o ./a.out
> >
> > Obviously, it seems that it cannot find AWT, but I don't know why and
> > how to solve this.
>
> http://gcc.gnu.org/install/configure.html
>
> AWT-Specific Options
>
> --with-x
>    Use the X Window System.
>
> --enable-java-awt=PEER(S)
>
>    Specifies the AWT peer library or libraries to build alongside
>    `libgcj'. If this option is unspecified or disabled, AWT will be
>    non-functional. Current valid values are gtk and xlib. Multiple
>    libraries should be separated by a comma
>    (i.e. --enable-java-awt=gtk,xlib).
>
> I'd use gtk.
>
> Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-22 10:14             ` David Michel
@ 2009-04-22 10:43               ` Andrew Haley
  2009-04-22 10:53                 ` David Michel
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Haley @ 2009-04-22 10:43 UTC (permalink / raw)
  To: David Michel; +Cc: java

David Michel wrote:
> But I did put use the options:
> $ ./configure --enable-languages=java
> --prefix=/local/gcc-4_4-branch/install --enable-java-home
> --enable-java-awt=gtk

Oh.

> although I didn't put --with-x
> 
> Is that the problem ?

I don't think so.
But the odd line is this:

Caused by: java.lang.ClassNotFoundException:

There should be a class name at the end of that line.

Try this:

import gnu.classpath.SystemProperties;
public class Tool
{
  private static String default_toolkit_name
    = gnu.classpath.Configuration.default_awt_peer_toolkit;

  public static void main(String[] args)
  {
    System.out.println(default_toolkit_name);
    System.out.println(SystemProperties.getProperty
		       ("awt.toolkit",
			default_toolkit_name));
  }
}

Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-22 10:43               ` Andrew Haley
@ 2009-04-22 10:53                 ` David Michel
  2009-04-22 10:58                   ` Andrew Haley
  0 siblings, 1 reply; 13+ messages in thread
From: David Michel @ 2009-04-22 10:53 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

just compiled it with

$ /local/gcc-4_4-branch/install/bin/gcj -O0   -g0  "--classpath=./:"
Tool.java -o Tool.out --main=Tool

and got:

$ ./Tool.out


$
$

so,  2 empty lines....

I would have expected something like gnu.java.awt.peer.gtk.GtkToolkit
, which is what happens when I use gcj 4.2 already installed

David.

2009/4/22 Andrew Haley <aph@redhat.com>:
> David Michel wrote:
>> But I did put use the options:
>> $ ./configure --enable-languages=java
>> --prefix=/local/gcc-4_4-branch/install --enable-java-home
>> --enable-java-awt=gtk
>
> Oh.
>
>> although I didn't put --with-x
>>
>> Is that the problem ?
>
> I don't think so.
> But the odd line is this:
>
> Caused by: java.lang.ClassNotFoundException:
>
> There should be a class name at the end of that line.
>
> Try this:
>
> import gnu.classpath.SystemProperties;
> public class Tool
> {
>  private static String default_toolkit_name
>    = gnu.classpath.Configuration.default_awt_peer_toolkit;
>
>  public static void main(String[] args)
>  {
>    System.out.println(default_toolkit_name);
>    System.out.println(SystemProperties.getProperty
>                       ("awt.toolkit",
>                        default_toolkit_name));
>  }
> }
>
> Andrew.
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-22 10:53                 ` David Michel
@ 2009-04-22 10:58                   ` Andrew Haley
  2009-04-22 11:07                     ` David Michel
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Haley @ 2009-04-22 10:58 UTC (permalink / raw)
  To: David Michel; +Cc: java

David Michel wrote:
> just compiled it with
> 
> $ /local/gcc-4_4-branch/install/bin/gcj -O0   -g0  "--classpath=./:"
> Tool.java -o Tool.out --main=Tool
> 
> and got:
> 
> $ ./Tool.out
> 
> 
> $
> $
> 
> so,  2 empty lines....
> 
> I would have expected something like gnu.java.awt.peer.gtk.GtkToolkit
> , which is what happens when I use gcj 4.2 already installed
> 
> David.
> 
> 2009/4/22 Andrew Haley <aph@redhat.com>:
>> David Michel wrote:
>>> But I did put use the options:
>>> $ ./configure --enable-languages=java
>>> --prefix=/local/gcc-4_4-branch/install --enable-java-home
>>> --enable-java-awt=gtk

Oh no, you configured in srcdir, don't ever do that.  I'm surprised
it built.

I'm going to build 4.4 with exactly your options (but not configured
in srcdir!) to see if I can duplicate the problem.

Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-22 10:58                   ` Andrew Haley
@ 2009-04-22 11:07                     ` David Michel
  2009-04-22 14:26                       ` Andrew Haley
  0 siblings, 1 reply; 13+ messages in thread
From: David Michel @ 2009-04-22 11:07 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

Oh no sorry I didn't configure in srcdir... I did it exactly like you
first told me:

$ svn co http://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch/
$ mkdir gcc-4_4-branch/obj-x86_64-unknown-linux-gnu
$ cd gcc-4_4-branch/obj-x86_64-unknown-linux-gnu
$ `pwd`/../configure --enable-languages=java
--prefix=/local/gcc-4_4-branch/install --enable-java-home
--enable-java-awt=gtk

sorry about the confusion,  I did think it doesn't matter where one
run the configure script so I typed "./configure" instead of
"`pwd`/../configure" (lazyness I guess) .... But I did run it from
gcc-4_4-branch/obj-x86_64-unknown-linux-gnu.

So thanks for pointing that out anyway. I might have done that mistake
in the future.

Looking forward to see what your build will produce !

Cheers
David





2009/4/22 Andrew Haley <aph@redhat.com>:
> David Michel wrote:
>> just compiled it with
>>
>> $ /local/gcc-4_4-branch/install/bin/gcj -O0   -g0  "--classpath=./:"
>> Tool.java -o Tool.out --main=Tool
>>
>> and got:
>>
>> $ ./Tool.out
>>
>>
>> $
>> $
>>
>> so,  2 empty lines....
>>
>> I would have expected something like gnu.java.awt.peer.gtk.GtkToolkit
>> , which is what happens when I use gcj 4.2 already installed
>>
>> David.
>>
>> 2009/4/22 Andrew Haley <aph@redhat.com>:
>>> David Michel wrote:
>>>> But I did put use the options:
>>>> $ ./configure --enable-languages=java
>>>> --prefix=/local/gcc-4_4-branch/install --enable-java-home
>>>> --enable-java-awt=gtk
>
> Oh no, you configured in srcdir, don't ever do that.  I'm surprised
> it built.
>
> I'm going to build 4.4 with exactly your options (but not configured
> in srcdir!) to see if I can duplicate the problem.
>
> Andrew.
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: gcj: error trying to exec 'ecj1': execvp
  2009-04-22 11:07                     ` David Michel
@ 2009-04-22 14:26                       ` Andrew Haley
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Haley @ 2009-04-22 14:26 UTC (permalink / raw)
  To: David Michel; +Cc: java

David Michel wrote:
> Oh no sorry I didn't configure in srcdir... I did it exactly like you
> first told me:
> 
> $ svn co http://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch/
> $ mkdir gcc-4_4-branch/obj-x86_64-unknown-linux-gnu
> $ cd gcc-4_4-branch/obj-x86_64-unknown-linux-gnu
> $ `pwd`/../configure --enable-languages=java
> --prefix=/local/gcc-4_4-branch/install --enable-java-home
> --enable-java-awt=gtk
> 
> sorry about the confusion,  I did think it doesn't matter where one
> run the configure script so I typed "./configure" instead of
> "`pwd`/../configure" (lazyness I guess) .... But I did run it from
> gcc-4_4-branch/obj-x86_64-unknown-linux-gnu.
> 
> So thanks for pointing that out anyway. I might have done that mistake
> in the future.
> 
> Looking forward to see what your build will produce !

Works for me.

Check for these files in your build dir:

x86_64-unknown-linux-gnu/libjava/config.log:4908:#define AWT_TOOLKIT "gnu.java.awt.peer.gtk.GtkToolkit"
x86_64-unknown-linux-gnu/libjava/config.status:1403:${ac_dA}AWT_TOOLKIT${ac_dB}AWT_TOOLKIT${ac_dC}"gnu.java.awt.peer.gtk.GtkToolkit"${ac_dD}
x86_64-unknown-linux-gnu/libjava/config.status:1568:${ac_uA}AWT_TOOLKIT${ac_uB}AWT_TOOLKIT${ac_uC}"gnu.java.awt.peer.gtk.GtkToolkit"${ac_uD}
x86_64-unknown-linux-gnu/libjava/include/config.h:5:#define AWT_TOOLKIT "gnu.java.awt.peer.gtk.GtkToolkit"

The only thing I can think of is that you reconfigured but didn't
delete the build dir.

You can just edit config.h by hand.

Andrew.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-04-22 14:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-20 12:49 gcj: error trying to exec 'ecj1': execvp David Michel
2009-04-20 12:55 ` Andrew Haley
2009-04-20 13:27   ` David Michel
2009-04-20 13:39     ` Andrew Haley
2009-04-20 13:53       ` David Michel
2009-04-22  9:53         ` David Michel
2009-04-22 10:03           ` Andrew Haley
2009-04-22 10:14             ` David Michel
2009-04-22 10:43               ` Andrew Haley
2009-04-22 10:53                 ` David Michel
2009-04-22 10:58                   ` Andrew Haley
2009-04-22 11:07                     ` David Michel
2009-04-22 14:26                       ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).