conan-center-index
conan-center-index copied to clipboard
[package] zlib/all: zlib failed to build test_package for multiple profiles
Package and Environment Details
- Package Name/Version: zlib/all
- Operating System+version: Windows 10.0.19042
- Compiler+version: MSVC 19.16.27048.0 & MSVC 19.29.30146.0
- Conan version: conan 1.51.2
- Python version: Python 3.8.4
Conan profile
#Win_x64_vs15_vc141 [settings] os=Windows arch=x86_64 os_build=Windows arch_build=x86_64 compiler=Visual Studio compiler.version=15 compiler.toolset=v141 compiler.cppstd=14 build_type=Release [build_requires] [options] [env]
#Win_x64_vs16_vc142 [settings] os=Windows arch=x86_64 os_build=Windows arch_build=x86_64 compiler=Visual Studio compiler.version=16 compiler.toolset=v142 compiler.cppstd=14 build_type=Release [build_requires] [options] [env]
Steps to reproduce
First of all i think this is an issue of the recipe which was updated for conan 2.0
First build the zlib with a profile of VisualStudio 2017 toolset v141 conan create . 1.2.12@ --profile Win_x64_vs15_vc141
Don't clean manualy the 'test_package' folder
Then build the zlib with a profile of VisualStudio 2017 toolset v141 conan create . 1.2.12@ --profile Win_x64_vs16_vc142
Summarizing the error is the following:
CMake Error: Error: generator : Visual Studio 16 2019
Does not match the generator used previously: Visual Studio 15 2017
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
ERROR: zlib/1.2.12 (test package): Error in build() method, line 19
cmake.configure()
ConanException: Error 1 while executing cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="d:/Repositories/GitHub/conan-center-index/recipes/zlib/all/test_package/build/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "d:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\."
Of course if you manualy delete the build folder for the test it works fine But in the previous version was working without having to manualy clean it Also for other packages with the recipes updated to conan 2.0 it works fine
Mainly the issue is somwere into this recipe
Logs
Click to expand log
(venv) d:\Repositories\GitHub\conan-center-index\recipes\zlib\all>python --version
Python 3.8.4
(venv) d:\Repositories\GitHub\conan-center-index\recipes\zlib\all>conan --version
Conan version 1.51.2
(venv) d:\Repositories\GitHub\conan-center-index\recipes\zlib\all>cmake --version
cmake version 3.24.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
d:\Repositories\GitHub\conan-center-index\recipes\zlib>set CONAN_USER_HOME=d:\Repositories\GitHub
d:\Repositories\GitHub\conan-center-index\recipes\zlib>set CONAN_USER_HOME_SHORT=None
d:\Repositories\GitHub\conan-center-index\recipes\zlib>set CONAN_REVISIONS_ENABLED=True
(venv) d:\Repositories\GitHub\conan-center-index\recipes\zlib\all>conan create . 1.2.12@ -pr Win_x64_vs15_vc141
Exporting package recipe
zlib/1.2.12 exports: File 'conandata.yml' found. Exporting it...
zlib/1.2.12 exports: Copied 1 '.yml' file: conandata.yml
zlib/1.2.12: Calling export_sources()
zlib/1.2.12: Copied 1 '.patch' file: 0001-fix-cmake.patch
zlib/1.2.12: Copied 1 '.patch' file: 0002-gzguts-xcode12-compile-fix.patch
zlib/1.2.12: The stored package has not changed
zlib/1.2.12: Using the exported files summary hash as the recipe revision: b76db676bd992afa93dd18a675323942
zlib/1.2.12: Exported revision: b76db676bd992afa93dd18a675323942
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.cppstd=14
compiler.runtime=MD
compiler.toolset=v141
compiler.version=15
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
zlib/1.2.12: Forced build from source
zlib/1.2.12 (test package): Installing package
Requirements
zlib/1.2.12 from local cache - Cache
Packages
zlib/1.2.12:6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7 - Build
Installing (downloading, building) binaries...
zlib/1.2.12: Copying sources to build folder
zlib/1.2.12: Building your package in d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7
zlib/1.2.12: Generator txt created conanbuildinfo.txt
zlib/1.2.12: Calling generate()
zlib/1.2.12: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
zlib/1.2.12: Aggregating env generators
zlib/1.2.12: Calling build()
zlib/1.2.12: CMake command: cmake -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE="d:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="d:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\src"
-- Using Conan toolchain: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/build/generators/conan_toolchain.cmake
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.16.27048.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Renaming
-- D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/src/zconf.h
-- to 'zconf.h.included' because this file is included with zlib
-- but CMake generates it automatically in the build directory.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/build
zlib/1.2.12: CMake command: cmake --build "d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\build" --config Release
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Building Custom Rule D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/src/CMakeLists.txt
adler32.c
compress.c
crc32.c
deflate.c
D:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\src\deflate.c(1916): warning C4244: '=': conversion from 'ush' to 'uchf', possible loss of data [D:\Repositories\GitHub\.conan\data\zlib\1
.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\build\zlib.vcxproj]
D:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\src\deflate.c(2041): warning C4244: '=': conversion from 'ush' to 'uchf', possible loss of data [D:\Repositories\GitHub\.conan\data\zlib\1
.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\build\zlib.vcxproj]
D:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\src\deflate.c(2150): warning C4244: '=': conversion from 'ush' to 'uchf', possible loss of data [D:\Repositories\GitHub\.conan\data\zlib\1
.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\build\zlib.vcxproj]
gzclose.c
gzlib.c
gzread.c
gzwrite.c
inflate.c
infback.c
inftrees.c
inffast.c
trees.c
uncompr.c
zutil.c
zlib.vcxproj -> D:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\build\Release\zlib.lib
Building Custom Rule D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/src/CMakeLists.txt
zlib/1.2.12: Package '6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7' built
zlib/1.2.12: Build folder d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\build
zlib/1.2.12: Generated conaninfo.txt
zlib/1.2.12: Generated conanbuildinfo.txt
zlib/1.2.12: Generating the package
zlib/1.2.12: Package folder d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\package\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7
zlib/1.2.12: Calling package()
zlib/1.2.12: CMake command: cmake --install "d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7\build" --config Release --prefix "d:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7"
-- Installing: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/lib/zlib.lib
-- Installing: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/include/zconf.h
-- Installing: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7/include/zlib.h
zlib/1.2.12 package(): Packaged 2 '.h' files: zconf.h, zlib.h
zlib/1.2.12 package(): Packaged 1 '.lib' file: zlib.lib
zlib/1.2.12 package(): Packaged 1 file: LICENSE
zlib/1.2.12: Package '6cc50b139b9c3d27b3e9042d5f5372d327b3a9f7' created
zlib/1.2.12: Created package revision 3acc2f118c161bc349b83a11d81fedc9
zlib/1.2.12 (test package): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
zlib/1.2.12 (test package): Generator 'CMakeToolchain' calling 'generate()'
zlib/1.2.12 (test package): Generator txt created conanbuildinfo.txt
zlib/1.2.12 (test package): Generator 'VirtualRunEnv' calling 'generate()'
zlib/1.2.12 (test package): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
zlib/1.2.12 (test package): Generator 'CMakeDeps' calling 'generate()'
zlib/1.2.12 (test package): Aggregating env generators
zlib/1.2.12 (test package): Generated conaninfo.txt
zlib/1.2.12 (test package): Generated graphinfo
Using lockfile: 'd:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package/conan.lock'
Using cached profile from lockfile
zlib/1.2.12 (test package): Calling build()
zlib/1.2.12 (test package): CMake command: cmake -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE="d:/Repositories/GitHub/conan-center-index/recipes/zlib/all/test_package/build/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "d:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\."
-- Using Conan toolchain: D:/Repositories/GitHub/conan-center-index/recipes/zlib/all/test_package/build/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 14 with extensions OFF
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.16.27048.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Conan: Target declared 'ZLIB::ZLIB'
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Repositories/GitHub/conan-center-index/recipes/zlib/all/test_package/build
zlib/1.2.12 (test package): CMake command: cmake --build "d:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\build" --config Release
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Building Custom Rule D:/Repositories/GitHub/conan-center-index/recipes/zlib/all/test_package/CMakeLists.txt
test_package.c
D:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\test_package.c(24): warning C4477: 'printf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t' [D:\Reposi
tories\GitHub\conan-center-index\recipes\zlib\all\test_package\build\test_package.vcxproj]
D:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\test_package.c(24): note: consider using '%zu' in the format string
D:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\test_package.c(26): warning C4477: 'printf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t' [D:\Reposi
tories\GitHub\conan-center-index\recipes\zlib\all\test_package\build\test_package.vcxproj]
D:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\test_package.c(26): note: consider using '%zu' in the format string
test_package.vcxproj -> D:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\build\Release\test_package.exe
Building Custom Rule D:/Repositories/GitHub/conan-center-index/recipes/zlib/all/test_package/CMakeLists.txt
zlib/1.2.12 (test package): Running test()
Capturing current environment in d:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\build\generators\deactivate_conanrunenv-release-x86_64.bat
Configuring environment variables
Compressed size is: 21
Compressed string is: Conan Package Manager
Compressed size is: 22
Compressed string is: x┌s╬╧K╠HL╬NLOU≡M╠♥RE
ZLIB VERSION: 1.2.12
(venv) d:\Repositories\GitHub\conan-center-index\recipes\zlib\all>conan create . 1.2.12@ -pr Win_x64_vs16_vc142
Exporting package recipe
zlib/1.2.12 exports: File 'conandata.yml' found. Exporting it...
zlib/1.2.12 exports: Copied 1 '.yml' file: conandata.yml
zlib/1.2.12: Calling export_sources()
zlib/1.2.12: Copied 1 '.patch' file: 0001-fix-cmake.patch
zlib/1.2.12: Copied 1 '.patch' file: 0002-gzguts-xcode12-compile-fix.patch
zlib/1.2.12: The stored package has not changed
zlib/1.2.12: Using the exported files summary hash as the recipe revision: b76db676bd992afa93dd18a675323942
zlib/1.2.12: Exported revision: b76db676bd992afa93dd18a675323942
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.cppstd=14
compiler.runtime=MD
compiler.toolset=v142
compiler.version=16
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
zlib/1.2.12: Forced build from source
zlib/1.2.12 (test package): Installing package
Requirements
zlib/1.2.12 from local cache - Cache
Packages
zlib/1.2.12:3fb49604f9c2f729b85ba3115852006824e72cab - Build
Installing (downloading, building) binaries...
zlib/1.2.12: Copying sources to build folder
zlib/1.2.12: Building your package in d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab
zlib/1.2.12: Generator txt created conanbuildinfo.txt
zlib/1.2.12: Calling generate()
zlib/1.2.12: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
zlib/1.2.12: Aggregating env generators
zlib/1.2.12: Calling build()
zlib/1.2.12: CMake command: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="d:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="d:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\src"
-- Using Conan toolchain: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/build/generators/conan_toolchain.cmake
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.29.30146.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Renaming
-- D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/src/zconf.h
-- to 'zconf.h.included' because this file is included with zlib
-- but CMake generates it automatically in the build directory.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/build
zlib/1.2.12: CMake command: cmake --build "d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build" --config Release
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking Build System
Building Custom Rule D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/src/CMakeLists.txt
adler32.c
compress.c
crc32.c
deflate.c
gzclose.c
D:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\src\deflate.c(1916,1): warning C4244: '=': conversion from 'ush' to 'uchf', possible loss of data [D:\Repositories\GitHub\.conan\data\zlib
\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build\zlib.vcxproj]
D:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\src\deflate.c(2041,1): warning C4244: '=': conversion from 'ush' to 'uchf', possible loss of data [D:\Repositories\GitHub\.conan\data\zlib
\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build\zlib.vcxproj]
D:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\src\deflate.c(2150,13): warning C4244: '=': conversion from 'ush' to 'uchf', possible loss of data [D:\Repositories\GitHub\.conan\data\zli
b\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build\zlib.vcxproj]
gzlib.c
gzread.c
gzwrite.c
inflate.c
infback.c
inftrees.c
inffast.c
trees.c
uncompr.c
zutil.c
zlib.vcxproj -> D:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build\Release\zlib.lib
Building Custom Rule D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/build/3fb49604f9c2f729b85ba3115852006824e72cab/src/CMakeLists.txt
zlib/1.2.12: Package '3fb49604f9c2f729b85ba3115852006824e72cab' built
zlib/1.2.12: Build folder d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build
zlib/1.2.12: Generated conaninfo.txt
zlib/1.2.12: Generated conanbuildinfo.txt
zlib/1.2.12: Generating the package
zlib/1.2.12: Package folder d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\package\3fb49604f9c2f729b85ba3115852006824e72cab
zlib/1.2.12: Calling package()
zlib/1.2.12: CMake command: cmake --install "d:\Repositories\GitHub\.conan\data\zlib\1.2.12\_\_\build\3fb49604f9c2f729b85ba3115852006824e72cab\build" --config Release --prefix "d:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab"
-- Installing: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab/lib/zlib.lib
-- Installing: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab/include/zconf.h
-- Installing: D:/Repositories/GitHub/.conan/data/zlib/1.2.12/_/_/package/3fb49604f9c2f729b85ba3115852006824e72cab/include/zlib.h
zlib/1.2.12 package(): Packaged 2 '.h' files: zconf.h, zlib.h
zlib/1.2.12 package(): Packaged 1 '.lib' file: zlib.lib
zlib/1.2.12 package(): Packaged 1 file: LICENSE
zlib/1.2.12: Package '3fb49604f9c2f729b85ba3115852006824e72cab' created
zlib/1.2.12: Created package revision 8da7d78a8cd79b3814e2f9cbaa7ed550
zlib/1.2.12 (test package): Generator 'VirtualRunEnv' calling 'generate()'
zlib/1.2.12 (test package): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
zlib/1.2.12 (test package): Generator 'CMakeToolchain' calling 'generate()'
zlib/1.2.12 (test package): Generator txt created conanbuildinfo.txt
zlib/1.2.12 (test package): WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
zlib/1.2.12 (test package): Generator 'CMakeDeps' calling 'generate()'
zlib/1.2.12 (test package): Aggregating env generators
zlib/1.2.12 (test package): Generated conaninfo.txt
zlib/1.2.12 (test package): Generated graphinfo
Using lockfile: 'd:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package/conan.lock'
Using cached profile from lockfile
zlib/1.2.12 (test package): Calling build()
zlib/1.2.12 (test package): CMake command: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="d:/Repositories/GitHub/conan-center-index/recipes/zlib/all/test_package/build/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "d:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\."
CMake Error: Error: generator : Visual Studio 16 2019
Does not match the generator used previously: Visual Studio 15 2017
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
ERROR: zlib/1.2.12 (test package): Error in build() method, line 19
cmake.configure()
ConanException: Error 1 while executing cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="d:/Repositories/GitHub/conan-center-index/recipes/zlib/all/test_package/build/generators/conan_toolchain.cmake" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "d:\Repositories\GitHub\conan-center-index\recipes\zlib\all\test_package\."
As addition to pass over I have tried to use the conan create flag -tbf but it is completely ignored
-tbf TEST_BUILD_FOLDER, --test-build-folder TEST_BUILD_FOLDER
Working directory for the build of the test project.
It's not a recipe issue. Please report this error to conan client (AFAIK it's a known issue of conan v1 mode with layout).
@SpaceIm is right, please, open an issue to https://github.com/conan-io/conan/issues/. I had a similar error when cross-building packages and re-using the same test_package to native build. Conan didn't exclude the cmake cache, resulting in a big mess.
Ticket created to conan io https://github.com/conan-io/conan/issues/11891
Will keep this ticket for now, in case anybody runs into the same issue
@SirCosty Thank you!