Hello
I am compiling a rather large project, a CORBA middleware implementation
called JacORB using abc. The final jar size is ~5MB when compiled with
Java.
I am encountering an error with all the versions of abc that I have
tried so far (1.1.0, 1.1.1, 1.2.0).
I have intentionally not included the project files that I am building
since it is rather big and has a complicated build process. And, I have
been unsuccessful in reproducing the bug with a smaller subset of the
source files.
However, I have included the error stack trace that I encountered. I can
see that it is an internal error in Polyglot. Does the stack trace help
you advise me about the error and reproducing it?
The error line states --- ``Duplicate enum "collect-source-files"''
Perhaps the following details may be of help.
I am building using Ant. I am already providing 1GB maximum heap space
for the Ant process. This was a common error with the AspectJ compiler.
ANT_OPTS = -Xmx1024M -XX:MaxPermSize=256M
I am wondering if this is a running-out-of-heap-space error OR an error
being triggered because abc is recompiling and weaving files that have
already been compiled and woven into?
To explain the latter:
- JacORB is built in a series of stages. In the first stage files from a
package directory are built, then files from another directory and so
on.
- But many, times, a forward reference occurs in the build process. Say,
files being compiled in Stage 1 refer to files from Stage 2 that have
not yet been compiled. Now, the Java compiler and the Java Ant task
are smart enough to figure this out and use the sourcepathref task
attribute to resolve such forward references and compile them. And
once the Java compiler reaches Stage 2, it does not need to recompile
classes that are already compiled.
- However, the IAJC Ant task does not have the sourcepathref attribute
and so I have resolved such forward references by identifying and
explicitly listing such class files in the relevant stages.
- The AspectJ compiler does not have any problems with this technique
when building with Ant. Any aspects encountered in the later stages
are correctly woven into class files compiled in previous stages. This
also includes the forward referenced classes. When compiling with AJDT
none of this even matters. AJDT and Eclipse manage this automatically.
- However, when building with ABC and Ant, I wonder if ABC is unable to
handle this style of compilation. I imagine ABC creates some data
structure that maintains all the crosscutting information. Perhaps,
ABC cannot handle files that have already been compiled and maybe
woven into, in essence binary `re'-weaving.
This is just my theory based on the Polyglot error message. Perhaps I am
wrong altogether and the error is completely unrelated to this build
technique.
If this is not enough to identify the bug, I will provide the sources
for the project that I am building.
Thanks
Venkat
jacorb-javac:
[echo] Compiling for tracing
[iajc] *** Option -g ignored: abc does not yet support creating debug info.
[iajc] *** Option -target 1.4 ignored: abc-generated code should run on any 1.1 - 1.4 VM.
[iajc] abc started on Wed Apr 18 21:44:34 MDT 2007
[iajc] polyglot.util.InternalCompilerError: unhandled exception during compilation
[iajc] at abc.main.Main.run(Main.java:653)
[iajc] at abc.main.AntTask.execute(AntTask.java:182)
[iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[iajc] at org.apache.tools.ant.Task.perform(Task.java:364)
[iajc] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
[iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[iajc] at org.apache.tools.ant.Task.perform(Task.java:364)
[iajc] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:378)
[iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[iajc] at org.apache.tools.ant.Task.perform(Task.java:364)
[iajc] at org.apache.tools.ant.Target.execute(Target.java:341)
[iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
[iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
[iajc] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
[iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[iajc] at org.apache.tools.ant.Task.perform(Task.java:364)
[iajc] at org.apache.tools.ant.Target.execute(Target.java:341)
[iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
[iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
[iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[iajc] at org.apache.tools.ant.Task.perform(Task.java:364)
[iajc] at org.apache.tools.ant.Target.execute(Target.java:341)
[iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
[iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
[iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[iajc] at org.apache.tools.ant.Task.perform(Task.java:364)
[iajc] at org.apache.tools.ant.Target.execute(Target.java:341)
[iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[iajc] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
[iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[iajc] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
[iajc] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[iajc] at org.apache.tools.ant.Task.perform(Task.java:364)
[iajc] at org.apache.tools.ant.Target.execute(Target.java:341)
[iajc] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[iajc] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[iajc] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[iajc] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[iajc] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[iajc] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[iajc] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[iajc] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[iajc] Caused by: java.lang.ExceptionInInitializerError
[iajc] at abc.main.AbcExtension.makeExtensionInfo(AbcExtension.java:129)
[iajc] at abc.main.Main.compile(Main.java:856)
[iajc] at abc.main.Main.run(Main.java:527)
[iajc] ... 52 more
[iajc] Caused by: polyglot.util.InternalCompilerError: Duplicate enum "collect-source-files"
[iajc] at polyglot.util.Enum.<init>(Enum.java:23)
[iajc] at polyglot.frontend.Pass$ID.<init>(Pass.java:16)
[iajc] at abc.aspectj.ExtensionInfo.<clinit>(ExtensionInfo.java:54)
[iajc] ... 55 more
BUILD FAILED
workspace-testing/Part3a_JacORB_Compilation/jacorb_build.xml:23: The following error occurred while executing this line:
workspace-testing/Part3a_JacORB_Compilation/src/org/jacorb/build.xml:36: The following error occurred while executing this line:
workspace-testing/Part3a_JacORB_Compilation/src/org/jacorb/util/build.xml:36: The following error occurred while executing this line:
workspace-testing/Part3a_JacORB_Compilation/src/org/jacorb/util/tracing/build.xml:14: The following error occurred while executing this line:
workspace-testing/Part3a_JacORB_Compilation/etc/common.xml:202: The following error occurred while executing this line:
workspace-testing/Part3a_JacORB_Compilation/etc/common.xml:95: polyglot.util.InternalCompilerError: unhandled exception during compilation
Total time: 2 minutes 16 seconds
Received on Thu Apr 19 05:52:12 2007
This archive was generated by hypermail 2.1.8 : Thu Apr 19 2007 - 06:20:08 BST