Building frysk-gui sometimes gives an error like the following (this is trimmed down). If the order of files.list is changed then it works okay. gcj -C -d . -classpath . @./files.list # files in one order ExitNotificationObserver.java: In class 'frysk.gui.monitor.observers.ExitNotificationObserver': ExitNotificationObserver.java: In constructor '()': ExitNotificationObserver.java:44: error: Can't find method ‘dontSaveObject()’ in type ‘frysk.gui.monitor.actions.TaskAction’. myAction.dontSaveObject(); ^ ExitNotificationObserver.java:46: error: Can't find method ‘addAction(Lfrysk/gui/monitor/actions/TaskAction;)’ in type ‘frysk.gui.monitor.actions.TaskActionPoint’. this.taskActionPoint.addAction(myAction); ^ 2 errors % gcj -C -d . -classpath . @./files0.list # files in another order % cat files.list ExitNotificationObserver.java AddTaskObserverAction.java TaskAction.java % cat files0.list AddTaskObserverAction.java ExitNotificationObserver.java TaskAction.java
Created attachment 1031 [details] reproducing test case
Created attachment 1032 [details] Please use this makefile instead of the one in 2670.tbz
- Is the test expected to pass, or fail? At present it fails causing the test run to also fail. - Are all the class files really needed (remember the code is GPL so being able to build from the most natural form is a requirement)?
Subject: Re: building frysk-gui depends on files.list order cagney at redhat dot com wrote: > ------- Additional Comments From cagney at redhat dot com 2006-05-30 06:32 ------- > - Is the test expected to pass, or fail? At present it fails causing the test > run to also fail. The test reproduces the problem, so if gcj has the problem (always true at present I believe) then the test will fail. > - Are all the class files really needed (remember the code is GPL so being able > to build from the most natural form is a requirement)? Unfortunately, that is the minimal testcase I could come up with. Refactoring things caused the problem to go away. I pinged Bryce. Perhaps knowing what the fix is will enable writing a more minimal test.
Index: frysk-imports/tests/ChangeLog 2006-06-09 Andrew Cagney <cagney@redhat.com> * Makefile.am (frysk2670_FILES): Drop frysk2670/files0.list and frysk2670/files.list. (frysk2670/gcj.sh): List files explicitly. * frysk2670/files0.list: Delete. * frysk2670/files.list: Delete.
This greatly simplifies the test, it was done as a sequence of incremental commits. 2006-06-10 Andrew Cagney <cagney@redhat.com> * frysk2670/Action.java: Move ... * frysk2670/one/Action.java: ... to here. * frysk2670/AddTaskObserverAction.java: Move ... * frysk2670/one/AddTaskObserverAction.java: .. to here. * frysk2670/ExitNotificationObserver.java: Move ... * frysk2670/one/ExitNotificationObserver.java: ... to here. * frysk2670/TaskAction.java: Move ... * frysk2670/one/TaskAction.java: ... to here. * Makefile.am: Update. (XFAIL_TESTS): Add frysk2670/gcj.sh. * Makefile.am (frysk2670/gcj.sh): Do not pass frysk.jar to GCJ. Add $(srcdir) to include path. (EXTRA_DIST): Remove frysk.jar. * frysk2670/frysk.jar: Delete. * frysk2670/other/Action.java: New file. * frysk2670/Action.java: Change package to "one". * frysk2670/AddTaskObserverAction.java: Ditto. * frysk2670/ExitNotificationObserver.java: Ditto. * frysk2670/TaskAction.java: Ditto. * frysk2670/LiaisonItem.java: Delete. * frysk2670/Action.java: Fold in LiaisonItem.java, simplify. * frysk2670/TaskAction.java: Simplify. * frysk2670/Action.java: Update. * frysk2670/AddTaskObserverAction.java: Update. * frysk2670/ExitNotificationObserver.java: Update. * Makefile.am (frysk2670_FILES): Remove LiaisonItem.java. * Makefile.am (frysk2670_FILES): Remove GuiObject.java. (frysk2670/gcj.sh): Explicitly check for exit status. * frysk2670/GuiObject.java: Delete. * frysk2670/LiaisonItem.java: Merge in GuiObject.java. * frysk2670/AddTaskObserverAction.java: Update. * frysk2670/ExitNotificationObserver.java: Update. * Makefile.am (frysk2670/gcj.sh): Use frysk2670_FILES. (frysk2670_FILES): Add LiaisonItem.java, Event.java, and GuiObject.java. * frysk2670/LiaisonItem.java: Copy from frysk-gui, trim down. * frysk2670/Event.java: Ditto. * frysk2670/GuiObject.java: Ditto.
Pushed upstream, test marked as XFAIL: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27985 Work around is to, when there are duplicate object names, only have the local one in scope.