A short guide for cross-compiling Servo to ARM and AArch64
Feb 2, 2016
This is a really short tutorial for cross compiling Servo to ARM and AArch64. For a more detailed guide, see my previous post.
Changelog:
2016 Aug 2: added libavformat-dev to the dependecies
2016 May 2: small updates
2016 Feb 2: original version
ARM
Preparations
Get the compiler:
You will need the ARM system libs, either copy it from real hardware, or:
I’m on Ubuntu 15.10 (Wily), so I’m using wily for debootstrap too. I guess you might have more luck if they match. You can find qemu-debootstrap in qemu-user-static.
Some dependencies search for the compiler with the -unknown- vendor tag (eg. arm-unknown-linux-gnueabihf instead of arm-linux-gnueabihf), here is a quick fix for that:
Building Servo
UPDATE: This step is no longer needed. The Rust stdlibs for ARM and AArch64 aren’t downloaded automatically, here’s fix for that:
Now you can build:
In case you get errors, delete your build (./mach clean), and add the following environment variables to the build command: EXPAT_NO_PKG_CONFIG=1 FREETYPE2_NO_PKG_CONFIG=1 FONTCONFIG_NO_PKG_CONFIG=1
AArch64
Yes, this will be mostly the same.
Preparations
Get the compiler:
You will need the ARM64 system libs, either copy it from real hardware, or:
I’m on Ubuntu 15.10 (Wily), so I’m using wily for debootstrap too. I guess you might have more luck if they match. You can find qemu-debootstrap in qemu-user-static.
Some dependencies search for the compiler with the -unknown- vendor tag (eg. arm-unknown-linux-gnueabihf instead of arm-linux-gnueabihf), here is a quick fix for that:
Building Servo
UPDATE: This step is no longer needed. The Rust stdlibs for ARM and AArch64 aren’t downloaded automatically, here’s fix for that:
Now you can build:
In case you get errors, delete your build (./mach clean), and add the following environment variables to the build command: EXPAT_NO_PKG_CONFIG=1 FREETYPE2_NO_PKG_CONFIG=1 FONTCONFIG_NO_PKG_CONFIG=1