[pkg-netfilter-team] Bug#916998: ulogd2 FTCBFS: mysql/libpq detection broken

Helmut Grohne helmut at subdivi.de
Fri Dec 21 09:11:43 GMT 2018


Source: ulogd2
Version: 2.0.7-1
Tags: patch upstream
User: helmutg at debian.org
Usertags: rebootstrap

ulogd2 fails to cross build from source, because it fails to detect
client libraries for postgres and mysql. The relevant code prefers
pg_config and mysql_config, but explicity opts out of these for cross
compilation (even though using them would actually work). Opting out is
good for other distributions as these utilities typically produce
results for a different architecture.

The fallback code seems completely unmaintained and doesn't work at all.
For instance, PQINCPATH (see acinclude.m4) is sometimes initialized to a
directory by pg_config, but receives full flags in the later fallback
code resulting in -I-I/somedir due to output/pgsql/Makefile.am adding
another -I.

A good way to discover these libraries is pkg-config. Unfortunately, we
cannot use PKG_CHECK_MODULES in a shell if, because PKG_CHECK_MODULES
uses AC_REQUIRE. Therefore the shell if must be converted to AS_IF.

Then we can proceed using PKG_CHECK_MODULES, though note that
mysqlclient.pc is not presently discoverable (#878340), so we need to
consider mariadb.pc as well.

That sounds a lot of complexity, but once we switch over to pkg-config,
the cross stuff just works. I've implemented it to gracefully fall back
to the old way (mysql_config/pg_config).

Please consider applying the attached patch as it makes ulogd2 cross
buildable.

Helmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross.patch
Type: text/x-diff
Size: 1817 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-netfilter-team/attachments/20181221/bedd337a/attachment.patch>


More information about the pkg-netfilter-team mailing list