Hi Jussi, Thank your for the quick reply.
On Sat, Jan 12, 2019 at 11:10:36PM +0200, Jussi Pakkanen wrote: > This is not really a bug in Meson, it is how things should work by > design. All arguments used for cross compilation come from the cross > file only. Envvars are not used for cross compilation, only native > compilation. I think this discrepancy is a design bug in Meson. Meson should either use environment variables or not. For native compilation, you can simply use a native file. Artificially handling things differently just makes cross compilation unnecessarily hard. I also find either way reasonable. It just happens that Meson used to allow environment variables for cross compilation and it still says that they are being used (which is at least confusing). So it is a bug in so far as it is a behaviour change that breaks reverse dependencies. I do agree with the general approach of supplying all arguments from the cross file. Just extend it to native compilation. > I have attached an updated version of the debcrossgen script that > reads the envvars and puts them in the cross file in the proper form. > Can you test if it fixes the issue for you? Note that the script must > be run in the build environment so that CPPFLAGS and all the rest of > the envvars are set to the values used in the final compilation. That's how debhelper runs it. Yes, your updated debcrossgen fully resolves the issue at hand. While the behaviour change persists, practically all Debian packages run meson through debhelper and will therefore work. Can we get that into unstable soon? Helmut