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
I am migrating from Conan 1 to Conan 2, and trying to improve package management based on the Devops guides in the Conan 2 documentation. The goal is to manage building a small set of 3rd party packages using a custom set of profiles, emulating conancenter. I am running into an issue with build requirements causing installation to fail. Any advice is appreciated.
I have CI process(es) that use a copy of conan-center-index as an offline remote and, given a set of custom profiles, generate locks, build packages, promote from online test to release remotes, etc. To upload packages built using the conan-center-index recipes to an online remote, I iterate the requires section of the lockfile, and upload only the requirements. The goal is to build and archive every 3rd party package/dependency for every profile, so that any consumer will be able to pull prebuilt binaries. In the case where new profiles or package versions are needed, changes are made to the CI system, kicking off automated package creation/publishing so that developers never need to locally build 3rd party packages.
As an example, when I use this system to build libtiff/dependencies, archive the packages, then install a simple conanfile using the CI remote:
from conan import ConanFile
class Example(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps"
def requirements(self):
self.requires('libtiff/4.7.0')
The install fails with ERROR: Package 'cmake/[>=3.18 <4]' not resolved: Version range '>=3.18 <4' from requirement 'cmake/[>=3.18 <4]' required by 'libtiff/4.7.0' could not be resolved. The CMake dependency is part of the build_requirements(self) method in the conan-center-index recipe. I was under the impression it would not be necessary to satisfy the build requirements if the required packages were already built (and those build requirements were not present in the lockfile). I did not run into this in the various workflows in the CI project, because generally the offline remote and online remote are enabled at the same time to try and reduce extraneous rebuilds, etc. I see in the CI logs that even when all packages exist in the remote and are downloaded, the CMake dependency is still resolved and comes from the offline conan-center-index remote.
Is there an option to or pattern used to install packages and skip dealing with build requirements when the build will not need to occur (because the entire graph of requirements is downloaded)? If not, is the path forward here just to upload all build products, not just the requires group from the lockfile?
Thanks for the help!
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
What is your question?
Hello,
I am migrating from Conan 1 to Conan 2, and trying to improve package management based on the Devops guides in the Conan 2 documentation. The goal is to manage building a small set of 3rd party packages using a custom set of profiles, emulating conancenter. I am running into an issue with build requirements causing installation to fail. Any advice is appreciated.
I have CI process(es) that use a copy of
conan-center-index
as an offline remote and, given a set of custom profiles, generate locks, build packages, promote from online test to release remotes, etc. To upload packages built using theconan-center-index
recipes to an online remote, I iterate therequires
section of the lockfile, and upload only the requirements. The goal is to build and archive every 3rd party package/dependency for every profile, so that any consumer will be able to pull prebuilt binaries. In the case where new profiles or package versions are needed, changes are made to the CI system, kicking off automated package creation/publishing so that developers never need to locally build 3rd party packages.As an example, when I use this system to build libtiff/dependencies, archive the packages, then install a simple conanfile using the CI remote:
The install fails with
ERROR: Package 'cmake/[>=3.18 <4]' not resolved: Version range '>=3.18 <4' from requirement 'cmake/[>=3.18 <4]' required by 'libtiff/4.7.0' could not be resolved.
The CMake dependency is part of thebuild_requirements(self)
method in the conan-center-index recipe. I was under the impression it would not be necessary to satisfy the build requirements if the required packages were already built (and those build requirements were not present in the lockfile). I did not run into this in the various workflows in the CI project, because generally the offline remote and online remote are enabled at the same time to try and reduce extraneous rebuilds, etc. I see in the CI logs that even when all packages exist in the remote and are downloaded, the CMake dependency is still resolved and comes from the offline conan-center-index remote.Is there an option to or pattern used to install packages and skip dealing with build requirements when the build will not need to occur (because the entire graph of requirements is downloaded)? If not, is the path forward here just to upload all build products, not just the
requires
group from the lockfile?Thanks for the help!
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: