-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Fail to build on windows using MSVC 14.42 due to ThorVG #95861
Comments
@hermet linking you for tracking |
Hello, any update on this? We are unable to build on Windows. We already compiled v4.4 but this still hasn't been implemented. |
You are using the Preview version of VS 2022, which may not be supported yet. It seems like they broke compatibility in some If you need a solution now, I suggest staying to the stable release of VS 2022. |
I would also try to suggest cleaning all build artifacts (run your usual scons command with From reading the PR that made this change in the MSVC STL, it seems like your error may come from a mismatched between code compiled with an older version, and the new version of that header. |
See https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710 Godot by default doesn't mix binaries from different compiler versions, when you compile Godot from source it should compile everything. One exception to that would be D3D12 dependencies compiled by Microsoft themselves, and ANGLE static compiled by us. Are you including either of those? Please give your full build command in the OP. CC @bruvzg - if it's ANGLE static, we might need to provide different builds for different versions of MSVC :( |
Current MSVC tools version is 14.41.34120, and it's building without issues. But the error might be related to the installation location, I think there were reports about SCons not detecting MSVC in non-standard locations (not on drive C:).
This change is in current stable MSVC (17.11.1), so unlikely related. Edit: seems like current SCons still using hardcoded paths to look for MSVC - https://github.com/SCons/scons/blob/master/SCons/Tool/MSCommon/vc.py#L927-L940 |
Hello, just for your information, thorvg previsouly applied that option in v0.14.0 (thorvg/thorvg#2385) |
Oh thanks for the headsup. I really thought thorvg was a red herring here, and just happened the first one to hit a STL mutex include. I hadn't seen that |
Fixes godotengine#95861. (cherry picked from commit f16d4af)
Fixes godotengine#95861. (cherry picked from commit f16d4af)
For users still running into this issue when trying to build the diff --git a/thirdparty/thorvg/src/common/tvgLock.h b/thirdparty/thorvg/src/common/tvgLock.h
index 59f68d0d44ba..d3a4e41c5cfd 100644
--- a/thirdparty/thorvg/src/common/tvgLock.h
+++ b/thirdparty/thorvg/src/common/tvgLock.h
@@ -25,8 +25,6 @@
#ifdef THORVG_THREAD_SUPPORT
-#define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR
-
#include <mutex>
#include "tvgTaskScheduler.h"
|
Not sure if the ThorVG shipped with In env.AppendUnique(
CPPDEFINES=[
+ "_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR",
"WINDOWS_ENABLED",
"WASAPI_ENABLED",
"WINMIDI_ENABLED",
"TYPED_METHOD_BIND",
"WIN32",
"WINVER=%s" % env["target_win_version"],
"_WIN32_WINNT=%s" % env["target_win_version"],
]
) |
Neither @akien-mga 's nor @Radnyx diffs (which contradict each other, one removes the define, the other adds it) fix the issue on the windows runners. @akien-mga 's diff fixes the issue in Here's a working diff for building Godot 4.3-stable on GitHub Action Windows runners:
|
I believe it's because the workflow turns warnings into errors. In which case yeah you'll need to remove the manual defines, as they generate a warning when predefining. I'm still in favor of predefining to reduce the risk of breaking existing behavior. |
@badlogic's diff is the correct hotfix for this issue. The ThorVG version in 4.3.stable doesn't need that define. |
I had to add this to the file as I still encountered the same compiler errors. I'm running on 14.43 which just released I believe. |
@Sailanarmo Can you make a new issue & pull request if encounter the compiler errors? |
This issue has been fixed in |
Tested versions
System information
Windows 11 - MSVC 14.42
Issue description
Steps to reproduce
Minimal reproduction project (MRP)
This is an engine build problem, thus it does not have an actual project.
The text was updated successfully, but these errors were encountered: