Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Build Failure Since Version 0.0.2+1 #360

Closed
osamasydysf opened this issue Nov 2, 2024 · 6 comments
Closed

Windows Build Failure Since Version 0.0.2+1 #360

osamasydysf opened this issue Nov 2, 2024 · 6 comments

Comments

@osamasydysf
Copy link

Windows Build Failure Since Version 0.0.2+1

Current Behavior

Building flutter_mimir for Windows fails for all versions after v0.0.2. The issue appears to be related to Visual Studio 2022 integration.

Expected Behavior

The package should build and run on Windows platform as it did in v0.0.2.

Steps to Reproduce

  1. Create a new Flutter project
  2. Add flutter_mimir dependency (any version after 0.0.2)
  3. Try to build for Windows platform

Environment

  • Flutter version: 3.24.4-stable
  • Operating System: Windows 11 Home Version 23H2
  • Visual Studio 2022 v17.11.5
    • Desktop development with C++
    • C++ core desktop features
    • MSVC v143 VS 2022 C++ x64/x86 build tools
    • C++ ATL for latest v143 build tools (x86 & x64)
    • Security Issue Analysis
    • C++ Build Insights
    • Just-In-Time debugger
    • C++ profiling tools
    • C++ CMake tools for Windows
    • Test Adapter for Boost Test
    • Test Adapter for Google Test
    • Live Share
    • IntelliCode
    • C++ AddressSanitizer  
    • Windows 11 SDK (10.0.22621.0)
    • vcpkg package manager
    • GitHub Copilot
    • C++ MFC for latest v143 build tools (x86 & x64)
    • C++ Modules for v143 build tools (x64/x86)
  • flutter_mimir version tested: v0.1.1 (and other versions after 0.0.2)

Additional Information

  • Version 0.0.2 works correctly on Windows
  • v0.1.1 works on Android but fails on Windows
  • Attempted troubleshooting steps:
    • Repaired/updated Visual Studio 2022
    • Verified all required Visual Studio components are installed
    • Updated Flutter to latest version
    • Tested on multiple machines to rule out environment issues
    • Created clean project with only flutter_mimir dependency

Error Details

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "setlocal [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmEnd [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmErrorLevel [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: exit /b %1 [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmDone [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd" exited with code 1. [C:\Users\path_to_project\testing_package\test_mimir\build\windows\x64\INSTALL.vcxproj]
Error: Build process failed.

Additional Context

  • The issue appears to have been introduced in version 0.0.2+1
  • The problem persists across all subsequent versions
  • Android builds continue to work correctly
@GregoryConrad
Copy link
Owner

GregoryConrad commented Nov 2, 2024

Thanks for the super detailed bug report. No clue what changed between v0.0.2 and v0.0.2+1 to cause this, which makes me think that it's probably just the windows binaries not building correctly. I'll see if I can take a look.

I also don't have a windows VM set up right now, so this may take some time for me to get around to.

@GregoryConrad
Copy link
Owner

Well, that was an easy one to diagnose. The windows binaries aren't being built by CI, apparently since v0.0.2. I'll look through some logs to see if I can figure it out

@GregoryConrad
Copy link
Owner

ERROR: ERROR: info: downloading component 'rust-std' for 'aarch64-pc-windows-msvc'


ERROR: ERROR: info: installing component 'rust-std' for 'aarch64-pc-windows-msvc'


ERROR: ERROR: Error: response body closed before all bytes were read


ERROR: ERROR: cp: ../target/aarch64-pc-windows-msvc/release/embedded_milli.dll: No such file or directory


ERROR: ERROR: info: downloading component 'rust-std' for 'x86_64-pc-windows-msvc'


ERROR: ERROR: info: installing component 'rust-std' for 'x86_64-pc-windows-msvc'


ERROR: ERROR: Error: response body closed before all bytes were read


ERROR: ERROR: cp: ../target/x86_64-pc-windows-msvc/release/embedded_milli.dll: No such file or directory

Weird. Wonder what's going on there

@GregoryConrad
Copy link
Owner

Likely rust-cross/cargo-xwin#126

@GregoryConrad
Copy link
Owner

@osamasydysf I verified that mimir v0.1.0 has the windows binary included. Hard coding that version should be a sufficient workaround, although just slightly out of date.

  # Won't work:
  mimir: ^0.1.0

  # Should work:
  mimir: 0.1.0

Note the missing ^.

@GregoryConrad
Copy link
Owner

Manually released v0.1.2, which had the same issue, but I overwrote the binaries to include the windows binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants