Re: Gnome-Libs error (PR#325)



Martin Baulig <martin@home-of-linux.org> wrote:
> Full_Name: Teri Yakimoto writes:
> > Hi!
> > When i compile Gnome-Libs 0.25, 0.26 or 0.27, i have a fatale error with
> > gnomessupport-fake.h. This file try to include gnomesupport.h (this file
> don't
> > come with the Libs package.). I have 1/2 fixed this bug... I use the
> > gnomesupport.h from the Gnome-libs 0.20.
> 
> Since there are so many people complaining about `gnomesupport.h' I'm
> wondering whether there really may be a serious problem with it.
> 
> The problem is as follows:
> 
> * in the `Makefile.am', `libgnomesupport.la' depends upon `gnomesupport.h' -
>   so it will be genereted whenever `make' attempts to make
>   `libgnomesupport.la'.

Nope.  If you see the generated Makefile.in, you'll see that
`gnomesupport.h' is not one of the dependencies of libgnomesupport.la.
My ChangeLog entry is wrong, as Tom pointed out.
 
> * `libgnomesupport.la' is only made when it is really needed 
> (configure checks for this).
> 
> * If the support stuff is _not_ required, no program should ever include
>   `gnomesupport.h' nor `gnomesupport-fake.h'.

Yep.  But for now, `libgnomesupport.la' should always be built, except
for those _few_ people using experimental releases of GNU Libc 2.1.

> * A `find' over all source and header files in the following modules
> 
>   glib, gtk+, imlib, gnome-libs, gnome-objc, gnome-guile,
>   gnome-core, gnome-admin, gnome-network, gnome-utils, ORBit, mico, grpm,
>   gnumeric, gnome-xml, mc, ee
> 
>   showed me that there is really no file which includes
>   `gnomesupport-fake.h'.

You didn't check gnome-libs/support, then.  `error.c' includes
gnomesupport-fake.h. 

> * `gnomesupport.h' should *only* be included when `NEED_GNOMESUPPORT_H' is
>   defined. Another `find' over the same modules showed me that this is 
>   correct.  In detail, the only file that includes `gnomesupport.h' is
>   `gnome-libs/gnome.h'.

And support/gnomesupport-fake.h.

> This doesn't show my any way how `gnomesupport.h' should not be
> created when it's required.

Actually, there is definitely a way.  A `.h' in BUILT_SOURCES which is
only included by a configure-decided file (as in @LIBOBJS@) may not get
created when needed IF the build for the person who did `make dist' does
not compile that particular file.

In fact, `gnomesupport.h' will be built on a `make install', since it is
an installed file.  The problem is that this is too late for some of the
files in support/ which include it.

In our scenario, `gnomesupport.h' is included by support/error.c.
Quartic/Miguel probably created the `gnome-libs' tarball on a Linux m/c.
On such a machine, error.c is not built, and the corresponding
.deps/error.P file is not created.  So, on a `make dist', the generated
Makefile does not list `gnomesupport.h' as a dependency of error.c.

Now, go to the person who is building out of the tarball.  If she is
building on a non-Linux m/c., she'll find that `error.o' is listed in
LIBOBJS, and so error.c is compiled.  Now, error.c includes
`gnomesupport.h'.  For the reason explained before, `gnomesupport.h' is
not created before `error.c' is built, because `make' doesn't know of
the dependency.

And before you ask, the reason it works for people who run out of CVS
is that usually the Makefile.in file lists $(BUILT_SOURCES) as a
dependency of Makefile, but in the --include-deps case (make dist), it
does not.  The end effect is that:

	- For maintainer-mode, BUILT_SOURCES is the first thing to be
          built.
	- For tarball users, BUILT_SOURCES may be first, in the
          middle, the last to be built, or not built at all.

> I also didn't find `gnomesupport.h' or `gnomesupport-fake.h' be listed
> somewhere in the `POTFILES.in'. 

Right.

> Well, and while writing this long mail I really forgot *one* file:
> `gnomesupport-fake.h' itself includes `gnomesupport.h' not only if
> `NEED_GNOMESUPPORT_H' is defined !
>
> Just fixed this in CVS.
> 
> Hopefully, all `gnomesupport.h' problems are solved now.

I don't think this'll help.  `gnomesupport-fake.h' is included only in
a subset of those cases where NEED_GNOMESUPPORT_H is defined.  It is
guaranteed that NEED_GNOMESUPPORT_H is defined when
`gnomesupport-fake.h' is included (by error.c).

> If not, my thoughts above may perhaps help solving them, so I send this
> mail anyway ...

You'll be the second guy who commited to CVS thinking that the problem
is solved ;-).

For now, I think you can either add a:

	error.c: gnomesupport.h

dependency, or Quartic/Miguel can `make dist' on an IRIX or Solaris m/c.

- Hari
-- 
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]