[aarch64-port-dev ] Can't build on macOS on arm64

Vladimir Kempik vkempik at azul.com
Mon Nov 23 07:48:34 UTC 2020


Hello

You need to pass extra ld flag (via configure option) to specify location of arm64(or fat) version of JavaNativeFoundation.framework.
'-F path/to/jnfframework/'

Regards, Vladimir

Anton Kozlov <akozlov at azul.com> 23 ноября 2020 г. 10:40:00 написал:

Hi,

Is this a cross-compilation, or are you trying to build on the target device with macos and aarch64? Both configurations worked fine for us, so could you post configure output?

Thanks,
Anton

On 21.11.2020 14:21, Kirill A. Korinsky wrote:
Good day,

I'm playing with new Apple M1 cpu and can't build openjdk for it.

As local source I'm using 47396be from https://github.com/openjdk/aarch64-port/tree/jdk-macos <https://github.com/openjdk/aarch64-port/tree/jdk-macos> and Azul JDK build 16-ea+24 for macOS adm64 from https://www.azul.com/downloads/zulu-community/?os=macos&architecture=arm-64-bit&package=jdk <https://www.azul.com/downloads/zulu-community/?os=macos&architecture=arm-64-bit&package=jdk>

The build is crashed on with error

* For target support_native_java.base_libosxsecurity_BUILD_LIBOSXSECURITY_link:
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/JavaNativeFoundation.framework/JavaNativeFoundation.tbd, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/JavaNativeFoundation.framework/JavaNativeFoundation.tbd
Undefined symbols for architecture arm64:
"_JNFCallVoidMethod", referenced from:
_Java_apple_security_KeychainStore__1scanKeychain in KeystoreImpl.o
"_JNFJavaToNSString", referenced from:
_Java_apple_security_KeychainStore__1addItemToKeychain in KeystoreImpl.o
"_JNFNativeMethodEnter", referenced from:
_Java_apple_security_KeychainStore__1addItemToKeychain in KeystoreImpl.o
"_JNFNativeMethodExit", referenced from:
_Java_apple_security_KeychainStore__1addItemToKeychain in KeystoreImpl.o
"_OBJC_CLASS_$_JNFException", referenced from:
objc-class-ref in KeystoreImpl.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Inside JavaNativeFoundation.tbd I can find the only x86_64-maco target.

--
wbr, Kirill




More information about the aarch64-port-dev mailing list