Problem using dependency glium


#1

Hi,

I’ve problems using glium. I added the line

glium = "*"

to my Cargo.toml in the [dependencies] section but cargo gives me the following error when building:

An unknown error occurred

When running cargo build --verbose I get the error:

failed to parse registry's information for: wayland-client

I’m new to Rust and I don’t really know what to do with this information. When I add the line

glium = "0.16.0"

to my Cargo.toml I get the same error. (0.16.0 seems to be the current version of glium according to crates.io)

When I change the version number to a random

glium = "1"

I’m getting the following error:

no matching package named `glium` found (required by `glium_test`)
location searched: registry https://github.com/rust-lang/crates.io-index
version required: ^1
versions found: 0.16.0, 0.15.0, 0.14.0, ...

(Which explicitly states version 0.16.0)

The dependency rand = "0.3" for example works fine.

I’m using

  • cargo 0.8.0 (built 2016-03-22)

  • rustc 1.7.0

and I’m on Ubuntu 16.04.

Help is greatly appreciated.
Thanks in advance!

Henk


#2

Your cargo (and rustc too) are quite old. Almost a year! It seems that the 0.16 version of glium requires newer toolchain. You can try your look with older version, eg. glium = "0.14", but the best solution would be just to install the newest toolchain.


#3

Those are the versions that shipped with Ubuntu 16.04. You’ll have to install it yourself from rust-lang.org to get something newer.

failed to parse registry’s information for: wayland-client

I believe it is this problem:

Particularly, looking at the raw registry index, I can see that wayland-client 0.6.0 has a dependency on "name":"wayland-sys","req":"^0.6.0-alpha", and it’s the -alpha part that older cargo fails on. It doesn’t even matter that this version is yanked from crates.io - it still tries to get parsed.

If you can’t upgrade, maybe you could ask the Ubuntu packager for cargo to backport the semver and cargo fixes.


Crates.io compatibility with old cargo
#4

Thanks! Installing the current version solved the problem.