[bug] Compatible package failure if a package and its requirement both build_require the compatible package
See original GitHub issueGiven two packages, pkg-a
and pkg-b
(which requires pkg-a
), and each build_requires doxygen/1.9.1
.
If building with build_type=Debug
, Conan plans to use the compatible Release package for doxygen/1.9.1
, but lists both packages in the build plan, and then complains of a missing folder.
Environment Details (include every applicable attribute)
- Operating System+version: macOS 10.15.7
- Compiler+version: apple-clang 12.0
- Conan version: 1.39.0
- Python version: 3.9
Steps to reproduce (Include if Applicable)
- Ensure there are no local versions of
doxygen/1.9.1
- Clone
https://github.com/datalogics-kam/conan-compatible-package-bug
. cd
to the resulting directory, andsh -x build.sh
Logs (Executed commands with output) (Include/Attach if Applicable)
+ conan install -if doxygen doxygen/1.9.1@ --build missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=12.0
os=Macos
os_build=Macos
[options]
[build_requires]
[env]
Installing package: doxygen/1.9.1
Requirements
doxygen/1.9.1 from 'conan-center-virtual' - Cache
libuuid/1.0.3 from 'conan-center-virtual' - Cache
xapian-core/1.4.18 from 'conan-center-virtual' - Cache
zlib/1.2.11 from 'conan-center-virtual' - Cache
Packages
doxygen/1.9.1:8785b92de1bc6414009359573b36a2a3e1498bf2 - Cache
libuuid/1.0.3:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Cache
xapian-core/1.4.18:b8c8ad8046449d42b29a7e22012187a58389cfe3 - Cache
zlib/1.2.11:647afeb69d3b0a2d3d316e80b24d38c714cc6900 - Cache
Installing (downloading, building) binaries...
libuuid/1.0.3: Already installed!
zlib/1.2.11: Already installed!
xapian-core/1.4.18: Already installed!
xapian-core/1.4.18: Appending PATH environment variable: /Users/kam/.conan/data/xapian-core/1.4.18/_/_/package/b8c8ad8046449d42b29a7e22012187a58389cfe3/bin
xapian-core/1.4.18: Appending AUTOMAKE_CONAN_INCLUDES environment variable: /Users/kam/.conan/data/xapian-core/1.4.18/_/_/package/b8c8ad8046449d42b29a7e22012187a58389cfe3/bin/share/aclocal
doxygen/1.9.1: Already installed!
doxygen/1.9.1: Appending PATH environment variable: /Users/kam/.conan/data/doxygen/1.9.1/_/_/package/8785b92de1bc6414009359573b36a2a3e1498bf2/bin
Aggregating env generators
+ conan export pkg-a
Exporting package recipe
pkg-a/0.1: The stored package has not changed
pkg-a/0.1: Using the exported files summary hash as the recipe revision: c2041fd6b2c68b3ed1b914478ef971c5
pkg-a/0.1: Exported revision: c2041fd6b2c68b3ed1b914478ef971c5
+ conan install pkg-b -if build -s build_type=Debug --build missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=12.0
os=Macos
os_build=Macos
[options]
[build_requires]
[env]
doxygen/1.9.1: Main binary package 'afc515d88cac1e121770943bc9a5045df3a125f4' missing. Using compatible package '8785b92de1bc6414009359573b36a2a3e1498bf2'
conanfile.py (pkg-b/0.1): Installing package
Requirements
pkg-a/0.1 from local cache - Cache
Packages
pkg-a/0.1:ba203d82ae0020eccba7236c3748eb8f79fceaf6 - Build
Build requirements
doxygen/1.9.1 from 'conan-center-virtual' - Cache
doxygen/1.9.1 from 'conan-center-virtual' - Cache
libuuid/1.0.3 from 'conan-center-virtual' - Cache
xapian-core/1.4.18 from 'conan-center-virtual' - Cache
zlib/1.2.11 from 'conan-center-virtual' - Cache
Build requirements packages
doxygen/1.9.1:8785b92de1bc6414009359573b36a2a3e1498bf2 - Cache
doxygen/1.9.1:afc515d88cac1e121770943bc9a5045df3a125f4 - Cache
libuuid/1.0.3:d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2 - Cache
xapian-core/1.4.18:9282a40774a88010b7c4ad6c26e9598ec76fb393 - Cache
zlib/1.2.11:d98fae1010d1fb9e7f79a1e8a72bbf129d8660a2 - Cache
Installing (downloading, building) binaries...
libuuid/1.0.3: Already installed!
1 Head: main
zlib/1.2.11: Already installed!
xapian-core/1.4.18: Already installed!
xapian-core/1.4.18: Appending PATH environment variable: /Users/kam/.conan/data/xapian-core/1.4.18/_/_/package/9282a40774a88010b7c4ad6c26e9598ec76fb393/bin
xapian-core/1.4.18: Appending AUTOMAKE_CONAN_INCLUDES environment variable: /Users/kam/.conan/data/xapian-core/1.4.18/_/_/package/9282a40774a88010b7c4ad6c26e9598ec76fb393/bin/share/aclocal
xapian-core/1.4.18: Appending PATH environment variable: /Users/kam/.conan/data/xapian-core/1.4.18/_/_/package/9282a40774a88010b7c4ad6c26e9598ec76fb393/bin
xapian-core/1.4.18: Appending AUTOMAKE_CONAN_INCLUDES environment variable: /Users/kam/.conan/data/xapian-core/1.4.18/_/_/package/9282a40774a88010b7c4ad6c26e9598ec76fb393/bin/share/aclocal
doxygen/1.9.1: Already installed!
doxygen/1.9.1: Appending PATH environment variable: /Users/kam/.conan/data/doxygen/1.9.1/_/_/package/8785b92de1bc6414009359573b36a2a3e1498bf2/bin
doxygen/1.9.1: Already installed!
Traceback (most recent call last):
File "/Users/kam/.local/pipx/venvs/conan/lib/python3.9/site-packages/conans/client/command.py", line 2220, in run
method(args[0][1:])
File "/Users/kam/.local/pipx/venvs/conan/lib/python3.9/site-packages/conans/client/command.py", line 523, in install
info = self._conan.install(path=args.path_or_reference,
File "/Users/kam/.local/pipx/venvs/conan/lib/python3.9/site-packages/conans/client/conan_api.py", line 93, in wrapper
return f(api, *args, **kwargs)
File "/Users/kam/.local/pipx/venvs/conan/lib/python3.9/site-packages/conans/client/conan_api.py", line 606, in install
deps_install(app=self.app,
File "/Users/kam/.local/pipx/venvs/conan/lib/python3.9/site-packages/conans/client/manager.py", line 82, in deps_install
installer.install(deps_graph, remotes, build_modes, update, profile_host, profile_build,
File "/Users/kam/.local/pipx/venvs/conan/lib/python3.9/site-packages/conans/client/installer.py", line 316, in install
self._build(nodes_by_level, keep_build, root_node, profile_host, profile_build,
File "/Users/kam/.local/pipx/venvs/conan/lib/python3.9/site-packages/conans/client/installer.py", line 451, in _build
self._handle_node_cache(node, keep_build, processed_package_refs, remotes)
File "/Users/kam/.local/pipx/venvs/conan/lib/python3.9/site-packages/conans/client/installer.py", line 560, in _handle_node_cache
assert os.path.isdir(package_folder), ("Package '%s' folder must exist: %s\n"
AssertionError: Package 'doxygen/1.9.1:afc515d88cac1e121770943bc9a5045df3a125f4' folder must exist: /Users/kam/.conan/data/doxygen/1.9.1/_/_/package/afc515d88cac1e121770943bc9a5045df3a125f4
ERROR: Package 'doxygen/1.9.1:afc515d88cac1e121770943bc9a5045df3a125f4' folder must exist: /Users/kam/.conan/data/doxygen/1.9.1/_/_/package/afc515d88cac1e121770943bc9a5045df3a125f4
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Locale built for epel7 will use undefined macro python3dist #174
BuildRequires: python3dist(setuptools). But when I try to built the result via mock it fails with: Error: No Package found for python3dist(setuptool).
Read more >Fedora Packaging Guidelines
Many packages, regardless of their primary purpose, include both applications and libraries. In this case one or both SHOULD be packaged in subpackages...
Read more >Full Text Bug Listing - Red Hat Bugzilla
I've packaged the needed dependencies, they are added as blockers in Bugzilla. Unfortunately, the tests of this package fail, so I've opened a...
Read more >Detecting Dependency Bugs to Prevent Compatibility Failures
It means that two library versions should be placed in two library packages, when the versions are backward incompatible. These two packages, to ......
Read more >Packaging guidelines - Mageia wiki
Every package in Mageia needs a maintainer (AKA owner, bug owner). ... Mageia 2 supported both SystemV and systemd boots and thus required...
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
Finally, I was able to reproduce the error locally but I need another opinion to say if it’s actually a bug or it could be a problem from
doxygen
recipe itself.Basically, the problem is coming from the following
package_id()
implementation (https://conan.io/center/doxygen?tab=recipe):As you can see, the problem is coming from that line
compatible_pkg.settings.build_type = "Release"
. So, if I delete that line from my test (https://github.com/conan-io/conan/pull/9411), this one is passing OK.So, please @memsharded, let us know your opinion about this issue 😁
Ok, then https://github.com/conan-io/conan/pull/9411 merged, and closing this, thanks again for reporting and for your patience 😃