-
Notifications
You must be signed in to change notification settings - Fork 948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] CMakeDeps sometimes fails for test package #10176
Comments
This seems a result of the latest changes in 1.43, because the recipes have not been upgraded to fix the properties in ConanCenter. As soon as the PRs gets merged in ConanCenter, this will work again. |
This issue appears with conan 1.42.1 too |
Well, some of the properties have already started to be merged in ConanCenter (those will not work in 1.42.1 either), so at the moment it is in a transition state where some packages will only work in 1.43 and others in 1.42 (even ones in the same dependency graph), until the different recipes being involved all migrate to the new properties, it will be a bit unstable. |
Ok I understand but here, one second it works, the next one it doesn't. Can the property explain this ? |
No, that is really weird. Unless there is some CDN propagation thing or something, and it is being resolved to different locations... you are right, if that is the behavior, it is worth having a look (for me it fails consistently) |
Yes, that's weird. I'm trying to figure out what's going on. In my case, it's failing randomly in macOS. |
I guess I know what's happening. Look at the following pieces of log. FAILED
SUCCEEDED
If you realize, all the generators are being randomly executed so I think that's what is causing the error. |
I don't think the order of generators would change much, but maybe something to look is the order of dependencies inside the |
In the meantime, how can I avoid this issue? Any workaround ? How to manage package dependencies without |
I managed to see what was happening. I am going to submit a patch asap to be included in 1.43.1 which will also be released asap |
The issue is already solved by this PR: #10183 Thank you @julienalofs for reporting this bug. It will be released asap in the next Conan 1.43.1 patch version. |
Great work guys ! @franramirez688 @memsharded |
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
$ conan new mylib/0.1 --template=cmake_lib
then edit conanfile.py to use CMakeDeps generator and requires "poco/1.9.4"
When calling
$ conan create . demo/testing -pr:b=default
sometimes everything is ok, sometimes I get this error:
ERROR: Error in generator 'CMakeDeps': Component 'poco::poco_crypto' not found in 'poco' package requirement
If I call again
$ conan create . demo/testing -pr:b=default
after the error, same result: sometimes ok, sometimes not.Logs (Executed commands with output) (Include/Attach if Applicable)
No Error log
PS C:\Users\ja\test> conan create . ja/testing -pr:b=default
Exporting package recipe
mylib/0.1@ja/testing exports_sources: Copied 1 '.txt' file: CMakeLists.txt
mylib/0.1@ja/testing exports_sources: Copied 1 '.cpp' file: mylib.cpp
mylib/0.1@ja/testing exports_sources: Copied 1 '.h' file: mylib.h
mylib/0.1@ja/testing: The stored package has not changed
mylib/0.1@ja/testing: Exported revision: 0856a0b1f6a2b34d21a0f1cb27091c8b
Configuration (profile_host):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.cppstd=14
compiler.runtime=MD
compiler.version=16
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
Configuration (profile_build):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.cppstd=14
compiler.runtime=MD
compiler.version=16
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
mylib/0.1@ja/testing: Forced build from source
mylib/0.1@ja/testing (test package): Installing package
Requirements
bzip2/1.0.8 from 'conancenter' - Cache
expat/2.4.1 from 'conancenter' - Cache
mylib/0.1@ja/testing from local cache - Cache
openssl/1.1.1l from 'conancenter' - Cache
pcre/8.45 from 'conancenter' - Cache
poco/1.9.4 from 'conancenter' - Cache
sqlite3/3.36.0 from 'conancenter' - Cache
zlib/1.2.11 from 'conancenter' - Cache
Packages
bzip2/1.0.8:d16a91eadaaf5829b928b12d2f836ff7680d3df5 - Cache
expat/2.4.1:ce5788ba7e3bb7dc834e36b06df66c481f42c99a - Cache
mylib/0.1@ja/testing:4f96d5e60086be3b241f3740593e45556da2a223 - Build
openssl/1.1.1l:3fb49604f9c2f729b85ba3115852006824e72cab - Cache
pcre/8.45:e87a8a0d1a34c63e57cfcfa8aa6088b17582df41 - Cache
poco/1.9.4:827d0093fffd24b2cf1576c6515a7f7707d5d2b9 - Cache
sqlite3/3.36.0:050fb3a4d3559ab088bce91739e61889c28839d1 - Cache
zlib/1.2.11:3fb49604f9c2f729b85ba3115852006824e72cab - Cache
Installing (downloading, building) binaries...
bzip2/1.0.8: Already installed!
bzip2/1.0.8: Appending PATH environment variable: C:\Users\ja.conan\data\bzip2\1.0.8__\package\d16a91eadaaf5829b928b12d2f836ff7680d3df5\bin
expat/2.4.1: Already installed!
openssl/1.1.1l: Already installed!
sqlite3/3.36.0: Already installed!
sqlite3/3.36.0: Appending PATH env var with : C:\Users\ja.conan\data\sqlite3\3.36.0__\package\050fb3a4d3559ab088bce91739e61889c28839d1\bin
zlib/1.2.11: Already installed!
pcre/8.45: Already installed!
pcre/8.45: Appending PATH environment variable: C:\Users\ja.conan\data\pcre\8.45__\package\e87a8a0d1a34c63e57cfcfa8aa6088b17582df41\bin
poco/1.9.4: Already installed!
mylib/0.1@ja/testing: Copying sources to build folder
mylib/0.1@ja/testing: Building your package in C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223
mylib/0.1@ja/testing: Generator 'CMakeToolchain' calling 'generate()'
mylib/0.1@ja/testing: Generator 'CMakeDeps' calling 'generate()'
mylib/0.1@ja/testing: Aggregating env generators
mylib/0.1@ja/testing: Calling build()
mylib/0.1@ja/testing: CMake command: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/build/conan/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/ja/.conan/data/mylib/0.1/ja/testing/package/4f96d5e60086be3b241f3740593e45556da2a223" "C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223."
Using Conan toolchain: C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/build/conan/conan_toolchain.cmake.
-- Conan toolchain: C++ Standard 14 with extensions OFF}
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The CXX compiler identification is MSVC 19.29.30137.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/build
mylib/0.1@ja/testing: CMake command: cmake --build C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223\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 C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/CMak
eLists.txt
mylib.cpp
mylib.vcxproj -> C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223\build\Re
lease\mylib.lib
Building Custom Rule C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/CMak
eLists.txt
mylib/0.1@ja/testing: Package '4f96d5e60086be3b241f3740593e45556da2a223' built
mylib/0.1@ja/testing: Build folder C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223\build
mylib/0.1@ja/testing: Generated conaninfo.txt
mylib/0.1@ja/testing: Generated conanbuildinfo.txt
mylib/0.1@ja/testing: Generating the package
mylib/0.1@ja/testing: Package folder C:\Users\ja.conan\data\mylib\0.1\ja\testing\package\4f96d5e60086be3b241f3740593e45556da2a223
mylib/0.1@ja/testing: Calling package()
mylib/0.1@ja/testing: CMake command: cmake --install C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223\build --config Release --prefix C:/Users/ja/.conan/data/mylib/0.1/ja/testing/package/4f96d5e60086be3b241f3740593e45556da2a223
-- Installing: C:/Users/ja/.conan/data/mylib/0.1/ja/testing/package/4f96d5e60086be3b241f3740593e45556da2a223/lib/mylib.lib
-- Installing: C:/Users/ja/.conan/data/mylib/0.1/ja/testing/package/4f96d5e60086be3b241f3740593e45556da2a223/include/mylib.h
mylib/0.1@ja/testing package(): Packaged 1 '.h' file: mylib.h
mylib/0.1@ja/testing package(): Packaged 1 '.lib' file: mylib.lib
mylib/0.1@ja/testing: Package '4f96d5e60086be3b241f3740593e45556da2a223' created
mylib/0.1@ja/testing: Created package revision dca8a6b85c35a49f51b2d6c91f1accfd
mylib/0.1@ja/testing (test package): Generator 'CMakeDeps' calling 'generate()'
mylib/0.1@ja/testing (test package): Generator 'CMakeToolchain' calling 'generate()'
mylib/0.1@ja/testing (test package): Generator 'VirtualBuildEnv' calling 'generate()'
mylib/0.1@ja/testing (test package): Generator txt created conanbuildinfo.txt
mylib/0.1@ja/testing (test package): Generator 'VirtualRunEnv' calling 'generate()'
mylib/0.1@ja/testing (test package): Aggregating env generators
mylib/0.1@ja/testing (test package): Generated conaninfo.txt
mylib/0.1@ja/testing (test package): Generated graphinfo
Using lockfile: 'C:\Users\ja\test\test_package/conan.lock'
Using cached profile from lockfile
mylib/0.1@ja/testing (test package): Calling build()
mylib/0.1@ja/testing (test package): CMake command: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/Users/ja/test/test_package/build/conan/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/ja/test/test_package" "C:\Users\ja\test\test_package."
Using Conan toolchain: C:/Users/ja/test/test_package/build/conan/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.
-- Conan: Target declared 'mylib::mylib'
-- Conan: Component target declared 'Foundation'
-- Conan: Component target declared 'JSON'
-- Conan: Component target declared 'Net'
-- Conan: Component target declared 'Redis'
-- Conan: Component target declared 'XML'
-- Conan: Component target declared 'Crypto'
-- Conan: Component target declared 'Data'
-- Conan: Component target declared 'DataSQLite'
-- Conan: Component target declared 'Encodings'
-- Conan: Component target declared 'MongoDB'
-- Conan: Component target declared 'Util'
-- Conan: Component target declared 'Zip'
-- Conan: Component target declared 'NetSSL'
-- Conan: Target declared 'Poco'
-- Conan: Component target declared 'SQLite3'
-- Conan: Target declared 'SQLite'
-- Conan: Including build module from 'C:/Users/ja/.conan/data/sqlite3/3.36.0///package/050fb3a4d3559ab088bce91739e61889c28839d1/lib/cmake/conan-official-sqlite3-variables.cmake'
-- Conan: Component target declared 'openssl::crypto'
-- Conan: Component target declared 'openssl::ssl'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Including build module from 'C:/Users/ja/.conan/data/openssl/1.1.1l///package/3fb49604f9c2f729b85ba3115852006824e72cab/lib/cmake/conan-official-openssl-variables.cmake'
-- Conan: Target declared 'expat::expat'
-- Conan: Component target declared 'pcre::libpcre'
-- Conan: Component target declared 'pcre::libpcreposix'
-- Conan: Component target declared 'pcre::libpcre16'
-- Conan: Component target declared 'pcre::libpcre32'
-- Conan: Target declared 'pcre::pcre'
-- Conan: Target declared 'bzip2::bzip2'
-- Conan: Including build module from 'C:/Users/ja/.conan/data/bzip2/1.0.8///package/d16a91eadaaf5829b928b12d2f836ff7680d3df5/lib/cmake/conan-official-bzip2-variables.cmake'
-- Conan: Target declared 'zlib::zlib'
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/ja/test/test_package/build
mylib/0.1@ja/testing (test package): CMake command: cmake --build C:\Users\ja\test\test_package\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 C:/Users/ja/test/test_package/CMakeLists.txt
Creating library C:/Users/ja/test/test_package/build/Release/example.lib and object C:/Users/ja/test/test_package/
build/Release/example.exp
example.vcxproj -> C:\Users\ja\test\test_package\build\Release\example.exe
Building Custom Rule C:/Users/ja/test/test_package/CMakeLists.txt
mylib/0.1@ja/testing (test package): Running test()
Capturing current environment in deactivate_conanrunenv-release-x86_64.bat
Configuring environment variables
mylib/0.1: Hello World Release!
mylib/0.1: _M_X64 defined
mylib/0.1: _MSC_VER1929
mylib/0.1: _MSVC_LANG201402
mylib/0.1: __cplusplus199711
Error log
PS C:\Users\ja\test> conan create . ja/testing -pr:b=default
Exporting package recipe
mylib/0.1@ja/testing exports_sources: Copied 1 '.txt' file: CMakeLists.txt
mylib/0.1@ja/testing exports_sources: Copied 1 '.cpp' file: mylib.cpp
mylib/0.1@ja/testing exports_sources: Copied 1 '.h' file: mylib.h
mylib/0.1@ja/testing: The stored package has not changed
mylib/0.1@ja/testing: Exported revision: 0856a0b1f6a2b34d21a0f1cb27091c8b
Configuration (profile_host):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.cppstd=14
compiler.runtime=MD
compiler.version=16
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
Configuration (profile_build):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.cppstd=14
compiler.runtime=MD
compiler.version=16
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
mylib/0.1@ja/testing: Forced build from source
mylib/0.1@ja/testing (test package): Installing package
Requirements
bzip2/1.0.8 from 'conancenter' - Cache
expat/2.4.1 from 'conancenter' - Cache
mylib/0.1@ja/testing from local cache - Cache
openssl/1.1.1l from 'conancenter' - Cache
pcre/8.45 from 'conancenter' - Cache
poco/1.9.4 from 'conancenter' - Cache
sqlite3/3.36.0 from 'conancenter' - Cache
zlib/1.2.11 from 'conancenter' - Cache
Packages
bzip2/1.0.8:d16a91eadaaf5829b928b12d2f836ff7680d3df5 - Cache
expat/2.4.1:ce5788ba7e3bb7dc834e36b06df66c481f42c99a - Cache
mylib/0.1@ja/testing:4f96d5e60086be3b241f3740593e45556da2a223 - Build
openssl/1.1.1l:3fb49604f9c2f729b85ba3115852006824e72cab - Cache
pcre/8.45:e87a8a0d1a34c63e57cfcfa8aa6088b17582df41 - Cache
poco/1.9.4:827d0093fffd24b2cf1576c6515a7f7707d5d2b9 - Cache
sqlite3/3.36.0:050fb3a4d3559ab088bce91739e61889c28839d1 - Cache
zlib/1.2.11:3fb49604f9c2f729b85ba3115852006824e72cab - Cache
Installing (downloading, building) binaries...
bzip2/1.0.8: Already installed!
bzip2/1.0.8: Appending PATH environment variable: C:\Users\ja.conan\data\bzip2\1.0.8__\package\d16a91eadaaf5829b928b12d2f836ff7680d3df5\bin
expat/2.4.1: Already installed!
openssl/1.1.1l: Already installed!
sqlite3/3.36.0: Already installed!
sqlite3/3.36.0: Appending PATH env var with : C:\Users\ja.conan\data\sqlite3\3.36.0__\package\050fb3a4d3559ab088bce91739e61889c28839d1\bin
zlib/1.2.11: Already installed!
pcre/8.45: Already installed!
pcre/8.45: Appending PATH environment variable: C:\Users\ja.conan\data\pcre\8.45__\package\e87a8a0d1a34c63e57cfcfa8aa6088b17582df41\bin
poco/1.9.4: Already installed!
mylib/0.1@ja/testing: Copying sources to build folder
mylib/0.1@ja/testing: Building your package in C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223
mylib/0.1@ja/testing: Generator 'CMakeDeps' calling 'generate()'
mylib/0.1@ja/testing: Generator 'CMakeToolchain' calling 'generate()'
mylib/0.1@ja/testing: Aggregating env generators
mylib/0.1@ja/testing: Calling build()
mylib/0.1@ja/testing: CMake command: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/build/conan/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/ja/.conan/data/mylib/0.1/ja/testing/package/4f96d5e60086be3b241f3740593e45556da2a223" "C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223."
Using Conan toolchain: C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/build/conan/conan_toolchain.cmake.
-- Conan toolchain: C++ Standard 14 with extensions OFF}
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The CXX compiler identification is MSVC 19.29.30137.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/build
mylib/0.1@ja/testing: CMake command: cmake --build C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223\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 C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/CMak
eLists.txt
mylib.cpp
mylib.vcxproj -> C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223\build\Re
lease\mylib.lib
Building Custom Rule C:/Users/ja/.conan/data/mylib/0.1/ja/testing/build/4f96d5e60086be3b241f3740593e45556da2a223/CMak
eLists.txt
mylib/0.1@ja/testing: Package '4f96d5e60086be3b241f3740593e45556da2a223' built
mylib/0.1@ja/testing: Build folder C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223\build
mylib/0.1@ja/testing: Generated conaninfo.txt
mylib/0.1@ja/testing: Generated conanbuildinfo.txt
mylib/0.1@ja/testing: Generating the package
mylib/0.1@ja/testing: Package folder C:\Users\ja.conan\data\mylib\0.1\ja\testing\package\4f96d5e60086be3b241f3740593e45556da2a223
mylib/0.1@ja/testing: Calling package()
mylib/0.1@ja/testing: CMake command: cmake --install C:\Users\ja.conan\data\mylib\0.1\ja\testing\build\4f96d5e60086be3b241f3740593e45556da2a223\build --config Release --prefix C:/Users/ja/.conan/data/mylib/0.1/ja/testing/package/4f96d5e60086be3b241f3740593e45556da2a223
-- Installing: C:/Users/ja/.conan/data/mylib/0.1/ja/testing/package/4f96d5e60086be3b241f3740593e45556da2a223/lib/mylib.lib
-- Installing: C:/Users/ja/.conan/data/mylib/0.1/ja/testing/package/4f96d5e60086be3b241f3740593e45556da2a223/include/mylib.h
mylib/0.1@ja/testing package(): Packaged 1 '.h' file: mylib.h
mylib/0.1@ja/testing package(): Packaged 1 '.lib' file: mylib.lib
mylib/0.1@ja/testing: Package '4f96d5e60086be3b241f3740593e45556da2a223' created
mylib/0.1@ja/testing: Created package revision 305dd0d8ef07f3ab0e15b370c1abbdf5
mylib/0.1@ja/testing (test package): Generator 'VirtualBuildEnv' calling 'generate()'
mylib/0.1@ja/testing (test package): Generator 'CMakeToolchain' calling 'generate()'
mylib/0.1@ja/testing (test package): Generator txt created conanbuildinfo.txt
mylib/0.1@ja/testing (test package): Generator 'VirtualRunEnv' calling 'generate()'
mylib/0.1@ja/testing (test package): Generator 'CMakeDeps' calling 'generate()'
ERROR: Error in generator 'CMakeDeps': Component 'poco::poco_crypto' not found in 'poco' package requirement
The text was updated successfully, but these errors were encountered: