[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sbuild crosscompiler not searching /usr/include/arm-linux-gnueabihf



+++ Johannes Schauer [2015-09-16 23:10 +0200]:
> Hi,
> 
> I'm really not the best person to answer your questions but since nobody else
> replied yet, I'm gonna go ahead anyways.

You did a pretty good job of answering :-)
 
> 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.

Quite a lot of them could be made to eventually, but it's a massive
job.

 
> 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. 

Right, although it's a non-trivial minority now. Many more could be
made to work at this level with relatively small amounts of work.

> > I've tried  (under stretch) to build the mosquitto (MQTT) broker
> >    apt-get source mosquitto
> >    cd mosquitto*
> >    sbuild  --host=armhf -d stretch-amd64-sbuild
> 
> > 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.

Right qemu is the wrong fix (although it may be expedient for other reasons).

you want python:amd64 not python:armhf

(And josch, this isn't really new - we've been working on it for 5
years now - it's just not finished yet: these things take _ages_ if you do them properly:-)

OK, so you can get this working better if you do:
apt-get install --no-install-recommends crossbuild-essential-armhf python-all debhelper
apt-get install --no-install-recommends libssl-dev:armhf libc-ares-dev:armhf libwebsockets-dev:armhf  libwrap0-dev:armhf uthash-dev:armhf uuid-dev:armhf

to work round the wrong-arch python issue.

Then dpkg-buildpackage -aarmhf -d 
(actually the -d isn't needed in this case but it usually is if
apt-get build-dep -a$arch didn't 'just work')
 
However as you've already found this fails to search /usr/include/arm-linux-gnueabihf for openssl/opensslconf.h

That seems like a genuine problem. It might be the cross-toolchain (the gcc5 one is very new).

I'll investigate a bit further.

> > 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

Yeah, the 'currently running' bit is wrong too at the moment :-)
 
We plan to set up a more permanent cross-buildd to get better stats on the archive.

> > Here I see that not everything is passing.  What exactly is the implication?

This is work-in-progress, but we've just had some major steps forward
so that now crossbuild-essential-$arch is installable in the
archive. There are a few more core pieces to fix, then it's mostly a
matter of making sure that upstreams+ debian packaging are cross-friendly.

Now will be a much more satifying time to get stuck in than a few years ago :-)

> > Is there an ongoing effort to get these packages to crosscompile? (Can one
> > get involved [any learning sources recommended?] and join in?)

Please do. There is a debian-cross mailing list, and we mostly use the
#debian-bootstrap IRC channel to talk about this stuff.



Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/


Reply to: