conan: [bug] required component package ... not in dependencies
Describe the bug
Hi,
I’ve just upgraded from conan 2.3.0 to 2.9.2 and one of our modules started not building anymore.
[cmake] ERROR: power-mgmt/2.0.0: required component package 'magic_enum::' not in dependencies
the conanfile of this component looks something like this:
def requirements(self):
self.requires("magic_enum/0.9.3", transitive_headers=True)
def package_info(self):
self.cpp_info.set_property("cmake_find_mode", "both")
self.cpp_info.set_property("cmake_file_name", "power-mgmt")
# lib-power-mgmt
self.cpp_info.components["lib-power-mgmt"].set_property(
"cmake_target_name", "power-mgmt::lib-power-mgmt"
)
self.cpp_info.components["lib-power-mgmt"].libs = ["lib-power-mgmt"]
self.cpp_info.components["lib-power-mgmt"].requires = [
...
"magic_enum::magic_enum",
]
# proc-power-mgmt
self.cpp_info.components["proc-power-mgmt"].libs = []
self.cpp_info.components["proc-power-mgmt"].requires = [
...,
"magic_enum::magic_enum"
]
# power-mgmt-utility
self.cpp_info.components["power-mgmt-utility"].libs = []
self.cpp_info.components["power-mgmt-utility"].requires = [
...
"magic_enum::magic_enum",
]
I don’t see an obvious error here and from the error message I’m not sure what is the problem. Can you help out?
How to reproduce it
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (10 by maintainers)
Thanks very much for the details provided, with the last information I managed to understand what is happening and I am doing https://github.com/conan-io/conan/pull/17338 to try to fix it.
As this would be a regression, I am pointing it to a new 2.9.3 patch release to not have to wait until next 2.10.