Hi,
I am trying to build VTK 9.1.0-rc2 on a Mac M1 with an ARM64. I am blocked at
[ 38%] Linking CXX shared library ../../lib/java/vtk-Darwin-arm64/libvtkRenderingCoreJava.jnilib
Undefined symbols for architecture arm64:
"_JAWT_GetAWT", referenced from:
_Java_vtk_vtkPanel_RenderCreate in vtkRenderWindowJava.mm.o
_Java_vtk_rendering_awt_vtkInternalAwtComponent_RenderCreate in vtkRenderWindowJava.mm.o
_Java_vtk_vtkPanel_Lock in vtkRenderWindowJava.mm.o
_Java_vtk_vtkPanel_UnLock in vtkRenderWindowJava.mm.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/java/vtk-Darwin-arm64/libvtkRenderingCoreJava.jnilib] Error 1
make[1]: *** [Wrapping/Java/CMakeFiles/vtkRenderingCoreJava.dir/all] Error 2
make: *** [all] Error 2
There are old post saying that the AWT include path should be replaced by -framework JavaVM
, Apple forums suggest to rather use -framework JavaNativeFoundation
since a year ago, but none of this work :
[ 40%] Linking CXX shared library ../../lib/java/vtk-Darwin-arm64/libvtkRenderingCoreJava.jnilib
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks//JavaNativeFoundation.framework/JavaNativeFoundation.tbd, missing required architecture arm64 in file /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks//JavaNativeFoundation.framework/JavaNativeFoundation.tbd
Undefined symbols for architecture arm64:
"_JAWT_GetAWT", referenced from:
_Java_vtk_vtkPanel_RenderCreate in vtkRenderWindowJava.mm.o
_Java_vtk_rendering_awt_vtkInternalAwtComponent_RenderCreate in vtkRenderWindowJava.mm.o
_Java_vtk_vtkPanel_Lock in vtkRenderWindowJava.mm.o
_Java_vtk_vtkPanel_UnLock in vtkRenderWindowJava.mm.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/java/vtk-Darwin-arm64/libvtkRenderingCoreJava.jnilib] Error 1
make[1]: *** [Wrapping/Java/CMakeFiles/vtkRenderingCoreJava.dir/all] Error 2
make: *** [all] Error 2
My CMake configuration is as follow. The chosen JVM is a Zulu 11 for ARM processors.
LD is supposed to support my processor
ld -v
@(#)PROGRAM:ld PROJECT:ld64-711
BUILD 14:59:28 Aug 21 2021
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 13.0.0, (clang-1300.0.29.3) (static support for 27, runtime is 27)
TAPI support using: Apple TAPI version 13.0.0 (tapi-1300.0.6.5)
Thanks in advance for your help!