Skip to content

Commit

Permalink
Added workaround to oracle/graal#10458 to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
francis-a committed Jan 12, 2025
1 parent 9fe613d commit 00674ae
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/arm64 public.ecr.aws/amazonlinux/amazonlinux:2023
FROM --platform=linux/aarch64 public.ecr.aws/amazonlinux/amazonlinux:2023

RUN yum -y update \
&& yum install -y unzip tar gzip gcc gcc-c++ gcc-gfortran \
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,25 @@ This tag needs to be used for AWS SAM to build everything as is.

4) Build and deploy the application and CloudFormation stack

### ⚠️ Note Apple M3 + build issue
The included `cf-build-deploy.sh` script will use AWS SAM
to build the native ARM application binary in the included `Dockerfile`.
Depending on how Docker virtualization is run, this may fail on M3 and M4 Macs.
```
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x0000ffff7a7d8ce8, pid=15, tid=16
#
# JRE version: (23.0.1+11) (build )
# Java VM: OpenJDK 64-Bit Server VM (23.0.1+11-jvmci-b01, mixed mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# j java.lang.System.registerNatives()V+0 java.base
```
Once workaround for this issue is
to use [Colima](https://github.com/abiosoft/colima)
to run Docker with the `nestedVirtualization` [option](https://github.com/abiosoft/colima/blob/main/embedded/defaults/colima.yaml#L130) set to `true`.
For more details see https://github.com/oracle/graal/issues/10458

```shell
./cf-build-deploy.sh -n {Application name e.g. passhelper} -d {Your domain} -u {your SES verified email address} -b {The S3 bucket from step 2}
```
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ tasks.test {
}

graalvmNative {
toolchainDetection = true
binaries {
named("main") {
imageName.set("passhelper")
Expand Down

0 comments on commit 00674ae

Please sign in to comment.