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
mylib/0.1.0: Exporting package recipe: /home/myuser/work/mylib/conanfile.py
mylib/0.1.0: Copied 1 '.py' file: conanfile.py
mylib/0.1.0: Copied 1 '.hpp' file: mylib.hpp
mylib/0.1.0: Copied 1 '.txt' file: CMakeLists.txt
mylib/0.1.0: Copied 3 '.cpp' files: mylib.cpp, mytest.cpp, CMakeCXXCompilerId.cpp
mylib/0.1.0: Exported to cache folder: /home/myuser/.conan2/p/mylibb078cdb97f13f/e
mylib/0.1.0: Exported: mylib/0.1.0#52ea9a5a56d2c6b4fd3ebb4ac1536a93 (2023-02-22 18:16:40 UTC)
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu14
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
======== Computing dependency graph ========
Graph root
cli
Requirements
mylib/0.1.0#52ea9a5a56d2c6b4fd3ebb4ac1536a93 - Cache
openssl/1.1.1t#1e58dd56a2a930f23160558c572a62fd - Cache
Test requirements
gtest/cci.20210126#dafbdf84b58cd687075ace7314651c1a - Cache
Resolved version ranges
openssl/[^1.1]: openssl/1.1.1t
======== Computing necessary packages ========
Requirements
mylib/0.1.0#52ea9a5a56d2c6b4fd3ebb4ac1536a93:367bcdba5a3cecc102ce32b2e49cd853fe932213#2f790914b2705c52e1c1604ddfabe6b1 - Cache
openssl/1.1.1t#1e58dd56a2a930f23160558c572a62fd:519af2652d4d356cb8131159d7bac54ecb13b249#d08412695909834b6571fd41487ad71b - Cache
Test requirements
gtest/cci.20210126#dafbdf84b58cd687075ace7314651c1a:d2f1054acdd89023cf363b7e5f2c6098b9878cb9#e64da3cf5102c1ee73e4f91d4eb19531 - Skip
======== Installing packages ========
openssl/1.1.1t: Already installed!
WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
WARN: The use of 'cpp_info.build_modules' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
WARN: The use of 'cpp_info.build_modules' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
-------- Building package mylib/0.1.0 from source (3 of 3) --------
mylib/0.1.0: Package mylib/0.1.0:367bcdba5a3cecc102ce32b2e49cd853fe932213
mylib/0.1.0: Copying sources to build folder
mylib/0.1.0: Building your package in /home/myuser/.conan2/p/t/mylib312bd0a54335f/b
mylib/0.1.0: Writing generators to /home/myuser/.conan2/p/t/mylib312bd0a54335f/b/build/Release/generators
mylib/0.1.0: Generator 'CMakeToolchain' calling 'generate()'
mylib/0.1.0: CMakeToolchain generated: conan_toolchain.cmake
mylib/0.1.0: CMakeToolchain generated: CMakePresets.json
mylib/0.1.0: CMakeToolchain generated: ../../../CMakeUserPresets.json
mylib/0.1.0: Generating aggregated env files
mylib/0.1.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
mylib/0.1.0: Calling build()
mylib/0.1.0: Running CMake.configure()
mylib/0.1.0: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/myuser/.conan2/p/t/mylib312bd0a54335f/b/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/myuser/.conan2/p/t/mylib312bd0a54335f/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/myuser/.conan2/p/t/mylib312bd0a54335f/b/."
-- Using Conan toolchain: /home/myuser/.conan2/p/t/mylib312bd0a54335f/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 14 with extensions ON
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_POLICY_DEFAULT_CMP0091
-- Build files have been written to: /home/myuser/.conan2/p/t/mylib312bd0a54335f/b/build/Release
mylib/0.1.0: Running CMake.build()
mylib/0.1.0: RUN: cmake --build "/home/myuser/.conan2/p/t/mylib312bd0a54335f/b/build/Release" -- -j8
[ 25%] Building CXX object CMakeFiles/mylib.dir/mylib.cpp.o
[ 50%] Linking CXX static library libmylib.a
[ 50%] Built target mylib
[ 75%] Building CXX object CMakeFiles/mytest.dir/mytest.cpp.o
[100%] Linking CXX executable mytest
[100%] Built target mytest
mylib/0.1.0: Package '367bcdba5a3cecc102ce32b2e49cd853fe932213' built
mylib/0.1.0: Build folder /home/myuser/.conan2/p/t/mylib312bd0a54335f/b/build/Release
mylib/0.1.0: Generating the package
mylib/0.1.0: Temporary package folder /home/myuser/.conan2/p/t/mylib312bd0a54335f/p
mylib/0.1.0: Calling package()
mylib/0.1.0: Running CMake.install()
mylib/0.1.0: RUN: cmake --install "/home/myuser/.conan2/p/t/mylib312bd0a54335f/b/build/Release" --prefix "/home/myuser/.conan2/p/t/mylib312bd0a54335f/p"
-- Install configuration: "Release"
-- Installing: /home/myuser/.conan2/p/t/mylib312bd0a54335f/p/lib/libmylib.a
-- Installing: /home/myuser/.conan2/p/t/mylib312bd0a54335f/p/include/mylib.hpp
mylib/0.1.0: package(): Packaged 1 '.a' file: libmylib.a
mylib/0.1.0: package(): Packaged 1 '.hpp' file: mylib.hpp
mylib/0.1.0: Created package revision 2f790914b2705c52e1c1604ddfabe6b1
mylib/0.1.0: Package '367bcdba5a3cecc102ce32b2e49cd853fe932213' created
mylib/0.1.0: Full package reference: mylib/0.1.0#f644e595be7310991f88d4656f5c4882:367bcdba5a3cecc102ce32b2e49cd853fe932213#2f790914b2705c52e1c1604ddfabe6b1
mylib/0.1.0: Package folder /home/myuser/.conan2/p/mylibada0622bd35f8/p
ERROR: mylib/0.1.0: Required package 'gtest' not in component 'requires'
The text was updated successfully, but these errors were encountered:
Thanks very much for reporting, and thanks very much for the detailed reproduction, it really helped!
You are right, there is a bug in the checking of requirements when using components, and test_requires was not being filtered from that. I have already submitted a fix in #13191, we will release it in next patch release 2.0.1. Thanks!
Environment details
Steps to reproduce
Here is a complete Conan + CMake project that reproduces the issue.
conanfile.py
CMakeLists.txt
mylib.hpp
mylib.cpp
mytest.cpp
Then run
conan create . --build=missing
Logs
The text was updated successfully, but these errors were encountered: