Re: Gnome-Libs error (PR#325)



-----BEGIN PGP SIGNED MESSAGE-----

On 17 Aug 1998, Raja R Harinath wrote:

> To: Gnome BTS <bugs@gnome.org>
> Subject: Re: Gnome-Libs error (PR#325)
> From: Raja R Harinath <harinath@cs.umn.edu>
> 
> 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

Well, this seems to work. Thanks.

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

I checked the

	error.c: gnomesupport.h

fix with a `make dist' on RedHat 5.1 and compilation under FreeBSD -
works fine, `gnomesupport.h' is created just before `error.c' is
compiled ...

Btw, I added the required `#include <sys/types.h>' to
`gnomesupport-fake.h' to get `size_t' under FreeBSD.

Martin

> 
> - 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
> 
> 
> -- 
>          To unsubscribe: mail gnome-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.
> 

- -----------------------------------------------------------------
   Martin Baulig - Angewandte Mathematik - Universitaet Trier

   baulig@castor.uni-trier.de, http://www.home-of-linux.org/
   Key: 1024-bit key with ID C8178435 created 1997/01/24 
   ID:  67 C1 84 A0 47 F5 11 C5  5F 68 4C 84 99 05 C3 92
   Finger me for public key or fetch finger.txt from the url above
- ------------------------------------------------------------------


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQCVAwUBNdlqTIA8K7jIF4Q1AQG2lwQAuwqw5pTy4ofjoX5oszrxvCr64aMsk97B
4QqsAkTd3+RN6smJ6nwWYiGuDPkZDTr1bHIcaUz8dxcxaR8+8nznRqMsFSeD/0w5
MoYdvDiZ4HSpWc565aaGN9qnNSqk0D5xR8HbbXpy7ON1KMsmuX40iGQjPywxrnG/
6Ra2bJw3rTM=
=pij6
-----END PGP SIGNATURE-----



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