Re: Announce: gdl 0.7.8 released



> Public include files are not the only ones to put dependencies. The
> library itself could be using them inside -- which I believe is the case
> here.

That is true. If the library is using libxml-2.0 or libglade-2.0
inside, then the libgdl library files (*.so.*) are already linked to
the relevant libraries after they have been built. Thus all those
binary libraries to which the libgdl libraries are linked to become
dependencies of the libgdl package and not the libgdl-devel package.

It thus makes sense to check for the presence of the -devel or -dev
packages of libxml-2.0 or libglade-2.0 while building libgdl. I
believe this checking is done by M4 macros the configure.ac file and
not by the presence of 'Requires: ... libxml-2.0 libglade-2.0' in
gdl-1.0.pc.in. The *.pc file is only used by users using libgdl-devel
to build their own programs. Obviously, libgdl-devel has a dependency
on libgdl.

Why would a user is using libgdl-devel to build his own program need
to check for libxml-2.0.pc or libglade-2.0.pc since he is looking only
at the interface provided by the libgdl-devel header files and the
compiled libgdl shared libraries (*.so.*)? (The libxml-2.0.pc and
libglade-2.0.pc files are provided by libxml2-devel and
libglade2-devel alongwith the *.h files; while the binary libraries
are provided by the libxml2 and libglade2 packages). So even if the
user had the libxml and lbglade binary libraries, he might not (and
need not) have their respective headers and *.pc files since the
libgdl-devel headers do not mention any header from them.

>> If indeed the libxml-2.0 or libglade-2.0 headers are somehow needed by
>> the gtk+-2.0 headers then the gtk+-2.0.pc file should have them in its
>> Requires field, which will get merged in gdl's flags.

> gtk+ does not depend on those libraries. gdl is the one depending on
> libxml and libglade.

Sorry for the confusion. I had used 'gtk+-2.0' as a random example. It
would have been more appropriate to use 'foo' instead.

>> It so happens that the extra "libxml-2.0 libglade-2.0" in gdl-1.0.pc
>> serves to mask a missing entry in libgnomeui-2.0.pc:
>> https://bugzilla.redhat.com/show_bug.cgi?id=430559

>>  However, I believe
>> that it should be fixed in libgnomeui itself, instead of other
>> packages carrying extra entries.

> libgnomeui should only depend on things that it requires build. So
> should others.

The libgnomeui-devel package explicitly depends on libglade2-devel. See:

$ rpm --requires -q libgnomeui-devel | grep libglade2
libglade2-devel >= 2.0.0

This means that the contents in libgnomeui-devel (*.h, *.pc) depends
on those in libglade2-devel (*.h, *.pc). Since the former's headers
depend on the latter's, there should be a Requires: libglade-2.0 in
libgnomeui-2.0.pc.

Happy hacking,
Debarshi
-- 
Free software for the Indian community:
* ftp://fedora.glug-nith.org/ (Fedora)
* http://gnu.glug-nith.org/ (GNU)
* http://mirror.wbut.ac.in/ (CRAN, Fedora, Mozilla, TLDP)


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