+++ Pascal PAILLET-LME [2013-04-02 15:30 +0200]:
Hi
thank you for your answer !
I have tried to follow
[1]https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/UsingMultiArch
with an addon related to multiarch:
cat > /etc/apt/apt.conf.d/multiarch-me
APT::Architectures { "amd64"; "armhf"; };
is this configuration it correct ?
Probably, but in fact it's not normally necessary to set apt config
specifically as it will default to using the same arches as dpkg is
configured for. So doing 'dpkg --add-architecture armhf' should be all
you need to get both dpkg and apt to do the right thing.
test with grep-2.10 source code build-dep issue:
sbuild --host=armhf -d quantal -c quantal-amd64-sbuild
┌──────────────────────────────────────────────────────────────────────────────┐
│ Install cross build-dependencies (apt-get
-a) │
└──────────────────────────────────────────────────────────────────────────────┘
Cross-deps: Running apt-get -aarmhf build-dep grep
Reading package lists...
Building dependency tree...
Reading state information...
The following packages have unmet dependencies:
debhelper : Depends: po-debconf but it is not going to be installed
E: Build-dependencies for grep could not be satisfied.
Yep - I get that too. Not entirely clear why as both debhelper and
po-debconf are MA:foreign, and
sudo apt-get install autotools-dev debhelper gettext libpcre3-dev:armhf
works OK.
test with gstreamer1.0-1.0.1 source code fails with another issue
sbuild --host=armhf -d quantal -c quantal-amd64-sbuild
debian/rules:3: /usr/share/cdbs/1/rules/debhelper.mk: No such file or
directory
debian/rules:4: /usr/share/cdbs/1/class/autotools.mk: No such file or
directory
debian/rules:5: /usr/share/cdbs/1/rules/utils.mk: No such file or
directory
debian/rules:7: /usr/share/gnome-pkg-tools/1/rules/clean-la.mk: No such
file or directory
dpkg-query: no packages found matching gtk-doc-tools
make: *** No rule to make target
`/usr/share/gnome-pkg-tools/1/rules/clean-la.mk'. Stop.
E: Failed to clean source directory
OK. This is because you are doing the source-package generation
outside the chroot, which needs the packages gtk-doc-tools debhelper
and cdbs to be installed on your build machine.
This happens because you are running sbuild inside the unpacked source
without an explicit package, and the first thing it does is makes the
source package.
You can either install the necessary build-deps there, or invoke
sbuild explicitly on the .dsc file (from the directory above):
sbuild --host=armhf -d quantal -c quantal-amd64-sbuild grep_2.12-2.dsc
or
sbuild --host=armhf -d quantal -c quantal-amd64-sbuild gstreamer1.0-1.0.1-1.dsc
which is more convenient depends whether you prefer to build from a
source tree or source package files.
sudo apt-get -aarmhf build-dep gstreamer1.0
fails because gobject-introspection in quantal is not marked MA:
foriegn. (And it won't work cross anyway so some hacking will be needed)
It also need multiarch python, which is not in quantal. You can add my
quantal-bootstrap repo which has a suitable python in it:
--- /etc/apt/sources.list.d/quantal-bootstrap.list ----
deb [arch=armhf] http://people.debian.org/~wookey/bootstrap/ubunturepo/ quantal-bootstrap main
then you can install all the build-deps except the
object-introspection ones.
sudo apt-get install debhelper cdbs gnome-pkg-tools autotools-dev
automake autoconf libtool dh-autoreconf autopoint zlib1g-dev:armhf
libglib2.0-dev:armhf libgmp3-dev:armhf libgsl0-dev:armhf pkg-config
bison flex dpkg-dev perl-doc python gtk-doc-tools jade transfig docbook-utils
docbook-xml docbook-xsl xsltproc ghostscript xmlto netpbm libglib2.0-doc
and a build with:
CONFIG_SITE=/etc/dpkg-cross/cross-config.arm64 DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -aarmhf -B -d
goes on quite well for some time before falling over at:
usr/bin/make all-am
make[6]: Entering directory /home/buildd/gstreamer1.0-1.0.1/docs/gst'
DOC Scanning header files
DOC Introspecting gobjects
./gstreamer-scan: line 117: /home/buildd/gstreamer1.0-1.0.1/docs/gst/.libs/lt-gstreamer-scan: cannot execute binary file
which is the known problem that we have no good way of
cross-introspecting yet. installing qemu might solve this?
skipping the object instrospection stuff would also work.
So it may be possible to cross-build gstreamer on quantal without too
much effort, but it definitely doesn't 'just work'.
finally, I always have problems with apt-get build-dep:
sudo apt-get build-dep -y -aarmhf gstreamer1.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
python is already the newest version.
python set to manually installed.
The following packages have unmet dependencies:
gobject-introspection:armhf : Depends: python:armhf (>= 2.7.1-0ubuntu2)
but it is not going to be installed
Depends: python2.7:armhf but it is not
going to be installed
Depends: python-mako:armhf but it is not
installable
Is there a way to work around these problems with get-build deps ?
Either use raring, or my quantal-bootstrap repository, as covered
above. But that still won't fully fix the issue.
If you need gstreamer to cross-build nicely, we can push it up the
list of packages to fix. Is a raring build any use to you (that's a
lot easier), or does it have to be quantal?
Wookey