rive-flutter
rive-flutter copied to clipboard
running windows on Parallels Desktop with Windows 11 does not work
Description
After setting up Parallels Desktop with Windows 11 and freshly installing flutter to create a new project, installing rive yields the following application error when building for windows:
lld-link : error : rive_common_plugin.dir\Release\rive_text.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\raw_path.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\mat2d.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\renderer.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\font_hb.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\line_breaker.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\audio_engine.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\audio_source.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\audio_sound.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\audio_reader.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-aat-layout.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-aat-map.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-blob.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-buffer-serialize.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-buffer-verify.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-buffer.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-common.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-draw.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-face.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : rive_common_plugin.dir\Release\hb-font.obj: machine type arm64 conflicts with x64 [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
lld-link : error : too many errors emitted, stopping now (use /errorlimit:0 to see all errors) [...\testapp\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
Steps To Reproduce
Steps to reproduce the behavior:
- Setup a fresh installation of Parallels Desktop with Windows 11
- Follow instructions to setup Flutter for Windows at flutter.dev
- Create a new flutter project (
flutter create myapp
) - Install rive (
flutter pub add rive
) - Build or Run flutter application for windows
- See error ⚠️
Expected behavior
Application should build and run.
Flutter 3.19.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 300451adae (3 weeks ago) • 2024-03-27 21:54:07 -0500
Engine • revision e76c956498
Tools • Dart 3.3.3 • DevTools 2.31.1
Additional context
Tried on Mac M1 and M2 chip with Visual Sudio 2022
Hi @aderito7, it seems like the most relevant issue is this: https://github.com/flutter/flutter/issues/122098
This leads to a variety of other related issues regarding Flutter support on arm64, notably: https://github.com/flutter/flutter/issues/116196
What we think is happening here is Flutter builds x86-64 for Windows even when running on arm64, but our plugin builds for host (arm64). We can look into setting this within our cmake file to specify the target platform as a fallback, but you could also test it out now to see if it works by providing the following flag:
--target-platform windows-x64
Which should force everything to build for x64.
Ideally later you could use:
--target-platform windows-arm64
But not sure if this is fully supported yet.