Hi, Quoting Joe MacDonald (2024-05-23 19:00:21) > I asked the buildd team about this issue and they pointed me here, I'm hoping > someone can help me resolve this problem. > > I'm having trouble with my sbuild setup only when I'm building qemu and > packages with similar dependencies for a foreign architecture. > > The details are: I have my sbuild / schroot set up according to the cross > build instructions at > https://wiki.debian.org/CrossCompiling#Building_with_sbuild and I'm able to > cross build (amd64 build for arm64 host) stuff like vim, nano, bucketloads. > But when I try qemu using the same instructions it fails at the resolver > step. > > I captured success and failure logs with typescript and pastebin'd them. > > - Successful nano amd64-arm64: https://pastebin.com/vfZWvb65 > > - Successful qemu amd64-amd64 build: https://pastebin.com/kL1N3i8Z > > - Unsuccessful qemu amd64-arm64 build: https://pastebin.com/hRzrCYHy > src:qemu lists a Build-Depends on python3-sphinx-rtd-theme. But python3-sphinx-rtd-theme is Architecture:all. Build-Depends are resolved using the host architecture version of the packages. On the other hand Arch:all packages are always implicitly treated as being of the native architecture, which corresponds to the build architecture when cross-building. So when you build src:qemu for arm64 on amd64, then your host architecture is arm64 and your build architecture is amd64. The Arch:all package python3-sphinx-rtd-theme will always be implicitly treated as if it was Architecture:amd64. But src:qemu needs python3-sphinx-rtd-theme as the host architecture, or arm64. Since python3-sphinx-rtd-theme is not Multi-Arch:foreign, it cannot satisfy this dependency. There are multiple ways forward as far as this specific dependency is concerned: 1. maybe this sphinx-related dependency is only used to build Arch:all documentation packages? If yes, it could be moved to Build-Depends-Indep and is thus not interfering with cross building anymore as we only need to build Arch:any packages 2. maybe python3-sphinx-rtd-theme can be made Multi-Arch:foreign? Seems unlikely though as looking at its deps this might be the multi-arch-interpreter problem 3. maybe you need the build architecture version of the package, in which case you have to mark the build dependency on python3-sphinx-rtd-theme with :native > I'm say sbuild because that's the first thing I tried and probably the > solution I'd prefer, but both 'sbuild --host arm64 qemu' and 'dget ... ; > pdebuild -- --host-arch arm64' fail in the same way, so I didn't think it was > sbuild/schroot specific and more of a general build thing. Yes, this is not specific to sbuild but a result of how the current metadata is as it is. You will experience the same problem without sbuild or pbuilder. > I'm confident it's not a qemu-specific thing, though, since the exact same > resolver issue happens with building other packages. I tried a few by > looking at rdepends of python3-venv (the failure qemu shows) and all the ones > I tried failed. But your failing build log above contains nothing related to venv? Also, you can see how qemu currently fails to cross build from source due to unsatisfied cross build dependencies here: http://crossqa.debian.net/src/qemu Last time it built was quite a while ago. It is likely, that making it cross-build will involve much more problems than just python3-sphinx-rtd-theme. What is your motivation? What makes you want to cross-build qemu? Thanks! cheers, josch
Attachment:
signature.asc
Description: signature