Skip to content

Unable to build j2objc on java 21 #2645

@AsheraCordova

Description

@AsheraCordova

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..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions