|
Hello all,
I have successfully been able to build and run Gluegen and Jogl on x86_64 Windows 11. I have (using advice from AI chat) attempted to build targeting ARM64 Windows 11. However I am getting stuck at almost every stage. ChatGPT suggested using llvm-mingw, which I was able to use on x64 Windows to cross-compile an Arm64 "Hello, World" executable. Starting with Gluegen, I was able to set up my build.xml so the mingw compiler in llvm-mingw could target ARM64: [cc] gcc --target=aarch64-w64-mingw32 -v -O2 -c -fno-rtti -DNDEBUG -DDBUILD_DLL -D_STRICT_ANSI -D_JNI_IMPLEMENTATION_ -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -IC:\Build\gluegen\build\gensrc\native -IC:\Build\gluegen\build\gensrc\native\Windows -IC:\Build\gluegen\make\stub_includes\jni -IC:\Build\gluegen\make\stub_includes\jni\win32 -IC:\Build\gluegen\make\stub_includes\platform C:\Build\gluegen\src\native\windows\WindowsDynamicLinkerImpl_JNI.c C:\Build\gluegen\src\native\common\JVMUtil.c C:\Build\gluegen\src\native\common\MachineDataInfoRuntime.c C:\Build\gluegen\src\native\common\PointerBuffer.c C:\Build\gluegen\src\native\common\JVM_JNI8.c C:\Build\gluegen\src\native\common\Platforms.c C:\Build\gluegen\src\native\common\JarUtil.c However, evidently llvm-mingw uses clang-22 to do the linking, and calling ld.lld with "i386pep" option. At which point the process breaks down: [cc] "C:/llvm-mingw/bin/clang-22.exe" -cc1 -triple aarch64-w64-windows-gnu -O2 -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name JVM_JNI8.c -mrelocation-model pic -pic-level 2 -mframe-pointer=reserved -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -fno-sized-deallocation -fno-use-init-array -enable-tlsdesc -target-cpu generic -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -target-abi aapcs -debugger-tuning=gdb -fdebug-compilation-dir=C:/Build/gluegen/build/obj -v -fcoverage-compilation-dir=C:/Build/gluegen/build/obj -resource-dir C:/llvm-mingw/lib/clang/22 -D NDEBUG -D DBUILD_DLL -D _STRICT_ANSI -D _JNI_IMPLEMENTATION_ -D WINVER=0x0601 -D _WIN32_WINNT=0x0601 -I "C:\\Build\\gluegen\\build\\gensrc\\native" -I "C:\\Build\\gluegen\\build\\gensrc\\native\\Windows" -I "C:\\Build\\gluegen\\make\\stub_includes\\jni" -I "C:\\Build\\gluegen\\make\\stub_includes\\jni\\win32" -I "C:\\Build\\gluegen\\make\\stub_includes\\platform" -internal-isystem C:/llvm-mingw/lib/clang/22/include -internal-isystem C:/llvm-mingw/aarch64-w64-mingw32/include -internal-isystem C:/llvm-mingw/aarch64-w64-mingw32/usr/include -internal-isystem C:/llvm-mingw/include -ferror-limit 19 -fno-use-cxa-atexit -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -exception-model=seh -vectorize-loops -vectorize-slp -faddrsig -o JVM_JNI8.o -x c "C:\\Build\\gluegen\\src\\native\\common\\JVM_JNI8.c" ... [cc] "C:/llvm-mingw/bin/ld.lld" -m i386pep --shared -Bdynamic -e DllMainCRTStartup --enable-auto-image-base -o gluegen_rt.dll C:/llvm-mingw/x86_64-w64-mingw32/lib/dllcrt2.o C:/llvm-mingw/x86_64-w64-mingw32/lib/crtbegin.o -LC:/llvm-mingw/x86_64-w64-mingw32/lib -LC:/llvm-mingw/x86_64-w64-mingw32/mingw/lib -LC:/llvm-mingw/lib -LC:/llvm-mingw/lib/clang/22/lib/windows --enable-auto-import --enable-stdcall-fixup --kill-at WindowsDynamicLinkerImpl_JNI.o JVMUtil.o MachineDataInfoRuntime.o PointerBuffer.o JVM_JNI8.o Platforms.o JarUtil.o -lmingw32 C:/llvm-mingw/lib/clang/22/lib/windows/libclang_rt.builtins-x86_64.a -l:libunwind.a -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 C:/llvm-mingw/lib/clang/22/lib/windows/libclang_rt.builtins-x86_64.a -l:libunwind.a -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/llvm-mingw/x86_64-w64-mingw32/lib/crtend.o Example of the error: [cc] ld.lld: error: WindowsDynamicLinkerImpl_JNI.o: machine type arm64 conflicts with x64 Two questions: - Has anyone attempted to build arm64 Windows binaries? - Is there any plan to officially add support for Arm64 Windows? |
| Free forum by Nabble | Edit this page |
