Skip to content

[question] How to force on build requires of a dependency? #17474

@huysentr

Description

@huysentr

What is your question?

We have a habit of adding cmake to the profiles building the packages.
(there is some circular dependency issues that is fixed with the "!"

[settings]
os=Linux
arch=x86_64
compiler=gcc
compiler.version=12.1
[tool_requires]
!gcc/*: cmake/3.29.0@redacted
!cmake/*: gcc/12.1.0@redacted

Now a dependency python, has a dependency on zlib, this for some reason affects the build requirements. zlib has build_requires = " cmake/[>=3.22.0]"

this causes the following issue:


Graph root
    conanfile.py...
Requirements
...
    python/3.12.2@redacted
Build requirements
    cmake/3.29.0@redacted
    cmake/3.30.1#6d832cf2d46f6ec969ca5ed5b41f91eb - Cache
    zlib/1.2.13@redacted
Resolved version ranges
    cmake/[>=3.22.0]: cmake/3.30.1

And here the conan process starts hanging indefinitely. A fix would be to overwrite the build_requires = " cmake/[>=3.22.0]" of the zlib package to cmake/3.29.0@redacted. I think atleast, because I'm not sure why it hangs.

Or can I overwrite the tools_requires of the python package instead to use another zlib? At this point I can't rebuild and ship the python package. Any ideas? Also is there more documentation on how to do things using the profile, I read the documentation but its incomplete.

I've also tried [replace_tool_requires] on zlib, but since its a transitive dependency it is not affected. Also using force=true doesn't work in the tools_requires() in the conanfile.py.

I'm out of options here. What can I do?

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide

Metadata

Metadata

Assignees

Labels

answeredAnswered by the Conan teamstaledThe issue has been inactive for a while and will be closed soontype: question

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions