I think we should downgrade predicates-tree to 1.0.5 or older. I can submit a PR for that. What does "rustc --version" show you? On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones <rjones at redhat.com> wrote:> > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > ---------------------------------------------------------------------- > cargo build --release --example ramdisk > Downloading crates ... > Downloaded float-cmp v0.9.0 > Downloaded downcast v0.11.0 > Downloaded mockall_derive v0.11.3 > Downloaded itertools v0.10.5 > Downloaded aho-corasick v0.7.20 > Downloaded predicates-tree v1.0.7 > error: failed to parse manifest at `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > Caused by: > failed to parse the `edition` key > Caused by: > this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions. > ---------------------------------------------------------------------- > > nbdkit itself uses edition = 2018, but this seems to affects one of > the dependencies. > > I'm not sure how to solve this, but one ideas I had is in ./configure > to check if the cargo/rust we're trying to use doesn't support some > base edition (eg. latest edition supported < 2021) then we would > disable rust bindings. > > Unfortunately actually getting the latest supported edition seems > hard. The best I could find is parsing this which doesn't seem ideal: > > $ rustc --help |& grep -- --edition > --edition 2015|2018|2021|2024 > > What do you think? > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > libguestfs lets you edit virtual machines. Supports shell scripting, > bindings from many languages. http://libguestfs.org >
Richard W.M. Jones
2023-Jan-13 14:27 UTC
[Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote:> I think we should downgrade predicates-tree to 1.0.5 or older. I can > submit a PR for that. What does "rustc --version" show you?Unfortunately our configure script doesn't collect that information (it should do! - I'll fix that in a moment). But based on it being Debian 11 ("bullseye") it's likely to be: https://packages.debian.org/bullseye/rustc Package: rustc (1.48.0+dfsg1-2) Which is pretty ancient ... Rich.> On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones <rjones at redhat.com> wrote: > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > ---------------------------------------------------------------------- > > cargo build --release --example ramdisk > > Downloading crates ... > > Downloaded float-cmp v0.9.0 > > Downloaded downcast v0.11.0 > > Downloaded mockall_derive v0.11.3 > > Downloaded itertools v0.10.5 > > Downloaded aho-corasick v0.7.20 > > Downloaded predicates-tree v1.0.7 > > error: failed to parse manifest at `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > > Caused by: > > failed to parse the `edition` key > > Caused by: > > this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions. > > ---------------------------------------------------------------------- > > > > nbdkit itself uses edition = 2018, but this seems to affects one of > > the dependencies. > > > > I'm not sure how to solve this, but one ideas I had is in ./configure > > to check if the cargo/rust we're trying to use doesn't support some > > base edition (eg. latest edition supported < 2021) then we would > > disable rust bindings. > > > > Unfortunately actually getting the latest supported edition seems > > hard. The best I could find is parsing this which doesn't seem ideal: > > > > $ rustc --help |& grep -- --edition > > --edition 2015|2018|2021|2024 > > > > What do you think? > > > > Rich. > > > > -- > > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > libguestfs lets you edit virtual machines. Supports shell scripting, > > bindings from many languages. http://libguestfs.org > >-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW