Re: [GD-DEVEL] LibGD should not link against libX11

[email protected] (Jonas Smedegaard)
Newsgroups php.gd.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pierre wrote:
> Helllo Jonas,
> 
> On 1/2/07, Jonas Smedegaard <[email protected]> wrote:
> 
>> > libXPM links against X11, gd has it as part of the libXpm CFLAGS.
>>
>> It is wrong to link against anything but what is actually needed.
>> Blindly inheriting linking from dependent libraries causes problems when
>> some day the linking of those dependent libraries change, perhaps in
>> incompatible ways. Maybe no problem on rebuild-from-scratch systems like
>> Gentoo, but for Debian it causes real problems.
> 
> It is required. For example, macros can make usage of the X11
> function. Also, pkg-config pkg-config --libs --cflags xpmwill tell you
> which CFLAGS to use:
> 
> pkg-config --libs --cflags xpm
> 
> As far as I remember, there is also a non X dependent Xpm library. Or
> if it is really a problem, I can try to include the Xpm format, just
> like wbmp. But I do not think it is correct to remove -lX11 unless Xpm
> CFLAGS (the cflags you have to use to link against libxmp, not the
> CFLAGS used to compile libxpm do) do not return it anymore.
> 
> Can someone confirm my explanation (or "proove" it wrong)? :)


I believe the issue I am raising is the the one expressed like this in
the pkg-config manpage:

> Don’t add any flags for required packages; pkg-config will add those
> automatically.


What I request is that you do not hardcode a linkage that is not truly
used anywhere.

If you trust info provided by pkg-config, then please do so. What is
currently done is _not_ to probe pkg-config info at bootstrapping time.


Yes, I do not expect any changes at all to happen directly from this
change. But I can then move to the next level and bug the X11 developers
about the libXPM dependency on libX11.



>> > By the way, have you asked for a CVS account? Then you can send me a
>> > tar.gz of the libgd-debian CVS tree, it can be imported in
>> > gd/gd-debian.
>>
>> I have requested a CVS account this morning, thanks to the the helpful
>> hint of Nuno Lopes.
>>
>> There's no libgd-debian tree to import. And if so, it would probably be
>> an SVN one :-)
> 
> I saw and confirmed it. We have to wait now :)

ok.


>> Should I respond only to the list or also privately like here?
> 
> I prefer the list for all discussions. Sometimes I use direct mail for
> non gd specific problem but in general GD discussions can and should
> stand on the list. Security or critical issues can be discussed (or
> should) off list or in the upcoming issues tracker.

Ok. I have then dropped your personal email from this reply.

Please cc me on replies, as I am not subscribed to the gd-devel list.


 - Jonas

- --
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er nær: http://www.shibumi.org/eoti.htm
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFmqXJn7DbMsAkQLgRApyQAKCJ+48AVoODdBjNdt8Og1T7c1B6eQCeKXwU
ba4hyg/THaG78ioO3kUv/qI=
=8qXe
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.