zim-tools fails to cross build from source, because it cannot resolve its dependency on docopt. It's a plain dependency without setting a method. In this case, meson is supposed to try pkg-config and cmake. It does try pkg-config. docopt doesn't ship a .pc file, but it does ship .cmake files. meson refuses to consider the native installed cmake, which feels roughly correct as it wouldn't otherwise know the right paths without a suitable toolchain file. IRC user nirbheek pointed out that we can set these things in a meson crossfile and how. The task for generating this file (at this time) still falls to debcrossgen even though I know you want to move it to env2mfile. For that reason I'm sending a patch to debcrossgen and hope that you can port it to env2mfile as needed. The attached patch makes zim-tools cross buildable. Helmut
As of 1.6.0, `meson env2mfile --debarch i386 --cross -o cross.txt` outputs
a cross-file that includes cmake = ['/usr/bin/cmake'].
Similarly,
`MESON_USE_NEW_CROSSGEN=1 /usr/share/meson/debcrossgen --arch i386 -o cross.txt`
outputs a suitable cross-file.
This is *not* fixed for the default code path, used when the environment
variable MESON_USE_NEW_CROSSGEN is unset.
So to solve this, either the debcrossgen in Meson's Debian packaging
needs to use what is currently the MESON_USE_NEW_CROSSGEN=1 code path
by default (possibly with an opt-out to go back to the old behaviour if
we are concerned about regressions), or consumers of information from
debcrossgen (which I believe means debhelper and debputy but nothing else)
need to be updated to invoke `meson env2mfile` instead.
smcv
Hi Simon, A change to debhelper to make it use env2mfile is prepared at https://salsa.debian.org/debian/debhelper/-/merge_requests/127. We are waiting for green light from Jussi before merging. Helmut