Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835630 - gnome-base/librsvg-2.52.x minimal rust version is set too low
Summary: gnome-base/librsvg-2.52.x minimal rust version is set too low
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-19 18:44 UTC by tt_1
Modified: 2022-06-12 09:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2022-03-19 18:44:10 UTC
so, I just wanted to notify you guys that the minimal rust version to compile librsvg-2.52 branch is not constanst through the series of subsequent point releases. 

librsvg-2.52.5 (never been in tree I believe) needs at least rust-1.53.0 because it makes use of option_insert, which is still an unstable feature in rust-1.52.1, as you can see here: 

212619-error[E0658]: use of unstable library feature 'option_insert': newly added
212694-   --> src/bin/rsvg-convert.rs:644:43
212732-    |
212738-644 |                 surface @ None => surface.insert(self.create_surface(page_size, unit)?),
212833-    |                                           ^^^^^^
212888-    |
212894-    = note: see issue #78271 <https://github.com/rust-lang/rust/issues/78271> for more information
212993-
212994:error: aborting due to previous error
213032-
213033-For more information about this error, try `rustc --explain E0658`.
213101:error: could not compile `librsvg`

librsvg-2.52.6 needs at least rust-1.54.0 as it has a patch merged using a newer version of cfg_expr crate in vendor, which makes use of extended_key_value_attributes and is causing this beauty: 


error[E0658]: arbitrary expressions in key-value attributes are unstable
 --> /var/tmp/portage/gnome-base/librsvg-2.52.6/work/librsvg-2.52.6/vendor/cfg-expr/src/lib.rs:1:10
  |
1 | #![doc = include_str!("../README.md")]
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: could not compile `cfg-expr`


so my conclusion at the moment is to raise minimum rust version of librsvg-2.52.6 to 1.54.0
Comment 1 Larry the Git Cow gentoo-dev 2022-03-20 21:30:18 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1398a3a6e61189db5c5350729cfe8f1354d4daf

commit d1398a3a6e61189db5c5350729cfe8f1354d4daf
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2022-03-20 21:18:41 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2022-03-20 21:29:55 +0000

    gnome-base/librsvg: Version bump to 2.54.0
    
    Bug: https://bugs.gentoo.org/835630
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 gnome-base/librsvg/Manifest              |   1 +
 gnome-base/librsvg/librsvg-2.54.0.ebuild | 102 +++++++++++++++++++++++++++++++
 2 files changed, 103 insertions(+)
Comment 2 tt_1 2022-03-21 05:52:13 UTC
If I can recall it correctly from memory, librsvg-2.54.x branch uses rust 2021-edition, and therefore needs at least rust-1.56.0

The motivation behind this bug is, that there are a bunch of users who can't use the gentoo ebuild from tree, but have to bootstrap their own rustc version. This is everyone who uses musl as the libc and is not on amd64 or arm64.
Comment 3 Matt Turner gentoo-dev 2022-03-21 05:56:02 UTC
(In reply to tt_1 from comment #2)
> If I can recall it correctly from memory, librsvg-2.54.x branch uses rust
> 2021-edition, and therefore needs at least rust-1.56.0
> 
> The motivation behind this bug is, that there are a bunch of users who can't
> use the gentoo ebuild from tree, but have to bootstrap their own rustc
> version. This is everyone who uses musl as the libc and is not on amd64 or
> arm64.

It's strange that you're the only one reporting it if there are a bunch of users affected.

Anyway, I'm happy to update the required version, but I'm not going to spend a large amount of time investigating what that required version should be, exactly.
Comment 4 tt_1 2022-03-21 06:03:12 UTC
its actually upstreams fault for not documenting the changes in their readme, tried many times to contact them but can't recover my password for their bugzilla/gitlab :-/
Comment 5 tt_1 2022-03-21 06:59:34 UTC
cargo.toml demanding rust edition 2021: 

https://github.com/GNOME/librsvg/blob/main/Cargo.toml#L6
Comment 6 Larry the Git Cow gentoo-dev 2022-03-21 18:07:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=823d01980623a3750e69e0cb1d9f76a3387b5921

commit 823d01980623a3750e69e0cb1d9f76a3387b5921
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2022-03-21 18:07:13 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2022-03-21 18:07:20 +0000

    gnome-base/librsvg: Raise rust version requirement
    
    Bug: https://bugs.gentoo.org/835630
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 gnome-base/librsvg/librsvg-2.54.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 tt_1 2022-06-12 09:47:18 UTC
2.52.x has been cleaned from tree, closing.