-
Notifications
You must be signed in to change notification settings - Fork 365
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
failed to select a version for clang-sys
which could resolve this conflict
#383
Comments
Hi @duhruh thanks for posting! This is a particularly nasty issues where both coreaudio and asio require different versions of clang. See RustAudio/coreaudio-rs#68 and nannou-org/nannou#502. The amusing thing is that it's not possible to build both of these crates on the same platform, and the feature gating ensures it, however cargo is unaware of this and so forces both crates to fall back to the last valid version that has a matching clang-sys dependency. We can potentially work around this for now by updating Intuitively it seems to me that cargo should allow this case, but I don't recall what the reason is for why it does not. I do know that it's been a known issue with cargo for a long time. |
Thinking on this a little more, I think the better solution might be to remove the dependency on bindgen from |
I also encounter this issue in MacOS:
Could you advise what is the status of the fix? |
I have to downgrade my bindgen. Disgusting, coreaudio-sys is tooooooo old, the author does not maintain it. |
Hello, As a workaround, you can define the clang-sys version in your Cargo.toml file. For your specific case duhruh, if you need asio, add clang-sys = "0.24.0" and if you need coreaudio, add clang-sys = "0.28.1". As @mitchmindtree stated, you don't need to build both of these crates as the same time. |
So Edit: As it turns out only |
PRs are welcome, but please ones that don't break CI. |
Noob question: I still don't understand why Cargo is trying to involve Lines 41 to 42 in 9597330
|
@hyunh90 cargo tries to have one platform independent Cargo.lock so that if you put it into git, there is no back and forth when e.g. someone on windows or someone on linux makes a commit. Sadly, the check for duplicate dependencies is at that level, before the platform gets invoked. The advantage of such a check is though that you don't need to test all platforms. |
@est31 Thanks for the insights. I got a glimpse of how it works now. Thanks! |
I'm running into issues trying to run the examples with the asio feature turned on on
I might be doing something wrong here, wondering if anybody can help.
The text was updated successfully, but these errors were encountered: