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

Cannot build. Failed to select a version of imgui-sys #97

Open
MarcosDanielTorres opened this issue Apr 17, 2023 · 6 comments
Open

Cannot build. Failed to select a version of imgui-sys #97

MarcosDanielTorres opened this issue Apr 17, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@MarcosDanielTorres
Copy link

MarcosDanielTorres commented Apr 17, 2023

Description

Hey guys, first of all, thank you for your work.
As this is the first time I'm using imgui maybe it's an experience-related problem. But when trying to use imgui-wgpu I'm having trouble building the project. But maybe the version of the crates I'm using are not right.

This is how my cargo.toml looks like:
(the cargo.toml of the examples uses version 0.11 for imgui and imgui-winit-support)

wgpu = "0.15"
winit = "0.27.5"

imgui-wgpu = "0.22.0"
imgui = "0.11"
imgui-winit-support = "0.11"

Problem

error: failed to select a version for `imgui-sys`.
    ... required by package `imgui v0.10.0`
    ... which satisfies dependency `imgui = "^0.10"` of package `imgui-wgpu v0.22.0`
    ... which satisfies dependency `imgui-wgpu = "^0.22.0"` of package `wgpu_playground v0.1.0 (C:\Users\_\projects\cg\own\wgpu_playground)`
versions that meet the requirements `^0.10.0` are: 0.10.0

the package `imgui-sys` links to the native library `imgui`, but it conflicts with a previous package which links to `imgui` as well:
package `imgui-sys v0.11.0`
    ... which satisfies dependency `imgui-sys = "^0.11.0"` of package `imgui v0.11.0`
    ... which satisfies dependency `imgui = "^0.11.0"` of package `imgui-winit-support v0.11.0`
    ... which satisfies dependency `imgui-winit-support = "^0.11"` of package `wgpu_playground v0.1.0 (C:\Users\_\projects\cg\own\wgpu_playground)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='imgui-sys' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

Repro steps

cargo build

System Information

rustc 1.68.2 (9eb3afe9e 2023-03-27) stable
OS: Win 11 x64

@MarcosDanielTorres MarcosDanielTorres added the bug Something isn't working label Apr 17, 2023
@MarkWilds
Copy link

I have the same issue!

@MarcosDanielTorres
Copy link
Author

I have the same issue!

Hey Mark, I fixed it changing the versions of imgui and imgui-winit-support to 0.10 instead of 0.11
What confused me was that the examples had the 0.11 versions of those crates

@trojanfoe
Copy link

trojanfoe commented Jun 17, 2023

I found that I had to start using the git HEAD version of imgui-wgpu, after upgrading imgui to 0.11.0 and wgpu to 0.16.0, as imgui-wgpu 0.22.0 (the latest version of crates.io) still uses imgui 0.10.0...

@RandallOfLegend
Copy link

I have the same issue. It would be helpful for the author to provide an example with a clean cargo file that uses this actual crate.

@trojanfoe
Copy link

I’ve dumped imgui now; it’s too much aggro.

@Yatekii
Copy link
Owner

Yatekii commented Jul 8, 2023

I do not actively use this crate anymore. PRs for version bumps are welcome and I'll gladly merge and release. But considering I do not follow the release schedule of dependents it does not make much sense for me to make those changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants