Summary: | emulators/qemu-user-static: qemu-aarch64-static SIGILL with openjdk11-bootstrap | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Jonathan Chen <jonc> | ||||
Component: | Individual Port(s) | Assignee: | freebsd-emulation (Nobody) <emulation> | ||||
Status: | Closed Overcome By Events | ||||||
Severity: | Affects Only Me | CC: | mikael, smh | ||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(emulation) |
||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Jonathan Chen
2020-01-11 09:40:48 UTC
It sounds like your actually trying to run the java built for aarch64 on your amd64 machine? If this is the case it won't work, as the java build will include instructions for the target arch not the builders arch. The SIGILL signal is sent to a process when it attempts to execute an illegal, malformed, unknown, or privileged instruction. It's a crossbuild environment, used to build binaries for aarch64 on an amd64 host; with the help of binmiscctl and qemu-aarch64-static. All the other aarch64 dependancies for openjdk11 have been built. The only one that's failing to build is java/openjdk11 itself; and I've tracked it down to SIGILL being generated by qemu-aarch64-static. duplicate bug #240037 *** This bug has been marked as a duplicate of bug 240037 *** Workaround described in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240037#c2 can possibly be applied to src/hotspot/os_cpu/bsd_aarch64/vm_version_bsd_aarch64.cpp in order to build a new bootstrap. Created attachment 210756 [details]
patch
Can you try the attached patch (it's for /usr/ports/emulators/qemu-user-static-devel).
It seems to work here, I tried with this program but I haven't checked if the returned value are sane:
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <machine/armreg.h>
#include <machine/_stdint.h>
int
main(int argc, char **argv)
{
uint64_t id_aa64isar0, id_aa64pfr0;
id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_EL1);
id_aa64pfr0 = READ_SPECIALREG(id_aa64pfr0_EL1);
printf("id_aa64isar0: 0x%lx, id_aa64pfr0: 0x%lx\n", id_aa64isar0, id_aa64pfr0);
return (0);
}
./identcpu
id_aa64isar0: 0x111110012120, id_aa64pfr0: 0x110000
I haven't tried qemu-user-static.
With the patch applied, the bootstrap check completes; but the synth package builder fails further down the track with: qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x61f9f288 /usr/local/bin/bash: line 1: 62054 Abort trap (core dumped) /usr/local/bootstrap-openjdk11/bin/javac -g -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J-XX:TieredStopAtLeve l=1 -source 9 -target 9 -XDignore.symbol.file=true -g -Xlint:all,-deprecation,-options -Werror -Xprefer:source -implicit:none -d /construction/xports/java/openjdk11/work/openjdk-j dk11u-jdk-11.0.5-10-1/build/bsd-aarch64-normal-server-release/buildtools/langtools_tools_classes @/construction/xports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-10-1/build/bsd -aarch64-normal-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.tmp > >(/usr/bin/tee -a /construction/xports/java/openjdk11/work/openjdk-jdk11u- jdk-11.0.5-10-1/build/bsd-aarch64-normal-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.log) 2> >(/usr/bin/tee -a /construction/xports/java/ope njdk11/work/openjdk-jdk11u-jdk-11.0.5-10-1/build/bsd-aarch64-normal-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.log >&2) ... === Output from failing command(s) repeated here === * For target buildtools_langtools_tools_classes__the.BUILD_TOOLS_LANGTOOLS_batch: qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x61f9f288 * For target hotspot_variant-server_buildtools_tools_classes__the.BUILD_JFR_TOOLS_batch: qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x6268e888 * For target hotspot_variant-server_tools_jvmti__the.BUILD_JVMTI_TOOLS_batch: qemu:handle_cpu_signal received signal outside vCPU context @ pc=0x62683788 yeah, that's a different bug I've not tried this out with the latest version of qemu-user-static, as I've not been using aarch64 for a while now. Too many other shiny new toys to play with. |