Getting "C1902: Program database manager mismatch" when using CMake
tpimh opened this issue · 3 comments
tpimh commented
All other tests run fine, but CMake tests fail for me with the following errors when testing cl:
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/opt/msvc/bin/x64/cl"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/tmp/msvc-wine.tmp.6V7a/CMakeFiles/CMakeScratch/TryCompile-OjINNN'
Run Build Command(s): /usr/lib/ninja-build/bin/ninja -v cmTC_0d80c
[1/2] /opt/msvc/bin/x64/cl /nologo /DWIN32 /D_WINDOWS /Ob0 /Od /RTC1 -MDd -Zi /showIncludes /FoCMakeFiles/cmTC_0d80c.dir/testCCompiler.c.obj /FdCMakeFiles/cmTC_0d80c.dir/ /FS -c /tmp/msvc-wine.tmp.6V7a/CMakeFiles/CMakeScratch/TryCompile-OjINNN/testCCompiler.c
FAILED: CMakeFiles/cmTC_0d80c.dir/testCCompiler.c.obj
/opt/msvc/bin/x64/cl /nologo /DWIN32 /D_WINDOWS /Ob0 /Od /RTC1 -MDd -Zi /showIncludes /FoCMakeFiles/cmTC_0d80c.dir/testCCompiler.c.obj /FdCMakeFiles/cmTC_0d80c.dir/ /FS -c /tmp/msvc-wine.tmp.6V7a/CMakeFiles/CMakeScratch/TryCompile-OjINNN/testCCompiler.c
z:/tmp/msvc-wine.tmp.6V7a/CMakeFiles/CMakeScratch/TryCompile-OjINNN/testCCompiler.c: fatal error C1902: Program database manager mismatch; please check your installation
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
mstorsjo commented
To avoid this issue, you need to have winbind
installed - see the readme item at https://github.com/mstorsjo/msvc-wine#fatal-error-c1902-program-database-manager-mismatch-please-check-your-installation.
mstorsjo commented
Alternatively, to avoid this issue if building your own CMake projects, configure your build with -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
. This requires having cmake_minimum_required(VERSION 3.25)
or higher, though.
tpimh commented
Thank you very much, this resolves the issue.