Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] provide conflict when package depends on itself in build context #15570

Closed
DoDoENT opened this issue Jan 31, 2024 · 1 comment · Fixed by #15575
Closed

[bug] provide conflict when package depends on itself in build context #15570

DoDoENT opened this issue Jan 31, 2024 · 1 comment · Fixed by #15575
Assignees
Milestone

Comments

@DoDoENT
Copy link
Contributor

DoDoENT commented Jan 31, 2024

Environment details

  • Operating System+version: macos 14.2
  • Compiler+version: apple-clang 15.0.0
  • Conan version: 2.0.17
  • Python version: 3.11

Steps to reproduce

  • Create a package that depends on itself in build context (e.g. grpc-style).
  • add provides = 'feature' attribute to the package's conanfile
  • make package editable or export it to the local cache
  • install package in cross-compilation mode (i.e. targeting android/iOS/browser)

Expected: this case should work and provides attribute should only affect downstream packages

Actual: Package conflicts on itself with error like this:

|| ERROR: Provide Conflict: Both 'my_package/2.0.0' and my_package/2.0.0' provide '('pkg1', 'pkg2', 'pkg3')'.

The current workaround is to not use the provides attribute and rely on c++ compiler/linker errors to detect duplicate symbols.

Logs

No response

@memsharded
Copy link
Member

Thanks very much for your detailed report @DoDoENT, it helped to identify the issue.

I am submitting a fix in #15575 for next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants