[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#1092051: dpkg-buildpackage incredible slow since end of 2024



On Wed, 22 Jan 2025 21:39:55 +0100, Aurelien Jarno <aurel32@debian.org> wrote:
> It's actually quite noticeable on fast machines for the rtpengine
> package, and even with the latest dpkg mitigations. The build time on
> fast machine increased on average by a factor ~30, for instance:
> amd64: 5m => 2h39
> arm64: 5m => 3h4
> ppc64el: 4m => 1h45

Indeed. What’s happening here is that all the $(shell pkg-config) invocations
in various Makefiles cause all the flags to be re-evaluated every time Make
starts and for every command invocation, which ends up taking forever.

A quick workaround for rtpengine is to add

CFLAGS := $(CFLAGS)

and

LDLIBS := $(LDLIBS)

after their construction in daemon/Makefile etc.

The seemingly obvious fix in dpkg would be to declare the variables in
Makefile snippets using :=, but that would technically be a change in
semantics.

Regards,

Stephen

Attachment: pgpe9LSGbiHHb.pgp
Description: OpenPGP digital signature


Reply to: