[aarch64-port-dev ] Can't build on macOS on arm64
Kirill A. Korinsky
kirill at korins.ky
Mon Nov 23 11:25:27 UTC 2020
Hello,
I'm using configure string like this:
catap at Kirills-mini-m1 openjdk-aarch64-port % bash ./configure --enable-static-build --with-boot-jdk=/Users/catap/zulu16.0.65-ea-jdk16.0.0-ea.24-macos_aarch64 --with-extra-ldflags=-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/JavaNativeFoundation.framework
and make images fails:
Creating support/modules_libs/java.base/libjimage.a from 6 file(s)
Creating support/modules_libs/java.base/libjli.a from 8 file(s)
Creating support/modules_libs/java.base/libnet.a from 22 file(s)
Creating support/modules_libs/java.base/libnio.a from 22 file(s)
Getting symbols from nm
Getting symbols from nm
make[3]: *** [/Users/catap/src/openjdk-aarch64-port/build/macosx-aarch64-server-release/support/native/java.base/libfdlibm.a] Error 1
make[3]: *** Deleting file `/Users/catap/src/openjdk-aarch64-port/build/macosx-aarch64-server-release/support/native/java.base/libfdlibm.a'
make[3]: *** Waiting for unfinished jobs....
Getting symbols from nm
make[2]: *** [java.base-libs] Error 2
ERROR: Build failed for target 'images' in configuration 'macosx-aarch64-server-release' (exit code 2)
Stopping sjavac server
No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.
make[1]: *** [main] Error 2
make: *** [images] Error 2
--
wbr, Kirill
> On 23. Nov 2020, at 11:52, Vladimir Kempik <vkempik at azul.com> wrote:
>
> Hello
>
> https://github.com/apple/openjdk/tree/xcodejdk14-release/apple/JavaNativeFoundation <https://github.com/apple/openjdk/tree/xcodejdk14-release/apple/JavaNativeFoundation>
>
> Clone whole repo then do xcodebuild in apple/JavaNativeFoundation folder
>
> also you can find built version inside Xcode12.2 in apple’s build of openjdk14. ( find /Applications/Xcode.app -iname JavaNativeFoundation.framework )
>
> Regards, Vladimir
>
>> 23 нояб. 2020 г., в 13:46, Kirill A. Korinsky <kirill at korins.ky> написал(а):
>>
>> Hello,
>>
>> Where should I get this jnfframework?
>>
>> Right now my configure options are:
>>
>> bash ./configure --enable-static-build --with-boot-jdk=/Users/catap/zulu16.0.65-ea-jdk16.0.0-ea.24-macos_aarch64
>>
>> --
>> wbr, Kirill
>>
>>> On 23. Nov 2020, at 08:48, Vladimir Kempik <vkempik at azul.com <mailto:vkempik at azul.com>> wrote:
>>>
>>> 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 <mailto: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> <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> <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