Open cdjzzzz opened 1 month ago
i remove C:/msys64/ucrt64/ from PATH temply, spdlog build success. But i have to add C:/msys64/ucrt64/ back to PATH, i have other project using C:/msys64/ucrt64/ cmake to compile with. How could i perfectly solve this issue to use two cmake tools?
AFAIK you can't have 2 cmakes at the same time ... I mean you could but if you have external cmake (eg as in your case from msys install) - vcpkg will use it instead of internal one
PS vcpkg install spdlog:x86-windows builds just fine using cmake from vcpkg (cmake-3.29.2-windows)
Oh, looks like you have an elegant way:
It is possible to instruct vcpkg to use its internal CMake instead of an external one. You can achieve this by setting the VCPKG_FORCE_SYSTEM_BINARIES environment variable to 0. This tells vcpkg to use its internal tools, including CMake, rather than any external versions.
Here's how you can set this environment variable:
set VCPKG_FORCE_SYSTEM_BINARIES=0
https://learn.microsoft.com/en-us/vcpkg/users/config-environment
AFAIK you can't have 2 cmakes at the same time ...
No, there is no limit.
is possible to instruct vcpkg to use its internal CMake instead of an external one. You can achieve this by setting the VCPKG_FORCE_SYSTEM_BINARIES environment variable to 0. This tells vcpkg to use its internal tools, including CMake, rather than any external versions.
Here's how you can set this environment variable:
set VCPKG_FORCE_SYSTEM_BINARIES=0
No, this turns things upside down.
The variable is to enforce the use of system binaries if set.
i remove C:/msys64/ucrt64/ from PATH temply, spdlog build success. But i have to add C:/msys64/ucrt64/ back to PATH, i have other project using C:/msys64/ucrt64/ cmake to compile with. How could i perfectly solve this issue to use two cmake tools?
Can't you just set PATH
so that the desired cmake is found first? There is no need for adding MSYS system-wide or user-wide to the PATH
.
Basically the one in C:/msys64/ucrt64/bin
should work as well (but not the one in C:/msys64/usr/bin
!). But did that failing x64-windows (=MSVC) build have all other variables setup correctly for MSVC and Windows SDK?
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.
Package: spdlog:x86-windows@1.14.1
Host Environment
To Reproduce
vcpkg install spdlog:x86-windows
Failure logs
C:\vcpkg\buildtrees\spdlog\install-x86-windows-dbg-out.log
``` Change Dir: 'C:/vcpkg/buildtrees/spdlog/x86-windows-dbg' Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v -v -j13 install [1/9] RC C:\vcpkg\buildtrees\spdlog\x86-windows-dbg\version.rc CMakeFiles\spdlog.dir\version.rc.res.d CMakeFiles\spdlog.dir\version.rc.res "Note: including file: " "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x86/cl.exe" C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dspdlog_EXPORTS -I C:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\include -I C:\vcpkg\installed\x86-windows\include -c65001 /DWIN32 -D_DEBUG /fo CMakeFiles\spdlog.dir\version.rc.res C:\vcpkg\buildtrees\spdlog\x86-windows-dbg\version.rc FAILED: CMakeFiles/spdlog.dir/version.rc.res RC C:\vcpkg\buildtrees\spdlog\x86-windows-dbg\version.rc CMakeFiles\spdlog.dir\version.rc.res.d CMakeFiles\spdlog.dir\version.rc.res "Note: including file: " "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x86/cl.exe" C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dspdlog_EXPORTS -I C:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\include -I C:\vcpkg\installed\x86-windows\include -c65001 /DWIN32 -D_DEBUG /fo CMakeFiles\spdlog.dir\version.rc.res C:\vcpkg\buildtrees\spdlog\x86-windows-dbg\version.rc Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384 Copyright (C) Microsoft Corporation. All rights reserved. fatal error RC1107: invalid usage; use RC /? for Help [2/9] C:\PROGRA~1\MICROS~2\2022\PROFES~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x86\cl.exe /TP -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dspdlog_EXPORTS -IC:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\include -external:IC:\vcpkg\installed\x86-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /Zc:__cplusplus /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -MDd /wd4251 /wd4275 /showIncludes /FoCMakeFiles\spdlog.dir\src\file_sinks.cpp.obj /FdCMakeFiles\spdlog.dir\ /FS -c C:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\src\file_sinks.cpp [3/9] C:\PROGRA~1\MICROS~2\2022\PROFES~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x86\cl.exe /TP -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dspdlog_EXPORTS -IC:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\include -external:IC:\vcpkg\installed\x86-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /Zc:__cplusplus /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -MDd /wd4251 /wd4275 /showIncludes /FoCMakeFiles\spdlog.dir\src\cfg.cpp.obj /FdCMakeFiles\spdlog.dir\ /FS -c C:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\src\cfg.cpp [4/9] C:\PROGRA~1\MICROS~2\2022\PROFES~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x86\cl.exe /TP -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dspdlog_EXPORTS -IC:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\include -external:IC:\vcpkg\installed\x86-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /Zc:__cplusplus /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -MDd /wd4251 /wd4275 /showIncludes /FoCMakeFiles\spdlog.dir\src\async.cpp.obj /FdCMakeFiles\spdlog.dir\ /FS -c C:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\src\async.cpp [5/9] C:\PROGRA~1\MICROS~2\2022\PROFES~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x86\cl.exe /TP -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dspdlog_EXPORTS -IC:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\include -external:IC:\vcpkg\installed\x86-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /Zc:__cplusplus /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -MDd /wd4251 /wd4275 /showIncludes /FoCMakeFiles\spdlog.dir\src\color_sinks.cpp.obj /FdCMakeFiles\spdlog.dir\ /FS -c C:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\src\color_sinks.cpp [6/9] C:\PROGRA~1\MICROS~2\2022\PROFES~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x86\cl.exe /TP -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dspdlog_EXPORTS -IC:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\include -external:IC:\vcpkg\installed\x86-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /Zc:__cplusplus /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -MDd /wd4251 /wd4275 /showIncludes /FoCMakeFiles\spdlog.dir\src\stdout_sinks.cpp.obj /FdCMakeFiles\spdlog.dir\ /FS -c C:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\src\stdout_sinks.cpp [7/9] C:\PROGRA~1\MICROS~2\2022\PROFES~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x86\cl.exe /TP -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dspdlog_EXPORTS -IC:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\include -external:IC:\vcpkg\installed\x86-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /utf-8 /GR /EHsc /MP /Zc:__cplusplus /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 -MDd /wd4251 /wd4275 /showIncludes /FoCMakeFiles\spdlog.dir\src\spdlog.cpp.obj /FdCMakeFiles\spdlog.dir\ /FS -c C:\vcpkg\buildtrees\spdlog\src\v1.14.1-0ddeaa008e.clean\src\spdlog.cpp ninja: build stopped: subcommand failed. ```