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

Build fails because of two version of kernel32-sys used #622

Closed
Bobandy opened this issue Nov 8, 2015 · 9 comments
Closed

Build fails because of two version of kernel32-sys used #622

Bobandy opened this issue Nov 8, 2015 · 9 comments

Comments

@Bobandy
Copy link

Bobandy commented Nov 8, 2015

native library kernel32 is being linked to by more than one package, and can only be linked to by one package

kernel32-sys v0.1.4
kernel32-sys v0.2.0

@sezna
Copy link

sezna commented Nov 8, 2015

I am also having this problem. Tried editing the cargo.lock, to no avail.

@bvssvni
Copy link
Member

bvssvni commented Nov 8, 2015

There was a breaking change in libc that causes havoc.

@bvssvni
Copy link
Member

bvssvni commented Nov 8, 2015

There is a tracking issue for updating the Piston ecosystem here.

@mitchmindtree
Copy link
Contributor

It seems this problem is a glutin issue, I've opened an issue here.

If you need a temporary fix, you might be able to simply increment glutin's kernel32-sys dep version to 0.2 within a local build, but I have a feeling that there are still more errors once you get past that.

@Bobandy
Copy link
Author

Bobandy commented Nov 9, 2015

yes I had already tried that before opening the issue. I had more errors... Thank you for redirecting this to glutin!

@mitchmindtree
Copy link
Contributor

@Bobandy sorry you're running into so many issues... the breakage in libc has been pretty epic as it is one of the deepest dependencies in the rust ecosystem and issues have been further propagated by:

  • some crates not correctly incrementing their breaking version numbers as they update to the new libc
  • some crates using the "*" version causing any downstream crates to break
  • some nodes in diamond dependencies updating to the new libc before other ones

There hasn't been breakage like this since pre-1.0 days. Hopefully we can clean all this up soon and get back to peaceful, non-broken code-land heh!

@Bobandy
Copy link
Author

Bobandy commented Nov 9, 2015

@mitchmindtree by the way I see you said you were unable to test because you are not on windows, I am trying to build on Arch Linux.

@retep998
Copy link
Member

retep998 commented Nov 9, 2015

I blame this entirely on Cargo. Since it only allows a single crate to specify links = "foo" for a given foo and kernel32-sys specifies links = "kernel32", that means two different major versions of kernel32-sys will conflict. So basically I'm screwed, I can't publish new major versions or I break everything, including people on non-windows since kernel32-sys often gets pulled in as a transitive dependency on non-windows. Just wonderful. [Insert obscenities directed at Cargo]

Same issue elsewhere: time-rs/time#126

@Bobandy
Copy link
Author

Bobandy commented Nov 9, 2015

Ok thanks to a commit from retep998 the kernel32 error is now gone, except now, can't seem to be able to compile pistoncore-glutin_windows :

Compiling pistoncore-glutin_window v0.16.0
/home/bobandy/.cargo/registry/src/github.com-0a35038f75765ae4/pistoncore-glutin_window-0.16.0/src/lib.rs:95:27: 95:53 error: mismatched types:
 expected `*const libc::types::common::c95::c_void`,
    found `*const ()`
(expected enum `libc::types::common::c95::c_void`,
    found ()) [E0308]
/home/bobandy/.cargo/registry/src/github.com-0a35038f75765ae4/pistoncore-glutin_window-0.16.0/src/lib.rs:95         gl::load_with(|s| window.get_proc_address(s));
                                                                                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bobandy/.cargo/registry/src/github.com-0a35038f75765ae4/pistoncore-glutin_window-0.16.0/src/lib.rs:95:27: 95:53 help: run `rustc --explain E0308` to see a detailed explanation
/home/bobandy/.cargo/registry/src/github.com-0a35038f75765ae4/pistoncore-glutin_window-0.16.0/src/lib.rs:223:9: 223:48 error: mismatched types:
 expected `*const libc::types::common::c95::c_void`,
    found `*const ()`
(expected enum `libc::types::common::c95::c_void`,
    found ()) [E0308]
/home/bobandy/.cargo/registry/src/github.com-0a35038f75765ae4/pistoncore-glutin_window-0.16.0/src/lib.rs:223         self.window.get_proc_address(proc_name)
                                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bobandy/.cargo/registry/src/github.com-0a35038f75765ae4/pistoncore-glutin_window-0.16.0/src/lib.rs:223:9: 223:48 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 2 previous errors
Build failed, waiting for other jobs to finish...
Could not compile `pistoncore-glutin_window`.

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

No branches or pull requests

5 participants