diff --git a/doc/building.html b/doc/building.html index f0453251952..d1252a94807 100644 --- a/doc/building.html +++ b/doc/building.html @@ -1,19 +1,24 @@ - +
Note that alsa is needed even if you only want to build a headless JDK.
Go to Debian Package Search and search for the libasound2 and libasound2-dev packages for your target system. Download them to /tmp.
libasound2
libasound2-dev
Install the libraries into the cross-compilation toolchain. For instance:
cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb . -dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .
If alsa is not properly detected by configure, you can point it out by --with-alsa.
configure
--with-alsa
You will need X11 libraries suitable for your target system. For most cases, using Debian's pre-built libraries work fine.
qemu-deboostrap
For example, cross-compiling to AArch64 from x86_64 could be done like this:
Install cross-compiler on the build system:
apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
Create chroot on the build system, configuring it for target system:
sudo qemu-debootstrap --arch=arm64 --verbose \ - --include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev \ - --resolve-deps jessie /chroots/arm64 http://httpredir.debian.org/debian/
Configure and build with newly created chroot as sysroot/toolchain-path:
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64/ --with-toolchain-path=/chroots/arm64/ make images -ls build/linux-aarch64-normal-server-release/
The build does not create new files in that chroot, so it can be reused for multiple builds without additional cleanup.
Architectures that are known to successfully cross-compile like this are:
This can be a sign of a Cygwin problem. See the information about solving problems in the Cygwin section. Rebooting the computer might help temporarily.
If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to build-dev at openjdk dot java dot net. Please include the relevant parts of the configure and/or build log.
If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to build-dev@openjdk.java.net. Please include the relevant parts of the configure and/or build log.
If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on Contributing to OpenJDK for more information.