webrtc-native
webrtc-native copied to clipboard
Lack of ARM64 Builds for Windows
Godot version
4.3stable
Plugin version
v1.0.6
System information
Windows 11 Arm64 (Snapdragon X Elite)
Issue description
I’ve noticed that the repository currently does not provide binaries for the ARM64 architecture on Windows. ARM64-based devices are becoming more prevalent, especially with the new Copilot + PCs.
I tried to compile the project for this architecture, but I'm don't know the C++ environment well, and I didn't succeed.
Steps to reproduce
Add the webrtc-native to your godot project.
An error pop in the output panel:
No GDExtension library found for current OS and architecture (windows.arm64) in configuration file: res://webrtc/webrtc.gdextension
Minimal reproduction project
No response
I honestly have no experience in building form windows arm64 either.
I guess the first step would be to be able to build libdatachannel (finding the right CMake flags) and openssl (which uses its own build system).
It also seems that mingw support for windows arm64 is still experimental, so this probably needs to use MSVC for now, which is a pain for me to test.
In short, help is welcome.
I finally managed to build the project for Windows Arm64 !
I slightly modified the OpenSSL configuration and indeed used MSVC.
So, I opened a pull request #151
It should now be easier™ to get arm64 builds since we moved from OpenSSL to mbedTLS (which uses cmake like libdatachannel).
That said, I tried multiple times and was never able to setup MSVC to build for ARM64 (there seem to be no cross-tool prompt AMD64 -> ARM64 provided by visual studio even after installing the relevant components).
If anyone knows how to do that, please let me know.
there seem to be no cross-tool prompt AMD64 -> ARM64 provided by visual studio even after installing the relevant components
It's something like C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat.
But godot-cpp copy in this repo is outdated and will detect arm64 compiler correctly (and likely rest the environment to x86_64 when building).
It's something like
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat.But
godot-cppcopy in this repo is outdated and will detect arm64 compiler correctly (and likely rest the environment to x86_64 when building).
Thanks! I managed to get arm64 to build locally, after updating godot-cpp, but I had to also source the bat for arm64 cross compiling to make cmake happy (dependencies are built with cmake).
We use the ninja generator for cmake, and that basically use the default configuration (which is amd64 if you don't source the bat). Alternatively you need to specify the correct VS generator, which generate a multiarch config, and then you need to invoke the correct one.
I'll see if I manage to get it included in CI, but at least we know users can build it if needed in the meantime.