Building Portola JDK11 for AMR64 arch
Mikael Vidstedt
mikael.vidstedt at oracle.com
Fri Oct 26 08:20:38 UTC 2018
> On Oct 26, 2018, at 1:00 AM, Mikael Vidstedt <mikael.vidstedt at oracle.com> wrote:
>
>
>
> It looks like the compiler doesn’t recognize the aarch64 instruction set, so configure probably picked up the wrong compiler. You’d have to double check what configure says it’s going to use.
>
> However, even if you address that it’s unlikely to work. As you probably know Alpine uses the musl C library, so your cross compiler/devkit needs to be able to produce binaries for musl. The “-gnu” in your devkit path is a sign that it’s likely a devkit for the GNU C library. You’ll need to grab or create one for aarch64-linux-musl instead.
Sorry, this is wrong. I should have gone to sleep instead. The -gnu is of course for the build platform where the compiler is running, so given that you have glibc installed on your build machine that should work just fine. You do still need to make sure is that the cross compiler creates binaries for musl though. I’m not sure how the linaro devkit you’re using handles that. There may be some argument to gcc/g++ you need to specify if it doesn’t happen automatically. If some explicit argument is needed it would be nice to have the (portola) autoconf/make files do so automatically.
Cheers,
Mikael
>
> For completeness I’ll mention that I have not tried the musl port on anything other than linux_x64, but I can’t think of anything that wouldn’t work on linux_aarch64.
>
> Cheers,
> Mikael
>
>> On Oct 20, 2018, at 5:21 AM, denusdv <denusdv at gmail.com> wrote:
>>
>> Hi all
>>
>> My purpose it to build JDK 11 Portola for ARM64 arch, I'm using x86 as a
>> build arch,
>>
>> 1. The boot SDK is built from the same source.
>> 2. The cross compile toolchain is
>> gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu
>> 3. The build is done in Alpine OS with glibc on it.
>>
>> My configure command looks
>>
>> ./configure --openjdk-target=aarch64-oe-linux
>> --with-boot-jdk=/work/jdk11/build/linux-x86_64-normal-server-release/jdk
>> --with-devkit=/tools/aarch64-toolchain/gcc-linaro-7.3.1-2
>> 018.05-x86_64_aarch64-linux-gnu --disable-warnings-as-errors
>> --disable-sjavac
>>
>> The configure output has only one warning
>>
>> *WARNING: using cross tools not prefixed with host triplet*
>>
>> which I can't resolve.
>>
>> now when I try to run the make command
>>
>> I'm getting the following error
>>
>> /Compiling 3 files for BUILD_VM_COMPILER_MATCH_PROCESSOR
>> Compiling 5 files for BUILD_VM_COMPILER_NODEINFO_PROCESSOR
>> Compiling 3 files for BUILD_VM_COMPILER_OPTIONS_PROCESSOR
>> Compiling 14 files for BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR
>> Compiling 3 files for BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR
>> Compiling 188 files for BUILD_jdk.rmic.interim
>> Compiling 162 files for BUILD_TOOLS_JDK
>> /work/jdk11/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp:
>> Assembler messages:
>> /work/jdk11/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp:116:
>> Error: no such instruction: `prfm pldl1strm,[%rdi,'
>> /work/jdk11/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp:118:
>> Error: no such instruction: `adr %rax,0f'
>> /work/jdk11/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp:118:
>> Error: number of operands mismatch for `add'
>> /work/jdk11/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp:125:
>> Error: no such instruction: `prfm pldl1strm,[%rdi,'
>> /work/jdk11/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp:127:
>> Error: no such instruction: `adr %rax,0f'
>> /work/jdk11/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.inline.hpp:127:
>> Error: number of operands mismatch for `add'
>> make[3]: *** [lib/CompileJvm.gmk:156:
>> /work/jdk11/build/linux-aarch64-normal-server-release/hotspot/variant-server/libjvm/objs/accessBackend.o]
>> Error 1
>> make[2]: *** [make/Main.gmk:257: hotspot-server-libs] Error 2
>> make[2]: *** Waiting for unfinished jobs....
>> /
>>
>> I know it's related to the cross compile process, pls help me to fix it.
>>
>>
>>
>> --
>> Sent from: http://openjdk.5641.n7.nabble.com/OpenJDK-Build-Infrastructure-f75522.html
>
More information about the build-dev
mailing list