[ClusterLabs] Pacemaker API structure and pkg-config files

Ken Gaillot kgaillot at redhat.com
Mon Jan 14 10:44:14 EST 2019

On Mon, 2019-01-14 at 11:48 +0100, wferi at niif.hu wrote:
> Hi,
> Recently I spent some time mapping the interrelations of the C header
> files constituting the Pacemaker API.  In the end I decided they were
> so
> tightly interdependent that there was really no useful way to ship
> parts
> of the API separately, thus I did away with the separate lib*-dev
> Debian
> packages and merged them into a single pacemaker-dev package, much
> like
> the pacemaker-libs-devel RPM package created by the upstream spec
> file.

Agreed, with the possible exception of libcrmcluster, which is the only
library that requires linking against the corosync libraries. It
doesn't need its own devel package, but it will always be distinctive,
so if any were separate that would be it.

One thing I'd love to do eventually, if time permits, is to come up
with a more standardized API merging everything except libcrmcluster
into a single libpacemaker. The old libraries would be kept around for
backward compatibility as simple wrappers for any functions that
changed names.

Unfortunately that would be a lot of work with a lot of chances for
bugs, and there will likely always be more pressing needs clamoring for
attention. But never say never.

> Now I'm looking at DLM, which uses the fencing API, and trying to use
> pkg-config for supplying the necessary flags.  I got pretty sure the
> pkg-config files are incorrect, for example neither declares the
> libxml-2.0 dependency in stonith-ng.h (which is to be dropped, but
> still
> there).

Looking at that for the first time, I found that the public header
already doesn't need anything from libxml. I'll remove that
libxml/tree.h inclusion for the final release of 2.0.1. However the
library still needs to be linked against libxml2 (and likely always

> I'd like to get the pkg-config support of Pacemaker corrected, but
> before I start cooking up patches, I need to get an idea of the
> preferred direction upstream.  For a start: is providing multiple
> pkg-config files (still) reasonable?

Sure, as long as the libraries themselves are separate.
Ken Gaillot <kgaillot at redhat.com>

More information about the Users mailing list