Bug 1374 - Bad glade file?
Summary: Bad glade file?
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: Andrew Cagney
Depends on:
Blocks: 2235
  Show dependency treegraph
Reported: 2005-09-23 16:56 UTC by Anthony Green
Modified: 2006-01-31 16:24 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Green 2005-09-23 16:56:54 UTC
I'm on an x86 FC4 machine.

I was able to build and install frysk from the cvs sources, but I get the
following error when I try to run it.

$ ../i/bin/frysk
23-Sep-05 9:55:32 AM frysk.gui.FryskGui mainGui
SEVERE: procpop.glade XML is badly formed

Any ideas?
Comment 1 Anthony Green 2005-09-23 18:47:22 UTC
(In reply to comment #0)
> Any ideas?

I think there are two problems.

1. I used a relative path to run configure, so you end up with a relative path
for srcdir in Config.java.   The Makefile should turn this into an absolute path
before creating Config.java.

2. FryskGui seems to depend on the LibGlade contructor throwing a
FileNotFoundException if the glade file doesn't exist.  This isn't working for
me.  I had to add the following two lines to make it work:

--- frysk/gui/FryskGui.java     22 Sep 2005 20:30:56 -0000      1.15
+++ frysk/gui/FryskGui.java     23 Sep 2005 18:46:56 -0000
@@ -101,6 +101,8 @@
                String searchPath = new String();
                for (int i = 0; i < glade_dirs.length; i++) {
                        try {// command line glade_dir
+                               if (! new File(glade_dirs[i] + GLADE_FILE).exists())
+                                   throw new
FileNotFoundException(glade_dirs[i] + GLADE_FILE);
                                glade = new LibGlade(glade_dirs[i] + GLADE_FILE,
                        } catch (FileNotFoundException missingFile) {
                                searchPath += glade_dirs[i] + "\n";

Comment 2 Phil Muldoon 2005-09-23 19:41:07 UTC
I'll add the explicit throws declaration back in there (it was there at one
point, it may have gotten bumped when we shuffled this around this week). 

I'm not sure on the configure stuff as that is not really my strongest area, so
I'll leave this pr open in the meantime until someone looks at that.
Comment 3 Andrew Cagney 2005-09-30 18:14:00 UTC
Since frysk.bin.frysk is intended to run from the installed tree it will only
search installed directories.

On the other hand frysk.gui.FryskGui is intended to run from the build tree, so
includes many paths (the install tree not being one of them :-).  Relative vs
absolute SRCDIR is obviously an issue - if SRCDIR were absolute the relocatable
relative path camp would instead be complaining, sigh - in an attempt to keep
everyone happy it now searches both [relative] SRCDIR and ABS_SRCDIR :-)

Index: frysk-core/common/ChangeLog
2005-09-30  Andrew Cagney  <cagney@redhat.com>

        * Makefile.rules (.javain.java): Substitue abs_builddir,
        abs_srcdir, bindir, libdir, and libexecdir.

Index: frysk-core/frysk/ChangeLog
2005-09-30  Andrew Cagney  <cagney@redhat.com>

        * Config.javain: Add BINDIR, LIBDIR, LIBEXECDIR, ABS_SRCDIR, and

Index: frysk-gui/frysk/gui/ChangeLog
2005-09-30  Andrew Cagney  <cagney@redhat.com>

        * FryskGui.java: Append ABS_SRCDIR to glade search path list.