This is a fresh installation from Debian testing (Etch). (Well, I downgraded to gcj-4.0, and then upgraded to gcj-4.1). It's been about a month since I've used this at all, but it was "sort of" working then. I attribute the "sort of" to my skill level. The compile command was: gcj-4.1 --main=Hello -o Hello Hello.java Yielding: gcj-4.1: error trying to exec 'cc1': execvp: No such file or directory FWIW, the Hello.java file was: public class Hello { public static void main (String argv[]) { System.out.println ("Hello, World!"); } } I suspect that this should have failed, as I suspect that I needed to import System...the example in the book didn't show any import, however, so I didn't include one.
You forgot to also install the C compiler. I am assuming you isntalled gcj via apt-get which means you also need to install gcc-4.0.
Subject: Re: gcj-4.1: error trying to exec 'cc1': execvp: No such file or directory pinskia at gcc dot gnu dot org wrote: > ------- Comment #1 from pinskia at gcc dot gnu dot org 2006-05-24 21:42 ------- > You forgot to also install the C compiler. > I am assuming you isntalled gcj via apt-get which means you also need to > install gcc-4.0. That *sounds* reasonable...but I can't figure out which package you are referring to. Here's a list of what synaptic is reporting as installed when I search for gcc: cpp, cpp-2.95, cpp-3.3, cpp-3.4, cpp-4.0, cpp-4.1, g++-2.95, g++-3.4, gcc, gcc-2.95, gcc-3.3, gcc-3.3-base, gcc-3.3-doc, gcc-3.4, gcc-3.4-base, gcc-3.4-doc, gcc-4.1, gcc-4.1-base, gcc-4.1-doc, gcc-4.1-locales, gcc-4.1-source, gcc-doc, gcj-4.1, gcj-4.1-base, gfortran-4.1, gnat-4.1, gobjc, gobjc-4.0, lib64gcc1, libaspell15c2, libfcc1, libgcj6, libgcj6-common, libgcj7, libgcj7-dev, libgcj7-jar, libstdc++2.10-dev, libstdc++2.10-glibc2.2, xutils The first thing I tried was to install some package that might have the "missing file". I didn't succeed. There are other packages, but I can't guess which one I might be missing.
I just noticed that the suggestion was to install gcc-4.0 rather than gcc-4.1, which is what is installed. This seems counterintuitive as the gcj version is 4.1, but I'll see what effect it has. Perhaps the suggestion was rather to revert to gcj-4.0?
This is a Debian problem, not an upstream problem. You missed to install the build-essesntial package in debian. That would have installed all needd stuff for you. Closing as invalid.