You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiler+version: cl.exe 19.00 (msvc 19.0 according to settings.yml) from a standard VS2015 installation
Conan version: 1.41.0
Python version: 3.8.9
Steps to reproduce
When using the msvc 19.0 compiler of a "standard" Visual Studio 2015 installation ("standard" meaning that it's not the "MSVC v140 - VS 2015 C++ Build Tools (v14.00)" included in later editions VS2017 & VS2019), the CMakeToolchain crashes while calling the generated conanvcvars.bat. By examining the latter (see below), it turns out the argument -vcvars_ver is passed to the vcvarsall.bat activation script. However, that particular version of the script doesn't expect such an argument - since it was added from VS2017 onwards for activating older toolsets in newer versions of Visual Studio - so it errors out.
@echooffset"VSCMD_START_DIR=%CD%"&&call"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" amd64 -vcvars_ver=14.0
whereas the correct call should be:
@echooffset"VSCMD_START_DIR=%CD%"&&call"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" amd64
Logs
Configuration (profile_host):
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=19.0
os=Windows
[options]
*:shared=True
[build_requires]
[env]
CC=cl
CXX=cl
Configuration (profile_build):
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=19.0
os=Windows
[options]
[build_requires]
[env]
CC=cl
CXX=cl
zlib/1.2.11@compression/stable: Forced build from source
zlib/1.2.11@compression/stable (test package): Installing package
Requirements
zlib/1.2.11@compression/stable from local cache - Cache
Packages
zlib/1.2.11@compression/stable:75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3 - Build
Installing (downloading, building) binaries...
zlib/1.2.11@compression/stable: Configuring sources in C:\gitlab-runner\builds\9fb8a5b5\0\io\zlib\.conan\data\zlib\1.2.11\compression\stable\source
zlib/1.2.11@compression/stable: Copying sources to build folder
zlib/1.2.11@compression/stable: Building your package in C:\gitlab-runner\builds\9fb8a5b5\0\io\zlib\.conan\data\zlib\1.2.11\compression\stable\build\75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3
zlib/1.2.11@compression/stable: Generator txt created conanbuildinfo.txt
zlib/1.2.11@compression/stable: Calling generate()
zlib/1.2.11@compression/stable: Aggregating env generators
zlib/1.2.11@compression/stable: Calling build()
zlib/1.2.11@compression/stable: CMake command: cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="C:/gitlab-runner/builds/9fb8a5b5/0/io/zlib/.conan/data/zlib/1.2.11/compression/stable/build/75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/gitlab-runner/builds/9fb8a5b5/0/io/zlib/.conan/data/zlib/1.2.11/compression/stable/package/75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3" "C:\gitlab-runner\builds\9fb8a5b5\0\io\zlib\.conan\data\zlib\1.2.11\compression\stable\build\75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3\_source_subfolder"
----Running------
> "C:\gitlab-runner\builds\9fb8a5b5\0\io\zlib\.conan\data\zlib\1.2.11\compression\stable\build\75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3\conanbuild.bat" && cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="C:/gitlab-runner/builds/9fb8a5b5/0/io/zlib/.conan/data/zlib/1.2.11/compression/stable/build/75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/gitlab-runner/builds/9fb8a5b5/0/io/zlib/.conan/data/zlib/1.2.11/compression/stable/package/75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3" "C:\gitlab-runner\builds\9fb8a5b5\0\io\zlib\.conan\data\zlib\1.2.11\compression\stable\build\75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3\_source_subfolder"
-----------------
Logging command output to file 'C:\gitlab-runner\builds\9fb8a5b5\0\io\zlib\.conan\data\zlib\1.2.11\compression\stable\build\75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3\_build_subfolder\conan_run.log'
Error in script usage. The correct usage is:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" [option]
or
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" [option] store
or
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" [option] [version number]
or
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" [option] store [version number]
where [option] is: x86 | amd64 | arm | x86_amd64 | x86_arm | amd64_x86 | amd64_arm
where [version number] is either the full Windows 10 SDK version number or "8.1" to use the windows 8.1 SDK
:
The store parameter sets environment variables to support
store (rather than desktop) development.
:
For example:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" x86_amd64
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" x86_arm store
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" x86_amd64 10.0.10240.0
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" x86_arm store 10.0.10240.0
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" x64 8.1
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC/vcvarsall.bat" x64 store 8.1
:
Please make sure either Visual Studio or C++ Build SKU is installed.
Using Conan toolchain through C:/gitlab-runner/builds/9fb8a5b5/0/io/zlib/.conan/data/zlib/1.2.11/compression/stable/build/75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3/conan_toolchain.cmake.
-- Conan toolchain: Setting BUILD_SHARED_LIBS= ON
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:4 (project):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/gitlab-runner/builds/9fb8a5b5/0/io/zlib/.conan/data/zlib/1.2.11/compression/stable/build/75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3/_build_subfolder/CMakeFiles/CMakeOutput.log".
See also "C:/gitlab-runner/builds/9fb8a5b5/0/io/zlib/.conan/data/zlib/1.2.11/compression/stable/build/75d5ce8d183d5e36dab24b5c22b2e9d17f3981e3/_build_subfolder/CMakeFiles/CMakeError.log".
On a different build node equipped with VS2019 Build Tools + MSVC v140 toolset and using the same profile with the sole addition of tools.microsoft.msbuild:vs_version=16, it worked just fine.
However, I would expect conan to do the right thing (stopping short of specifying -vcvars_ver) also when activating a "traditional" VS2015 installation.
The text was updated successfully, but these errors were encountered:
Environment Details
cl.exe 19.00
(msvc 19.0
according tosettings.yml
) from a standard VS2015 installationSteps to reproduce
When using the
msvc 19.0
compiler of a "standard" Visual Studio 2015 installation ("standard" meaning that it's not the "MSVC v140 - VS 2015 C++ Build Tools (v14.00)" included in later editions VS2017 & VS2019), theCMakeToolchain
crashes while calling the generatedconanvcvars.bat
. By examining the latter (see below), it turns out the argument-vcvars_ver
is passed to thevcvarsall.bat
activation script. However, that particular version of the script doesn't expect such an argument - since it was added from VS2017 onwards for activating older toolsets in newer versions of Visual Studio - so it errors out.whereas the correct call should be:
Logs
On a different build node equipped with VS2019 Build Tools + MSVC v140 toolset and using the same profile with the sole addition of
tools.microsoft.msbuild:vs_version=16
, it worked just fine.However, I would expect conan to do the right thing (stopping short of specifying
-vcvars_ver
) also when activating a "traditional" VS2015 installation.The text was updated successfully, but these errors were encountered: