BUG #15306: Use pkg-config for searching libxml2 header

Started by PG Bug reporting formover 7 years ago4 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 15306
Logged by: Ding Xiang Fei
Email address: dingxiangfei2009@gmail.com
PostgreSQL version: 11beta2
Operating system: NixOS
Description:

This is an improvement suggestion. In the configure script,

https://github.com/postgres/postgres/blob/master/configure.in#L896

this part uses `xml2-config` program to find the `libxml2` headers.

It would be more appropriate to use pkg-config program to search `libxml2`
headers.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: BUG #15306: Use pkg-config for searching libxml2 header

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:

This is an improvement suggestion. In the configure script,
https://github.com/postgres/postgres/blob/master/configure.in#L896
this part uses `xml2-config` program to find the `libxml2` headers.

Right ...

It would be more appropriate to use pkg-config program to search `libxml2`
headers.

Why? Under what circumstances would xml2-config not be present
(assuming that libxml2 is) or give a less desirable answer than
pkg-config? What would you have us do on platforms lacking pkg-config?

regards, tom lane

In reply to: Tom Lane (#2)
Re: BUG #15306: Use pkg-config for searching libxml2 header

2018-07-31 20:33 keltez�ssel, Tom Lane �rta:

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:

This is an improvement suggestion. In the configure script,
https://github.com/postgres/postgres/blob/master/configure.in#L896
this part uses `xml2-config` program to find the `libxml2` headers.

Right ...

It would be more appropriate to use pkg-config program to search `libxml2`
headers.

Why? Under what circumstances would xml2-config not be present
(assuming that libxml2 is) or give a less desirable answer than
pkg-config?

The Yocto cross-compiler framework (since Yocto 2.2 IIRC) does not
allow the "binconfig" scripts for XML2 and GD and for some other
libraries.

The pkg-config scripts are not just preferred but mandatory.

What would you have us do on platforms lacking pkg-config?

That should be kept as a fallback in PKG_CHECK_MODULES().

Best regards,
Zolt�n B�sz�rm�nyi

Show quoted text

regards, tom lane

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Boszormenyi Zoltan (#3)
Re: BUG #15306: Use pkg-config for searching libxml2 header

=?UTF-8?B?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= <zboszor@pr.hu> writes:

2018-07-31 20:33 keltezéssel, Tom Lane írta:

Why? Under what circumstances would xml2-config not be present
(assuming that libxml2 is) or give a less desirable answer than
pkg-config?

The Yocto cross-compiler framework (since Yocto 2.2 IIRC) does not
allow the "binconfig" scripts for XML2 and GD and for some other
libraries.

Then that's a bug to fix in Yocto. They can't imagine that their
shortcomings are grounds to force changes in every other software
on the planet.

regards, tom lane