google / google/j2objc

Unable to build j2objc on java 21

Open
#2,645 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6k
Forks
999
Avg merge
19h 20m
Merged PRs (30d)
14

Description

Error: jdk.tools.jlink.plugin.PluginException: ModuleTarget is malformed: No enum constant jdk.internal.util.Architecture.X86_64

This happens while building executing jlink in jre_emul/java.mk:

/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home//bin/jlink --module-path /Users/ramm/Documents/JAVA/j2objc_new/j2objc/jre_emul/build_result/jmod --add-modules java.base --output /Users/ramm/Documents/JAVA/j2objc_new/j2objc/jre_emul/build_result/jre_emul_module --verbose
java.base file:///Users/ramm/Documents/JAVA/j2objc_new/j2objc/jre_emul/build_result/jmod/jre_emul.jmod

I think that x86_64 constant has been removed from java 21 and replaced with x64

I went to scripts/detect-java-platform.sh

case "$arch" in
amd64|x86_64|x86-64) arch=x86_64 ;;
aarch64|arm64) arch=aarch64 ;;
armv7l|armv7*) arch=armv7l ;;
esac

changed x86_64 to x64 and it stared to build..

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.