Hey Helmuth, > I observe that you did not cc the bug. Is that intentional? Seems I put the bug in Bcc instead of Cc by mistake. I've bounced your email to the bug to preserve the thread there. Thanks for noticing this :-)
> > Your patch adds --reload-all-buildenv-variables, but it adds it to the
> > *first* call to dh_auto_configure, not the second one. I would expect to
> > add this to the second one (assuming the first one fills the cache and
> > the second one uses the incorrectly cached value). Or does the option
> > also prevent *writing* to the cache?
>
> It actually works somewhat the other way round. It is the dh layer that
> initializes the environment variables. When dh_auto_configure comes
> around, it sees that they're already set and does not change them.
Ah, I see. Re-reading the manpage with your comments in mind makes it
clear. Thanks.
> In Brest, I was working with someone else with that setup and found that
> it makes cross building incredibly difficult, because git-buildpackage
> makes it next to impossible to pass the --host-arch flag down to
> pbuilder. When you set --git-arch, that gets translated to
> --architecture, which changes the build architecture as you observed.
> That's not cross building. I suspect, git-buildpackage needs a new
> option to support cross building.
Ah, that is helpful. I had already tried `gbp buildpackage
--host-arch=arm64`, which passes that option all the way down to
`dpkg-buildpackage` and tries to do a cross build, but then fails due to
missing cross dependencies. Your message made me realize pbuilder needs
to know about the cross-building, so it can install the right
dependencies.
Turns out you can tell gbp to do this with:
gbp buildpackage --git-pbuilder-options="--host-arch=arm64"
With that, I can reproduce the issue you reported and do a succesful
cross build after applying your fix.
I've updated https://wiki.debian.org/CrossCompiling to reflect this. In
particular, I:
- Added a section to help understand what moving parts are involved:
https://wiki.debian.org/CrossCompiling#Cross-build_overview
- Updated the instructions for building with pbuilder and gbp to do an
actual cross-build (I left the full host-arch chroot instructions
for comparison): https://wiki.debian.org/CrossCompiling#Doing_a_cross_build
- Restructured the page a bit.
Gr.
Matthijs
signature.asc
Description: PGP signature

