JDK14 cross-compile to arm64 fails to locate c++ header new

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Tue Aug 25 20:27:38 UTC 2020


Hi Jiwon!

On 8/25/20 10:06 PM, Choe, Jiwon wrote:
> === Output from failing command(s) repeated here ===
> * For target
> hotspot_variant-server_libjvm_gtest_objs_precompiled_precompiled.hpp.gch:
> In file included from
> /home/jiwon/jdk-related/jdk14/jdk14/src/hotspot/share/classfile/classLoaderData.hpp:28:0,
>                  from
> /home/jiwon/jdk-related/jdk14/jdk14/src/hotspot/share/precompiled/precompiled.hpp:34:
> /home/jiwon/jdk-related/jdk14/jdk14/src/hotspot/share/memory/allocation.hpp:31:15:
> fatal error: new: No such file or directory
>  #include <new>

Do you have "build-essential" installed on the host system, assuming it's Debian-based?

> Tools summary:
> * Boot JDK:       openjdk version "13.0.2" 2020-01-14 OpenJDK Runtime
> Environment (build 13.0.2+8) OpenJDK 64-Bit Server VM (build 13.0.2+8,
> mixed mode, sharing)  (at /usr/lib/jvm/jdk-13.0.2)
> * Toolchain:      gcc (GNU Compiler Collection)
> * C Compiler:     Version 4.8.4 (at /usr/bin/aarch64-linux-gnu-gcc)
> * C++ Compiler:   Version 4.8.4 (at /usr/bin/aarch64-linux-gnu-g++)

That version of GCC looks a bit old. I'm not sure whether it's recent enough for
OpenJDK 14.

FWIW, I'm using a different approach for cross-building OpenJDK which works particularly
easy on Debian and Ubuntu due to Multi-Arch support which allows co-installing library
packages for different architectures on one system.

I have documented it here: https://wiki.debian.org/PortsDocs/BootstrappingOpenJDK

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