Wierd cmake errors about crashpad_wer.rc written multiple times when building sentry-native on windows #1380
-
|
I have an issue since longer and still have not found a solution to it. Sentry native is checked out a subodule in another repository, thus i cannot really change the cmake files. This is the current command line:
Cmake version is 3.31.6-msvc6. Using sentry-native master head which i just updated I get really wiered errors about crashpad_wer.rc beeing written multiple time (in total 15 times) `CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Error in external/crashpad/handler/CMakeLists.txt: X:/dev/global/libs/sentry-native/buildwin32_vc143/crashpad_build/handler/crashpad_wer.rc CMake Generate step failed. Build files cannot be regenerated correctly.` Anybody else having seen this or has a hint how to solve it without patching the error logfile? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
|
Hi @JanFellner, the problem here is a classic CMake topic when it comes to multi-config generators. We produce the resource files for all terminal binaries ( In a single config generator like However, in your setup, you specify |
Beta Was this translation helpful? Give feedback.
-
|
So cmake output looks good but i get lib linker errors now... the mpack project is part of the generated solution, so the project is there but it looks like it is not built when i I´m trying to reduce the builds and build time by: @supervacuus - Is that mpackd part of these? |
Beta Was this translation helpful? Give feedback.
-
|
Adding the mpack lib appropriatly solved it for me... |
Beta Was this translation helpful? Give feedback.
-
|
closing it as done .) |
Beta Was this translation helpful? Give feedback.

Hi @JanFellner, the problem here is a classic CMake topic when it comes to multi-config generators.
We produce the resource files for all terminal binaries (
.exe/.dll) using generator expressions that vary by config. However, we write the generated resource files not into config-specific folders, which may potentially result in overwrites when the content of the generated files differs.In a single config generator like
MakefilesorNinja, this will never surface a problem, since there is always only one config. Even in multi-config setups (like the Visual Studio generator), this is usually not a problem because the evaluation file will be written multiple times with the identical content …