1

I cloned and tried to build the MIO coroutines library, but its dependencies seem to clash:

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

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

It seems like the dependency time requires kernel32 0.1.4, but two other dependencies fs2 and memmap require 0.2.0.

Is there anything I can do to address it, or would the best solution in cases like this just be to file a bug report?

On a related note, if the repo doesn't have a Cargo.lock, does that count as a bug? I've seen it recommended that Cargo.lock always be added to version control to prevent issues like this.

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
LogicChains
  • 4,332
  • 2
  • 18
  • 27
  • 1
    I suggest you post an issue in the time crate to make sure they update to 0.2 and an issue to mio, because they are using [wildcard dependency versions](https://github.com/dpc/mioco/blob/master/Cargo.toml#L24-L33), which is probably what is causing this – oli_obk Nov 09 '15 at 08:50
  • See: https://github.com/retep998/winapi-rs/issues/238 – Alberto Leal Nov 09 '15 at 10:22
  • 4
    *Cargo.lock always be added to version control* — [This is absolutely not universally true](http://doc.crates.io/guide.html#cargotoml-vs-cargolock). Commit the lockfile for binaries and applications. Do **not** commit it for libraries. – Shepmaster Nov 09 '15 at 14:17

1 Answers1

2

This is a known issue that has been documented on the WinAPI bugtracker.

It seems the issue was that the maintainer published a new version, bumping it from v0.1.x to v0.2.x. Since some packages depend on (and will continue to depend on, until they're updated) v0.1.x, Cargo complained that the two dependencies are not compatible, and refused to link them both in. Chaos ensues.

This should now be rectified, according to the ticket mentioned above.

George Hilliard
  • 15,402
  • 9
  • 58
  • 96