[forwarded from http://bugs.debian.org/369873]
GCJ fails with
Can't find default package 'core'. ...
when a class source file specifies `import core.*'. A full example is
If you try to compile this `project' like
gcj -d . src/Main.java src/core/Foo.java
the above mentioned error is reported. The same project works fine
with Sun's or Blackdown's Java compiler.
Suppose we have the directory structure
> find .
with the following contents of `src/Main.java':
// commenting out this line makes the classes compile.
public class Main
core.Foo foo = new core.Foo();
public static void main(String args)
Main m = new Main();
and the following contents of `src/core/Foo.java':
public class Foo
public void print()
Created attachment 12314 [details]
Note that -d doesn't do anything when compiling to object.
However, adding -C doesn't help either.
A simple workaround is to add -Isrc.
This is fixed on the gcj-eclipse branch, I marked this PR as
depending on PR 28067.
Perhaps gcj needs to handle -combine properly.
That would also help fix this, I think.
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.