Package dependency collision
See original GitHub issueI’m trying to add some conan packages to my cmake project namely opencv & boost. When I do so using the following two cmake function calls:
conan_cmake_run(REQUIRES opencv/4.3.0@channel/user
BASIC_SETUP CMAKE_TARGETS
BUILD missing
PROFILE_AUTO ALL)
conan_cmake_run(REQUIRES boost/1.73.0@channel/user
BASIC_SETUP CMAKE_TARGETS
BUILD missing
PROFILE_AUTO ALL)
I get an error in the second call that looks like this:
add_library cannot create imported target "CONAN_LIB::zlib_z" because
another target with the same name already exists.
It seems the problem is that both opencv & boost have a zlib dependency which is being added a second time in the setup of the boost package. It seems quite a common occurrence that multiple packages have a dependency for the same package. What is the recommend way to deal with this in cmake-conan?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Python Dependencies - Everything You Need to Know
An example of a transitive dependency conflict would be when multiple packages depend on different versions of dependency C. The rest of this ......
Read more >How to identify and resolve a dependency conflict
Find Divio's how-to guide to identifying and resolving a dependency conflict. Learn what steps to take if a deployment in the cloud or...
Read more >Dependency Resolution - pip documentation v22.3.1
Dependency Resolution#. pip is capable of determining and installing the dependencies of packages. The process of determining which version of a dependency ......
Read more >How to Resolve a Version Collision of Artifacts in Maven
Version collision happens when multiple dependencies link to the same artifact, but use different versions. As a result, there may be errors in ......
Read more >The Nine Circles of Python Dependency Hell - Medium
Circle 5: Internal transitive dependency conflict. You may run into a situation where two of your internal dependencies are demanding non-overlapping versions ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thanks for the info! I think this is probably something to add to the Readme, I may open a pr for that later on once I have some more familiarity.
That would probably work as-well but seems less convenient I’ll just stick to either using:
or
Depending on the build configuration.