public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/21418] New: Order of source files matters when compiling
@ 2005-05-06 14:29 mark at gcc dot gnu dot org
  2005-05-06 14:31 ` [Bug java/21418] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: mark at gcc dot gnu dot org @ 2005-05-06 14:29 UTC (permalink / raw)
  To: java-prs

We occasionally get bug reports against GNU Classpath about strange compilation
errors. Kalle Olavi Niemitalo finally tracked it down. The order in which gcj -C
is given source files to compile. The smallest example given was:

gcj --bootclasspath '' --classpath .:vm/reference -C -d /tmp/obj
java/io/ObjectInputStream.java gnu/java/io/ClassLoaderObjectInputStream.java
gnu/java/rmi/server/RMIObjectInputStream.java
gnu/java/rmi/RMIMarshalledObjectInputStream.java
org/omg/CORBA/portable/InputStream.java

Which gives lots of errors like:

gnu/java/rmi/RMIMarshalledObjectInputStream.java:52: error: Class
'gnu.java.rmi.RMIMarshalledObjectInputStream' doesn't define the abstract method
'org.omg.CORBA.Object org.omg.CORBA.portable.InputStream.read_Object()' from
class 'org.omg.CORBA.portable.InputStream'. This method must be defined or class
'gnu.java.rmi.RMIMarshalledObjectInputStream' must be declared abstract.
   public class RMIMarshalledObjectInputStream extends RMIObjectInputStream

Obviously gcj somehow picked up the wrong InputStream class from the
org.omg.CORBA.portable package instead of the java.io package.

No compilation errors occur when changing the order of arguments to:

gcj --bootclasspath '' --classpath .:vm/reference -C -d /tmp/obj
org/omg/CORBA/portable/InputStream.java java/io/ObjectInputStream.java
gnu/java/io/ClassLoaderObjectInputStream.java
gnu/java/rmi/server/RMIObjectInputStream.java
gnu/java/rmi/RMIMarshalledObjectInputStream.java

This is with either a GNU Classpath 0.15 release or a CVS checkout done in the
top level directory.

Similar bahavior in 3.3, 3.4, 4.0 and 4.1 branches:
gcj (GCC) 3.3.5 (Debian 1:3.3.5-12) 
gcj-3.4 (GCC) 3.4.4 20050314 (prerelease) (Debian 3.4.3-12)
gcj (GCC) 4.0.1 20050505 (prerelease) 
gcj (GCC) 4.1.0 20050501 (experimental)

For GNU Classpath CVS I will "workaround" this issue by sorting the classes file
list. That way at least we will get uniform bug reports not depending on the
order in which find returns the source files.

-- 
           Summary: Order of source files matters when compiling
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mark at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org,kon at iki dot fi


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


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

end of thread, other threads:[~2005-10-01  6:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-06 14:29 [Bug java/21418] New: Order of source files matters when compiling mark at gcc dot gnu dot org
2005-05-06 14:31 ` [Bug java/21418] " pinskia at gcc dot gnu dot org
2005-05-06 14:50 ` mark at gcc dot gnu dot org
2005-05-09 10:03 ` bonzini at gcc dot gnu dot org
2005-05-10 13:55 ` bonzini at gcc dot gnu dot org
2005-09-11 22:29 ` mark at gcc dot gnu dot org
2005-09-11 23:36 ` cvs-commit at developer dot classpath dot org
2005-09-21  9:56 ` rmathew at gcc dot gnu dot org
2005-09-21 13:35 ` cvs-commit at gcc dot gnu dot org
2005-09-21 14:03 ` pinskia at gcc dot gnu dot org
2005-09-21 14:05 ` pinskia at gcc dot gnu dot org
2005-09-22 17:45 ` mckinlay at redhat dot com
2005-10-01  6:49 ` cvs-commit 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).