Closed pwqbot closed 2 months ago
Hi @pwqbot
Thanks for your question.
Library 'cpp_common' not found in package. If 'cpp_common' is a system library, declare it with 'cpp_info.system_libs' property
Please note the difference in the profiles.
In the cmake-conan
case, it is a Debug
profile.
In the conan install .
case it is a Release
profile.
Have you built your cpp_common
package in editable
mode both for Debug and Release?
Can you try to use the cmake-conan
first approach, but make sure it is a release build with -DCMAKE_BUILD_TYPE=Release
?
Hi @pwqbot
Thanks for your question.
Library 'cpp_common' not found in package. If 'cpp_common' is a system library, declare it with 'cpp_info.system_libs' property
Please note the difference in the profiles. In the
cmake-conan
case, it is aDebug
profile.In the
conan install .
case it is aRelease
profile.Have you built your
cpp_common
package ineditable
mode both for Debug and Release? Can you try to use thecmake-conan
first approach, but make sure it is a release build with-DCMAKE_BUILD_TYPE=Release
?
sure
(base) wd@memblade3:~/dev/exec/cpp_trading/build$ cmake .. -DCMAKE_BUILD_TYPE=Release
-- CMake-Conan: first find_package() found. Installing dependencies with Conan
-- CMake-Conan: Checking if a default profile exists
/home/wd/.conan2/profiles/default
-- CMake-Conan: cmake_system_name=Linux
-- CMake-Conan: cmake_system_processor=x86_64
-- CMake-Conan: CMake compiler=GNU
-- CMake-Conan: CMake compiler version=13.1.0
-- CMake-Conan: [settings] compiler=gcc
-- CMake-Conan: [settings] compiler.version=13
-- CMake-Conan: Creating profile /home/wd/dev/exec/cpp_trading/build/conan_host_profile
-- CMake-Conan: Profile:
[settings]
arch=x86_64
os=Linux
compiler=gcc
compiler.version=13
compiler.cppstd=23
compiler.libcxx=libstdc++11
build_type=Release
[conf]
tools.cmake.cmaketoolchain:generator=Unix Makefiles
tools.build:compiler_executables={"c":"/usr/bin/cc","cpp":"/usr/bin/c++"}
-- CMake-Conan: Installing single configuration Release
-- CMake-Conan: conan install /home/wd/dev/exec/cpp_trading -of=/home/wd/dev/exec/cpp_trading/build/conan --profile:host=default;--profile:host=/home/wd/dev/exec/cpp_trading/build/conan_host_profile;--profile:build
=default;--build=missing
Using lockfile: '/home/wd/dev/exec/cpp_trading/conan.lock'
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=23
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
[conf]
tools.build:compiler_executables={'c': '/usr/bin/cc', 'cpp': '/usr/bin/c++'}
tools.cmake.cmaketoolchain:generator=Unix Makefiles
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=23
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
======== Computing dependency graph ========
Graph root
conanfile.py (cpp_trading/0.0.0): /home/wd/dev/exec/cpp_trading/conanfile.py
Requirements
argparse/2.9#672db1e97573ed9df006df4cfcd6e049 - Cache
benchmark/1.8.0#ff63873550d1cb2efc64b2785837c23a - Cache
boost/1.84.0#6815195f2bf512487e7beb7e43ca31b6 - Cache
bzip2/1.0.8#53ab4d34e2f090271db541742bd55ef3 - Cache
concurrentqueue/1.0.4#957c470e9abc81ff3850bbe39fc11135 - Cache
cpp_common/2024.05.15.0#46d6a0ceff87338d563f67c2e986906d - Cache
cppzmq/4.10.0#aee45fb6fdd2acc468ee5f981647a044 - Cache
fmt/10.0.0#4ec309e7e34f41ee6915d7a60d14fc08 - Cache
glaze/2.1.6#d5ee57aa90faad7274bea02c00c0bf25 - Cache
gmp/6.2.1#fff31df55be0980543fbd8d79f71b7dc - Cache
gtest/1.13.0#a110ad735ec3df8d21666bcbc06161ed - Cache
hdf5/1.14.1#d0c0d660cce55080ce71654a35e90e3d - Cache
highfive/2.7.1#b6e6157b125243311c93c532b1c109f7 - Cache
libbacktrace/cci.20210118#f5d18dee9942ec36058b965afa867e7b - Cache
libcurl/8.1.2#95191896f5db14765b35c00d96e8ac90 - Cache
libsodium/1.0.19#67aa05762dcfb3aca47b824f52693c87 - Cache
magic_enum/0.9.3#4e83997cc627fc6e260374bdbbb6f5bc - Cache
msgpack-cxx/6.1.0#70fd82b37475fcda2e69db13f9c8ff80 - Cache
nanobench/4.3.9#7f6b12aefd34c9d91a503256b61714fe - Cache
openssl/3.1.1#f3ddaee67faeecb40e31fa074ac27de5 - Cache
parallel-hashmap/1.3.11#08b0dfed82b90ff06f3fa945ce95c3fe - Cache
range-v3/0.12.0#c40ffa5a82269b873053f008d8511138 - Cache
spdlog/1.12.0#7558859e394f9340d550ee75e9c55f5c - Cache
tracy/0.9.1#92290b52b4ccd5bc3fa3241e1bf60fca - Cache
yaml-cpp/0.8.0#806d7907dc54b7a08e2b684c46636af9 - Cache
zeromq/4.3.4#02a6f36567e7d32db8daa1b341a3652f - Cache
zlib/1.3.1#e20364c96c45455608a72543f3a53133 - Cache
Build requirements
autoconf/2.71#5312af4e8a3f82a7f6454866081de83f - Cache
automake/1.16.5#27a1996f8e84efd37c1bdacd9c8a5d7b - Cache
b2/4.10.1#6160f88d57a1e7a84bc7be7b91e5352a - Cache
cmake/3.27.7#871b7731accc7c1d8af9b63082288218 - Cache
gnu-config/cci.20210814#1e05eeb4222461c1438295c21dd38dce - Cache
libtool/2.4.7#45550c309dbf3f03a44ff239e3c58f59 - Cache
m4/1.4.19#a3288d219f4225c6264a3d5a1dbd5f7d - Cache
meson/1.2.2#5d9c6c6fe65429648f6aaaa85e8ce47d - Cache
ninja/1.11.1#de85db1490cc53d3353a536dadf1db50 - Cache
pkgconf/2.0.2#753885c4722f3d1cf4cb22924ab63881 - Cache
Overrides
fmt/10.1.1: ['fmt/[10.0.0]']
boost/1.83.0: ['boost/1.84.0']
======== Computing necessary packages ========
Requirements
argparse/2.9#672db1e97573ed9df006df4cfcd6e049:da39a3ee5e6b4b0d3255bfef95601890afd80709#3ef19f92dd398e1f1819cd835129dbc2 - Cache
boost/1.84.0#6815195f2bf512487e7beb7e43ca31b6:fc270a01a4ded03fb995840820c7faf23c4f7f78#67ff15f0cfb3105c4453302ed4c281be - Cache
bzip2/1.0.8#53ab4d34e2f090271db541742bd55ef3:432d7695adc526147073285e155d2ca0340bc76d#e1cd97294bff1b642615e850f063ea43 - Cache
concurrentqueue/1.0.4#957c470e9abc81ff3850bbe39fc11135:da39a3ee5e6b4b0d3255bfef95601890afd80709#d76553f653b5b8bdf7b424d83820fea4 - Cache
cpp_common/2024.05.15.0#46d6a0ceff87338d563f67c2e986906d:be476cb3f3359fd807600fde22a72bc4c0a9a629#ada2897a2c9a220e5c304b8fc453b886 - Download (contek)
cppzmq/4.10.0#aee45fb6fdd2acc468ee5f981647a044:da39a3ee5e6b4b0d3255bfef95601890afd80709#4bf82176431196e152926c902565a1b4 - Cache
fmt/10.0.0#4ec309e7e34f41ee6915d7a60d14fc08:4b957bd87f4125c0fe7b94a15a733b7255d3d084#c782d7130dfdf64f4540d4673e19e9e2 - Cache
glaze/2.1.6#d5ee57aa90faad7274bea02c00c0bf25:da39a3ee5e6b4b0d3255bfef95601890afd80709#acd9d14cd6da1edb37f7b90dad06577b - Cache
gmp/6.2.1#fff31df55be0980543fbd8d79f71b7dc:2528b0eae0c47f287036a4f28706c28883915f04#22c65638c82e8065f2680501be24c657 - Download (contek)
gtest/1.13.0#a110ad735ec3df8d21666bcbc06161ed:f575dce8ea239b77e26d5bbadf382b0058126487#79e0d6a04933fb891990cf21fd3eb7c7 - Cache
hdf5/1.14.1#d0c0d660cce55080ce71654a35e90e3d:84b680d4520a396fc64cdd67e90f0244743e3a58#98a97675fbb0b83207a8794c283e51d7 - Cache
highfive/2.7.1#b6e6157b125243311c93c532b1c109f7:da39a3ee5e6b4b0d3255bfef95601890afd80709#14d1dcd3361ddce75d6395c02290e0f0 - Cache
libbacktrace/cci.20210118#f5d18dee9942ec36058b965afa867e7b:c81087b06d1a5beef0ad711fc32d45f7a425a8f3#164329a8f38e5bdb71f80f95a337b799 - Cache
libcurl/8.1.2#95191896f5db14765b35c00d96e8ac90:3ca4a516e308ef4108d06f2ea5f1fa96ea20c2ef#1ad601b06346fe64df7fecd00e5ed72f - Cache
libsodium/1.0.19#67aa05762dcfb3aca47b824f52693c87:bcfae6fb9224c94d23dba638948d07f79afbda69#082527c672a818ce50c6c62962c7964d - Cache
magic_enum/0.9.3#4e83997cc627fc6e260374bdbbb6f5bc:da39a3ee5e6b4b0d3255bfef95601890afd80709#78bd9152e3c1d22c9ffa51e2a37f9ff2 - Cache
msgpack-cxx/6.1.0#70fd82b37475fcda2e69db13f9c8ff80:da39a3ee5e6b4b0d3255bfef95601890afd80709#521d2af1829c445fd0ba130606258b14 - Cache
openssl/3.1.1#f3ddaee67faeecb40e31fa074ac27de5:8ae950068e9956b826b6b316832987eeb214c307#dd39472e68129717bcf3f248ea61bb98 - Cache
parallel-hashmap/1.3.11#08b0dfed82b90ff06f3fa945ce95c3fe:da39a3ee5e6b4b0d3255bfef95601890afd80709#51a47096fb0132203bb5419b58651174 - Cache
range-v3/0.12.0#c40ffa5a82269b873053f008d8511138:da39a3ee5e6b4b0d3255bfef95601890afd80709#ecc6172c3cd6694c36d1cd98a702deb0 - Cache
spdlog/1.12.0#7558859e394f9340d550ee75e9c55f5c:16142344f948461a04bae8665f024daed1c7c888#422d1201701c7477cff6d74f2c7cdf16 - Cache
tracy/0.9.1#92290b52b4ccd5bc3fa3241e1bf60fca:aca815adc560a44ce513e247be698bdf4a634113#499e30f798f8a80e0d1870233f13352d - Cache
yaml-cpp/0.8.0#806d7907dc54b7a08e2b684c46636af9:4b45763d7e991e78ae4e5ddc6855437d163e666a#528576f9b8f0d7621a29c30fed44838b - Cache
zeromq/4.3.4#02a6f36567e7d32db8daa1b341a3652f:0e81ec7215c2fda65d4723e16278f3e4c3ace036#55d66de5ea5b9daa48a3e6f5fd17018a - Cache
zlib/1.3.1#e20364c96c45455608a72543f3a53133:c81087b06d1a5beef0ad711fc32d45f7a425a8f3#dc0d0136beab0bbfd09e29f71a7a146b - Cache
Build requirements
Skipped binaries
benchmark/1.8.0, nanobench/4.3.9, autoconf/2.71, automake/1.16.5, b2/4.10.1, cmake/3.27.7, gnu-config/cci.20210814, libtool/2.4.7, m4/1.4.19, meson/1.2.2, ninja/1.11.1, pkgconf/2.0.2
======== Installing packages ========
-------- Downloading 2 packages --------
gmp/6.2.1: Retrieving package 2528b0eae0c47f287036a4f28706c28883915f04 from remote 'contek'
gmp/6.2.1: Package installed 2528b0eae0c47f287036a4f28706c28883915f04
gmp/6.2.1: Downloaded package revision 22c65638c82e8065f2680501be24c657
cpp_common/2024.05.15.0: Retrieving package be476cb3f3359fd807600fde22a72bc4c0a9a629 from remote 'contek'
cpp_common/2024.05.15.0: Package installed be476cb3f3359fd807600fde22a72bc4c0a9a629
cpp_common/2024.05.15.0: Downloaded package revision ada2897a2c9a220e5c304b8fc453b886
argparse/2.9: Already installed! (1 of 25)
bzip2/1.0.8: Already installed! (2 of 25)
concurrentqueue/1.0.4: Already installed! (3 of 25)
fmt/10.0.0: Already installed! (4 of 25)
glaze/2.1.6: Already installed! (5 of 25)
gtest/1.13.0: Already installed! (6 of 25)
libbacktrace/cci.20210118: Already installed! (7 of 25)
libsodium/1.0.19: Already installed! (8 of 25)
magic_enum/0.9.3: Already installed! (9 of 25)
parallel-hashmap/1.3.11: Already installed! (10 of 25)
range-v3/0.12.0: Already installed! (11 of 25)
tracy/0.9.1: Already installed! (12 of 25)
yaml-cpp/0.8.0: Already installed! (13 of 25)
zlib/1.3.1: Already installed! (14 of 25)
boost/1.84.0: Already installed! (16 of 25)
hdf5/1.14.1: Already installed! (17 of 25)
openssl/3.1.1: Already installed! (18 of 25)
spdlog/1.12.0: Already installed! (19 of 25)
zeromq/4.3.4: Already installed! (20 of 25)
cppzmq/4.10.0: Already installed! (21 of 25)
highfive/2.7.1: Already installed! (22 of 25)
msgpack-cxx/6.1.0: Already installed! (23 of 25)
libcurl/8.1.2: Already installed! (24 of 25)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.names' used in: spdlog/1.12.0, boost/1.84.0, zeromq/4.3.4, gmp/6.2.1, gtest/1.13.0, highfive/2.7.1, zlib/1.3.1, range-v3/0.12.0, msgpack-cxx/6.1.0, libcurl/8.1.2, fmt/10.0.0, hdf5/1.
14.1, openssl/3.1.1, tracy/0.9.1, cppzmq/4.10.0, bzip2/1.0.8, parallel-hashmap/1.3.11
WARN: deprecated: 'cpp_info.build_modules' used in: zeromq/4.3.4, yaml-cpp/0.8.0, highfive/2.7.1, msgpack-cxx/6.1.0, cppzmq/4.10.0, hdf5/1.14.1, parallel-hashmap/1.3.11, bzip2/1.0.8, openssl/3.1.1
WARN: deprecated: 'env_info' used in: boost/1.84.0, bzip2/1.0.8, openssl/3.1.1
WARN: deprecated: 'cpp_info.filenames' used in: boost/1.84.0, msgpack-cxx/6.1.0
WARN: deprecated: 'user_info' used in: boost/1.84.0
======== Finalizing install (deploy, generators) ========
conanfile.py (cpp_trading/0.0.0): Calling generate()
conanfile.py (cpp_trading/0.0.0): Generators folder: /home/wd/dev/exec/cpp_trading/build/conan/build/Release/generators
conanfile.py (cpp_trading/0.0.0): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
find_package(cpp_common)
find_package(gmp)
target_link_libraries(... cpp_common::cpp_common gmp::gmp)
conanfile.py (cpp_trading/0.0.0): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (cpp_trading/0.0.0): Preset 'conan-release' added to CMakePresets.json. Invoke it manually using 'cmake --preset conan-release' if using CMake>=3.23
conanfile.py (cpp_trading/0.0.0): If your CMake version is not compatible with CMakePresets (<3.23) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/home/wd/dev/exec/cpp_trading/build/cona
n/build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
conanfile.py (cpp_trading/0.0.0): CMakeToolchain generated: CMakePresets.json
conanfile.py (cpp_trading/0.0.0): CMakeToolchain generated: ../../../../../CMakeUserPresets.json
conanfile.py (cpp_trading/0.0.0): Generating aggregated env files
conanfile.py (cpp_trading/0.0.0): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
Install finished successfully
-- CMake-Conan: CONAN_GENERATORS_FOLDER=/home/wd/dev/exec/cpp_trading/build/conan/build/Release/generators
-- CMake-Conan: CONANFILE=/home/wd/dev/exec/cpp_trading/conanfile.py (cpp_trading/0.0.0)
-- Conan: Target declared 'cpp_common::cpp_common'
CMake Error at build/conan/build/Debug/generators/cmakedeps_macros.cmake:67 (message):
Library 'cpp_common' not found in package. If 'cpp_common' is a system
library, declare it with 'cpp_info.system_libs' property
Call Stack (most recent call first):
build/conan/build/Debug/generators/cpp_common-Target-debug.cmake:23 (conan_package_library_targets)
build/conan/build/Debug/generators/cpp_commonTargets.cmake:24 (include)
build/conan/build/Debug/generators/cpp_common-config.cmake:16 (include)
cmake/conan_provider.cmake:572 (find_package)
CMakeLists.txt:16 (find_package)
-- Configuring incomplete, errors occurred!
But that is doing something different. Please check the logs:
cpp_common/2024.05.15.0#46d6a0ceff87338d563f67c2e986906d - Cache (NOT EDITABLE)
And then
cpp_common/2024.05.15.0#46d6a0ceff87338d563f67c2e986906d:be476cb3f3359fd807600fde22a72bc4c0a9a629#ada2897a2c9a220e5c304b8fc453b886 - Download (contek) (NOT EDITABLE)
So it doesn't seem we are in the same case.
By the way, this is not correct:
cpp_common/2024.04.07.0 Path: /home/wd/dev/exec/cpp_common/conanfile.py cpp_common/2024.04.15.0 Path: /home/wd/dev/exec/cpp_common/conanfile.py
It is not possible to have 2 different versions of the same package in the same location. You need to do 2 different checkouts of the cpp_common
, in 2 different folders to be able to point 2 different versions of it as editable
.
But that is doing something different. Please check the logs:
cpp_common/2024.05.15.0#46d6a0ceff87338d563f67c2e986906d - Cache (NOT EDITABLE)
And then
cpp_common/2024.05.15.0#46d6a0ceff87338d563f67c2e986906d:be476cb3f3359fd807600fde22a72bc4c0a9a629#ada2897a2c9a220e5c304b8fc453b886 - Download (contek) (NOT EDITABLE)
So it doesn't seem we are in the same case.
By the way, this is not correct:
cpp_common/2024.04.07.0 Path: /home/wd/dev/exec/cpp_common/conanfile.py cpp_common/2024.04.15.0 Path: /home/wd/dev/exec/cpp_common/conanfile.py
It is not possible to have 2 different versions of the same package in the same location. You need to do 2 different checkouts of the
cpp_common
, in 2 different folders to be able to point 2 different versions of it aseditable
.
Thanks, I find the problems is my build dir is build/debug, after rename to build/Debug it works.
Thanks, I find the problems is my build dir is build/debug, after rename to build/Debug it works.
Sounds good, thanks for following up and the feedback. I am closing the ticket as solved then, don't hesitate to open new tickets for any further question.
cannot work with editable packages.
conan install works