On Wed, 4 Jan 2023, Helmut Grohne wrote:
Source: wxwidgets3.2
Version: 3.2.1+dfsg-4
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs
Hi,
wxwidgets3.2 fails to cross build from source, because it is
deliberately broken by upstream on two accounts. I'm unsure how we can
find a cooperative solution to this.
The first aspect is that upstream doesn't trust pkg-config during cross
building. They argue that it'll report wrong things. While that may be
true in some environments, it is the thing that just works for Debian
cross builds. Consequently, configure fails finding GTK and things don't
get much better after that.
The second aspect is that wx changes its toolchain name for cross
compilation. That is, your build deliberately differs when it is
natively built vs being cross built. Of course, this totally breaks
Debian's approach to reproducible builds and also makes dh_install fail
to locate relevant files (due to having been renamed).
This latter aspect probably interacts with #875827. I guess that the
actual issue is that wx assumes that if you want to cross build using
wx, you should have a cross built wx. We don't do this distinction in
Debian at all and believe that packages shouldn't differ between being
cross built or natively built.
So I'm offering a patch that makes wxwidgets3.2 cross build on Debian.
It almost certainly is not upstreamable in the current form as it simply
deletes the "breaking" changes. As much as this fixes Debian builds,
applying it as is, will make other people unhappy and given #875827,
toolchains cross built with this patch will not work for cross
compilation (neither on Debian nor elsewhere).
For the pkg-config, I think the best we can do is to add a configure
switch such as --trust-pkg-config. While the current upstream behaviour
is rather odd, I see how it may be useful rarely, though I'd rather pass
PKG_CONFIG=false then.
For the renaming the toolchain, more discussion is likely needed and the
relevant upstream ticket
https://github.com/wxWidgets/wxWidgets/issues/12698 doesn't seem to be
doing much progress either.
Hi Helmut,
It seems that upstream has fixed this particular problem in the recent
3.2.2 release (and the crossqa checks seem to indicate further progress).
Although it seems there still might be further problems (on the packaging
side?).
Regards,
Scott