Bug 174310 - gcj imports wrong class
Summary: gcj imports wrong class
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc4 (Show other bugs)
(Show other bugs)
Version: 4.0
Hardware: All Linux
medium
low
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 168429 173278
TreeView+ depends on / blocked
 
Reported: 2005-11-27 17:33 UTC by Andrew Cagney
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHBA-2006-0127
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-07 18:25:41 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0127 qe-ready SHIPPED_LIVE gcc4 bug fix and enhancement update 2006-03-06 05:00:00 UTC
Sourceware 1929 None None None Never

Description Andrew Cagney 2005-11-27 17:33:21 UTC
This fails; workaround at end:

$ gcj -I . -C -d classes frysk/sys/Wait.java frysk/model/Signal.java
frysk/event/Signal.java frysk/event/SignalEvent.java frysk/proc/LinuxHost.java
frysk/event/SignalEvent.java:3: error: Can't access class âfrysk.model.Signalâ.
Only public classes and interfaces in other packages can be accessed.
       extends Signal
               ^
frysk/event/SignalEvent.java:0: confused by earlier errors, bailing out

(the order of the parameters is very important) given the files:

<< frysk/event/SignalEvent.java >>
package frysk.event;
public abstract class SignalEvent
    extends Signal
{
    public SignalEvent (int signal)
    {
        super (signal);
    }
}
<< frysk/event/Signal.java >>
package frysk.event;
public class Signal
{
    public Signal (int signal)
    {
    }
}
<< frysk/model/Signal.java >>
package frysk.model;
class Signal
{
}
<< frysk/proc/LinuxHost.java >>
package frysk.proc;
import frysk.event.SignalEvent;
import frysk.sys.Wait;
public class LinuxHost
{
    class PollWaitOnSigChld
        extends SignalEvent
    {
        PollWaitOnSigChld ()
        {
            super (0);
        }
        Wait.Observer waitObserver = new Wait.Observer ()
            {
            };
        public final void execute ()
        {
        }
    }
}
<< frysk/sys/Wait.java >>
package frysk.sys;
public final class Wait
{
    public interface Observer
    {
    }
}


Workaround:

Specify the fully qualified path to the class, frysk.event.Signal in the case of
the above.

Comment 7 Red Hat Bugzilla 2006-03-07 18:25:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0127.html



Note You need to log in before you can comment on or make changes to this bug.