This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/41356] New: Circular dependencies between jars cause errors: jars order shouldn't matter


I am trying to compile many jars into one native executable with the following
command:

/usr/local/gcc/gcc-4.3.1-java/bin/gcj -combine -R
/usr/local/gcc/gcc-4.3.1-java/lib --main=com.xxx.MyClass \
  /usr/local/share/java/commons-logging-1.1.1.jar \
  /usr/local/share/java/avalon-framework-4.2.0.jar \
  <skipped other jars>

I am getting this error:
org/apache/commons/logging/impl/AvalonLogger.java: In class
'org.apache.commons.logging.impl.AvalonLogger':
org/apache/commons/logging/impl/AvalonLogger.java: In constructor
'(java.lang.String)':
org/apache/commons/logging/impl/AvalonLogger.java:79: error: cannot find file
for class org.apache.avalon.framework.logger.Logger

If I swap the two first jars I get this error:
org/apache/avalon/framework/logger/AbstractLoggable.java: In class
'org.apache.avalon.framework.logger.AbstractLoggable':
org/apache/avalon/framework/logger/AbstractLoggable.java: In method
'org.apache.avalon.framework.logger.AbstractLoggable.setupLogger(java.lang.Object,java.lang.String)':
org/apache/avalon/framework/logger/AbstractLoggable.java:80: error: cannot find
file for class org.apache.log.Logger

So either org/apache/avalon/framework can't find org.apache.log or the way
around.

Even before getting this error I noticed that depending jars should be
specified after dependent ones.

I believe this is wrong: jars actually can inter-depend on each other and
should all be treated equally independent of their order in command line.


-- 
           Summary: Circular dependencies between jars cause errors: jars
                    order shouldn't matter
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yuri at tsoft dot com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]