RFR (S) 8208665: Amend cross-compilation docs with qemu-debootstrap recipe

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Tue Aug 14 20:24:53 UTC 2018


Hi Aleksey!

On 08/13/2018 12:26 PM, Aleksey Shipilev wrote:
> This is the recipe I have been using for creating artifacts on my personal CI server [1], and it
> seems to work reliably starting from jdk11. It is partially applicable for building jdk{8,9,10}, but
> freetype and friends still need to be pointed out explicitly there. Nevertheless, this seems to be
> the most straightforward way to cross-compile to foreign architectures if there are no devkit
> bundles available.

Thanks for this. This is actually a clever idea and should also work with
Debian Ports, i.e. the non-release architectures in Debian such as sparc64,
m68k and sh4.

For Debian Ports, there is only sid/unstable though and the FTP server is
a different one. Also, you need to include the package debian-ports-archive-keyring:

+  sudo qemu-debootstrap --arch=m68k --verbose \
+
--include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev,debian-ports-archive-keyring
\
+       --resolve-deps sid /chroots/m68k http://ftp.ports.debian.org/debian-ports/

I should give this a shot and if it works, it might be a good idea to add
the instructions for Debian Ports as well. Since I have some more patches
for m68k and co in the pipeline, I can actually test it for that ;-).

With current versions of qemu (either from git or Debian unstable), you should
even be able to build OpenJDK natively inside the emulated chroot. In Debian
Ports, we're heavily making use of qemu-user and qemu-system (for riscv64) to
build packages which hashelped finding and fixing tons of bugs in qemu (I have
alone reported countless bugs ;-)).

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz at debian.org
`. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



More information about the build-dev mailing list