Hi, I'm really not the best person to answer your questions but since nobody else replied yet, I'm gonna go ahead anyways. Quoting nice sw123 (2015-09-16 10:29:22) > does the method of crosscompiling as described here > https://wiki.debian.org/CrossCompiling work for all deb source packages ?? no. Nor will this be the case in the foreseeable future. Some source packages happen to cross compile after you installed the right cross compiler and then by doing: dpkg-buildpackage -aarmhf but this is certainly the minority. The reason is, that currently, Debian focuses on natively building everything only. Our current build daemon setup is not (yet) able to do cross compilation. There are several reasons for this: - cross compiling is hard and most upstreams don't care about it, so additional work has to be done to make build systems cooperate - successful cross compiling needs the right cross build dependencies to be installable. One part of the equation is multiarch which is now reasonably well supported by the archive (but there are some unaddressed issues wrt cross building). Another part of this are cross compilers in Debian and the crossbuild-essential packages. These are also only *very recent* developments and often you have to use unstable or even experimental to get the right bits. And then it often happens that you can simply not install the right dependencies because of no mechanism to translate direct dependencies on gcc or g++. In practice, cross compiling currently fails for a large portion of packages simply because the crossbuild dependencies cannot be installed. See here for the historic development of the situation: http://bootstrap.debian.net/history_cross.html and here for the reasons for a core set of packages: http://bootstrap.debian.net/cross.html > I've tried (under stretch) to build the mosquitto (MQTT) broker > apt-get source mosquitto > cd mosquitto* > sbuild --host=armhf -d stretch-amd64-sbuild sbuild has a number of problems wrt cross building in stretch and unstable. I fixed many of these issues in an NMU to experimental and you are welcome to try that. It doesn't look as if your problems are related to the fixed sbuild problems though. The fixes will probably enter unstable with the next sbuild upload. > After solving initial problems (had to install qemu in the schroot, so that > python2.7-minimal:armhf can be configured)... You discovered yet another common problem. Installing qemu should not be required for proper cross compilation. Instead you probably want python2.7-minimal for your *build* architecture instead for armhf as it is probably just used to run some Python scripts. This might mean that mosquitto needs to build-depend on python with the :native qualifier. But since all of this is really new, even how to do this properly has not yet fully been figured out yet. > Interestingly Debian itself seem to be compiling the stuff WITHOUT cross. > https://buildd.debian.org/status/fetch.php?pkg=mosquitto&arch=armhf&ver=1.4.3-1&stamp=1440142863 For all the architectures you see here: https://buildd.debian.org/status/package.php?p=mosquitto Debian has set up native build machines. So the build for mipsel will be done on an actual mips processor. This can often take a long time for the weaker architectures but it has the advantage that one avoids all the troubles one runs in to when trying to cross compile. > I've also seen http://people.linaro.org/~wookey/buildd/ which lists > "Currently-running builds" "Debian Testing, using multiarch/sbuild All > packages" ... (unfortunately my current 'package of interest' -> mosquitto > is missing) > http://people.linaro.org/~wookey/buildd/testing/sbuild/latest/status.html This is because the package selection tries to be such that one gets out build-essential only in the end. It is not an effort to crossbuild all of Debian but only enough such that one can continue building the rest natively, because that's easier. > Here I see that not everything is passing. What exactly is the implication? > Is there an ongoing effort to get these packages to crosscompile? (Can one > get involved [any learning sources recommended?] and join in?) There are efforts to make Debian more cross friendly in the bootstrapping context. The biggest effort in this direction is the rebootstrap project spear headed by Helmut Grohne. That project tries to cross build a number of architectures from scratch, starting from nothing and identifies lots of error classes in the process. To get a good overview where we currently are at in Debian wrt cross compiling and bootstrapping you might want to watch Helmut's recent talk during Debconf15 last month: http://gensho.acc.umu.se/pub/debian-meetings/2015/debconf15/Automating_Architecture_Bootstrap.webm Being able to crossbuild more packages always helps the bootstrapping cause, so if you are sufficiently interested, then there is *lots* of work to be done to get this working better in Debian :) Thanks! cheers, josch
Attachment:
signature.asc
Description: signature