Bug#945057: libnet-dbus-perl FTCBFS: uses the build architecture pkg-config
gregor herrmann
gregoa at debian.org
Tue Nov 19 17:23:35 GMT 2019
On Tue, 19 Nov 2019 06:09:15 +0100, Helmut Grohne wrote:
> libnet-dbus-perl fails to find the dbus library. It does so using the
> build architecture pkg-config, but libdbus is only installed for the
> host architecture. Now I'm unsure how to fix this.
Thanks for the bug report, that's an interesting one indeed.
> The common wisdom is
> to prefix tools with the host architecture triplet. The other wisdom is
> to pass tools as environment variables. The perl ecosystem seems to
> follow a different route: Record paths in Config.pm. Unfortunately,
> Config.pm neither has the triplet nor does it have pkg-config. Bummer.
So we're looking for something like 'x86_64-linux-gnu' in Config.pm
(or pass PKG_CONFIG=x86_64-linux-gnu-pkg-config in the environment),
right?
For the former,
% perl -MConfig=config_sh -e 'print config_sh();' | grep x86_64-linux-gnu
has quite a few results but never x86_64-linux-gnu alone.
> So what is a good way to get the right pkg-config into the Makefile.PL?
(And Build.PL.)
I guess that's a question for Niko …
> I don't like the patch, because it creates two routes to communicate the
> host architecture: Config.pm and environment. If these communication
> methods are not in sync, bad things happen. I'd much prefer to have a
> single source of truth here.
Ack.
> Consider this bug an "example bug". Using pkg-config in Makefile.PL is
> likely something that happens elsewhere. It'll need fixing a few times.
Right, but the good news is that I only find 23 packages (of the
pkg-perl maintained ones) which use pkg-config in
{Makefile,Build}.PL.
> I'd like to get to a good solution here before filing more of them,
> because libnet-dbus-perl nicely isolates this issue.
Ack.
Random thought: I wonder if PkgConfig ("a pure perl version of
pkg-config"), packaged as libpkgconfig-perl, providing
/usr/bin/ppkg-config, could be a helpful workaround. This would still
require a changed build dependency and a s/pkg-config/ppkg-config/ in
{Makefile,Build}.PL [0] but would spare us any path or architecture
hassles. Maybe :)
*Some times later*
So, I did my first cross build :) (with cowbuilder and the help of
https://wiki.debian.org/CrossCompiling ) and it worked with:
+ libpkgconfig-perl:native,
+ perl-xs-dev,
+ perl:native
and a patch which does s/pkg-config/ppkg-config/ in Makefile.PL, and
I get:
libnet-dbus-perl_1.1.0-7_i386.deb
---------------------------------
new Debian package, version 2.0.
size 183472 bytes: control archive=3128 bytes.
917 bytes, 19 lines control
8013 bytes, 88 lines md5sums
Package: libnet-dbus-perl
Version: 1.1.0-7
Architecture: i386
I've pushed these changes to a new "cross-945057" branch in
https://salsa.debian.org/perl-team/modules/packages/libnet-dbus-perl.git
Cheers,
gregor
[0] or `use PkgConfig …;' programmatically
--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`- NP: Rolling Stones
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: Digital Signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20191119/e095e6ab/attachment.sig>
More information about the pkg-perl-maintainers
mailing list