battleblow / openjdk-jdk11u

BSD port of OpenJDK 11
GNU General Public License v2.0
9 stars 8 forks source link

aarch64 bsd-port branch.. errors #66

Closed klaus4 closed 5 years ago

klaus4 commented 5 years ago

is it possible that something went wrong with merging the aarch64 PR? I have tons of errors( regardless debug or release build). But before posting/debugging those I want to ask if one of you has successfully compiled the current git clone -b bsd-port https://github.com/battleblow/openjdk-jdk11u.git on aarch64? Regards

bsdkurt commented 5 years ago

Yes, it is working for me on: FreeBSD freebsd 13.0-CURRENT FreeBSD 13.0-CURRENT r350491 GENERIC arm64 Using AWS a1 instance type.

  AUTOCONF_VERSION=2.69 \
  bash configure \
        --with-boot-jdk=/home/ec2-user/jdk-11 \
        --with-toolchain-type=clang \
        --with-cups=/usr/local \
        --with-fontconfig=/usr/local \
        --with-alsa=/usr/local \
        --with-jobs=4 \
        --with-test-jobs=1 \
        --with-debug-level=fastdebug \
        --with-freetype=system \
        --with-zlib=system \
        --with-libpng=system \
        --with-libjpeg=system \
        --with-lcms=system \
        --with-giflib=system \
        --with-giflib-include=/usr/local/include \
        --with-giflib-lib=/usr/local/lib \
        --with-jtreg=/home/ec2-user/jtreg \
        --disable-ccache \
        --disable-dtrace \
        --disable-warnings-as-errors
gmake LOG=debug images
klaus4 commented 5 years ago

thanks Kurt, I`ll try it with your flags

klaus4 commented 5 years ago

FreeBSD 12.0-STABLE r350312 GENERIC arm64 FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1).. acpi0: AMAZON AMZNFACP

root@freebsd:~/openjdk-jdk11u # cat configure_flags
AUTOCONF_VERSION=2.69 \
  bash configure \
        --with-toolchain-type=clang \
        --with-cups=/usr/local \
        --with-fontconfig=/usr/local \
        --with-alsa=/usr/local \
        --with-jobs=4 \
        --with-test-jobs=1 \
        --with-debug-level=fastdebug \
        --with-freetype=system \
        --with-zlib=bundled \
        --with-libpng=bundled \
        --with-libjpeg=bundled \
        --with-lcms=bundled \
        --with-giflib=bundled \
        --with-giflib-include=/usr/local/include \
        --with-giflib-lib=/usr/local/lib \
        --with-jtreg=/root/jtreg \
        --disable-ccache \
        --disable-dtrace \
        --disable-warnings-as-errors 
   gmake LOG=debug images

=== Output from failing command(s) repeated here === /usr/bin/printf "* For target hotspot_variant-server_libjvm_objs_vm_version_aarch64.o:\n"

perhaps misconfiguration on my whole machine ? don'tt know at the moment ..

klaus4 commented 5 years ago

https://github.com/battleblow/openjdk-jdk11u/blob/bsd-port/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp .. looking the code there is no

ifndef HWCAP_ASIMD ...

yesterday I tried

ifndef HWCAP_ASIMD

define HWCAP_ASIMD (1<<1)

endif

.. but that produced other errors ... better to ask here whether the code is O.K. or not

bsdkurt commented 5 years ago

Yes, it looks like what was committed matches 13-current and backward compat for 11/12 needs to be added to src/hotspot/cpu/aarch64/vm_version_aarch64.cpp.

Yes adding:

#ifndef HWCAP_ASIMD
#define HWCAP_ASIMD (1<<1)
#endif

is the correct approach for the missing defines.

If you look further up the log (not the end summary) you should see more of the failed compilation lines which may speed up the process of identifying the backward compat defines needed.

klaus4 commented 5 years ago

just a sidenote : https://github.com/battleblow/openjdk-jdk11u/blob/bsd-port/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp :

include <asm/hwcap.h>

asm/hwcap.h is not available on non-Linux ARM(https://bugzilla.mozilla.org/show_bug.cgi?id=1125580)

MikaelUrankar commented 5 years ago

Sorry for the breakage. I'm targetting 12.1-release for this port, you'll need to update these 2 files (they should be part of 12.1-rel): https://svnweb.freebsd.org/base/head/sys/arm64/include/armreg.h?revision=350242&view=co and https://svnweb.freebsd.org/base/head/sys/arm64/include/elf.h?revision=350166&view=co

MikaelUrankar commented 5 years ago

just a sidenote : https://github.com/battleblow/openjdk-jdk11u/blob/bsd-port/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp :

include <asm/hwcap.h>

asm/hwcap.h is not available on non-Linux ARM(https://bugzilla.mozilla.org/show_bug.cgi?id=1125580)

The include is enclosed in a ifdef linux and shouldn't be a problem. We have HWCAP support on FreeBSD with https://svnweb.freebsd.org/base?view=revision&revision=350166

klaus4 commented 5 years ago

is e.g. CPU_ASIMD instead of HWCAP_ASIMD an option for 12.0-stable ? (that's what clang wants to "hear")

klaus4 commented 5 years ago

can

define ID_AA64PFR0_AdvSIMD_IMPL (UL(0x0) << ID_AA64PFR0_AdvSIMD_SHIFT)

from https://svnweb.freebsd.org/base/head/sys/arm64/include/armreg.h?revision=350242&view=co

be implemented in vm_version_bsd_aarch64.cpp ? I ask because : error: use of undeclared identifier 'ID_AA64PFR0_AdvSIMD_IMPL' under 12.0-stable

klaus4 commented 5 years ago

builds fine with the CPU_ASIMD instead of HWCAP_ASIMD - hack (CPU instead for all HWCAP_*) and (just for testing) :

/*
if (ID_AA64ISAR0_ASIMD(id_aa64isar0) == ID_AA64ISAR0_ASIMD_BASE) {
    auxv = auxv | CPU_ASIMD;
  }
*/       :-)

root@freebsd:~ # uname -a FreeBSD freebsd 12.0-STABLE FreeBSD 12.0-STABLE r350312 GENERIC arm64 root@freebsd:~ # /root/newcompile/openjdk-jdk11u/build/bsd-aarch64-normal-server-fastdebug/jdk/bin/java -version openjdk version "11.0.4-internal" 2019-07-16 OpenJDK Runtime Environment (fastdebug build 11.0.4-internal+0-adhoc.ec2user.openjdk-jdk11u) OpenJDK 64-Bit Server VM (fastdebug build 11.0.4-internal+0-adhoc.ec2user.openjdk-jdk11u, mixed mode)

......I'll see how I continue there........

klaus4 commented 5 years ago

issue fixed by PR https://github.com/battleblow/openjdk-jdk11u/pull/67