public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/29194] fails to import package from project
  2006-09-23 17:18 [Bug java/29194] New: fails to import package from project debian-gcc at lists dot debian dot org
@ 2006-09-23 17:18 ` debian-gcc at lists dot debian dot org
  2006-09-23 22:33 ` tromey at gcc dot gnu dot org
  2007-01-09 20:54 ` tromey at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2006-09-23 17:18 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from debian-gcc at lists dot debian dot org  2006-09-23 17:18 -------
Created an attachment (id=12314)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12314&action=view)
example


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29194


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

* [Bug java/29194]  New: fails to import package from project
@ 2006-09-23 17:18 debian-gcc at lists dot debian dot org
  2006-09-23 17:18 ` [Bug java/29194] " debian-gcc at lists dot debian dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2006-09-23 17:18 UTC (permalink / raw)
  To: java-prs

[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 
outlined below. 

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 . 
  ./src
  ./src/core
  ./src/core/Foo.java
  ./src/Main.java

with the following contents of `src/Main.java': 

  // commenting out this line makes the classes compile. 
  import core.*;

  public class Main 
  {
      public Main() 
      {
          core.Foo foo = new core.Foo();
          foo.print();
      }
      public static void main(String args[]) 
      {
          Main m = new Main();
      }
  }

and the following contents of `src/core/Foo.java': 

  package core;

  public class Foo 
  {
      public Foo()
      {}
      public void print() 
      {
        System.out.println("Hello, world");
      }
  }


-- 
           Summary: fails to import package from project
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29194


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

* [Bug java/29194] fails to import package from project
  2006-09-23 17:18 [Bug java/29194] New: fails to import package from project debian-gcc at lists dot debian dot org
  2006-09-23 17:18 ` [Bug java/29194] " debian-gcc at lists dot debian dot org
@ 2006-09-23 22:33 ` tromey at gcc dot gnu dot org
  2007-01-09 20:54 ` tromey at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-09-23 22:33 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from tromey at gcc dot gnu dot org  2006-09-23 22:33 -------
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.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |28067
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-09-23 22:33:23
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29194


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

* [Bug java/29194] fails to import package from project
  2006-09-23 17:18 [Bug java/29194] New: fails to import package from project debian-gcc at lists dot debian dot org
  2006-09-23 17:18 ` [Bug java/29194] " debian-gcc at lists dot debian dot org
  2006-09-23 22:33 ` tromey at gcc dot gnu dot org
@ 2007-01-09 20:54 ` tromey at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-09 20:54 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from tromey at gcc dot gnu dot org  2007-01-09 20:48 -------
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.
Thanks.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29194


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

end of thread, other threads:[~2007-01-09 20:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-23 17:18 [Bug java/29194] New: fails to import package from project debian-gcc at lists dot debian dot org
2006-09-23 17:18 ` [Bug java/29194] " debian-gcc at lists dot debian dot org
2006-09-23 22:33 ` tromey at gcc dot gnu dot org
2007-01-09 20:54 ` tromey at gcc dot gnu dot org

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).