From ec8092e2fc5471452519eb3a9ef84c339a4d2419 Mon Sep 17 00:00:00 2001 From: Leon White Date: Thu, 18 Apr 2024 20:46:00 +0200 Subject: [PATCH] fix: scala arm64 "failed to exec spawn helper" --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index de2244f3..57af1316 100644 --- a/Dockerfile +++ b/Dockerfile @@ -370,7 +370,8 @@ WORKDIR /scala-protobuf RUN gu install native-image # Make sbt use the version of native-image installed by gu instead of downloading a separate version ARG NATIVE_IMAGE_INSTALLED=true -# RUN chmod +x $JAVA_HOME/lib/jspawnhelper +# Fix "Failed to exec spawn helper" error in arm64 emulator build +ARG JAVA_OPTS="-Djdk.lang.Process.launchMechanism=vfork" RUN ./make_reflect_config.sh RUN sbt protocGenScalaNativeImage/nativeImage RUN install -D /scala-protobuf/target/protoc-gen-scala /out/usr/bin/protoc-gen-scala