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

Build fails on Windows #308

Open
machiato32 opened this issue Apr 9, 2023 · 6 comments
Open

Build fails on Windows #308

machiato32 opened this issue Apr 9, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@machiato32
Copy link

Description

When building for windows with version 0.10.3 build fails:

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(440,5): error MSB8020: The build tools for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\sszajbely\FlutterProjects\lender_app\build\windows\plugins\rive_common\rive_common_plugin.vcxproj]

Steps To Reproduce

  1. Run flutter run windows
  2. See the error

Device & Versions

Flutter doctor output:

[√] Flutter (Channel stable, 3.7.10, on Microsoft Windows [Version 10.0.22621.1413], locale hu-HU)
• Flutter version 3.7.10 on channel stable at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4b12645012 (5 days ago), 2023-04-03 17:46:48 -0700
• Engine revision ec975089ac
• Dart version 2.19.6
• DevTools version 2.20.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at C:\Users\sszajbely\AppData\Local\Android\sdk
• Platform android-33, build-tools 32.1.0-rc1
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.3)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.2.32526.322
• Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)

[√] VS Code, 64-bit edition (version 1.76.0)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.62.0

[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.1413]
• Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.147
• Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.62

[√] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

Additional context

The build doesn't fail on rive version 0.9.1

@machiato32 machiato32 added the bug Something isn't working label Apr 9, 2023
@HayesGordon
Copy link
Contributor

Hi @machiato32 Clang is required to build for Windows, see our platform considerations doc.

This issue may also be helpful: #279 (comment)

@machiato32
Copy link
Author

Hi @HayesGordon, so this wasn't the case for version 0.9.1, right? I looked at the changelog on pub.dev before posting this and nothing regarding Windows was on there. Sorry if this is a duplicate then.

@HayesGordon
Copy link
Contributor

It may be that you did have Clang installed, but you now require a later version. I believe there is a version of it that comes built within Windows - but not too sure about that.

For fun you can check to see, before installing anything:

clang --version

But yeah, I think if you update to the latest it should work! Let me know and I'll close this.

@explorer-source
Copy link

clang --version outputs:

clang version 16.0.1
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin

Yet still outputs the same error

error MSB8020: The build tools
for ClangCL (Platform Toolset = 'ClangCL') cannot be found. To build using the ClangCL build tools, please install ClangCL build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".

Visual Studio didn't work so I installed from LLVM-16.0.1-win64.exe

Do I need to modify anything else? Is it okay to open flutter windows folder in visual studio it seems to generate lot of boiler plate code

@AndreiMisiukevich
Copy link

@machiato32 did you manage to solve the problem?
I have this issue with codemagic build now

@AndreiMisiukevich
Copy link

This happens on codemagic side. Should they do anything to support the latest rive version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants