Skip to content

librsvg: add 2.56.2 and rust upper version limit for 2.51#38766

Merged
alecbcs merged 2 commits intospack:developfrom
manuelakuhn:librsvg-fix-dep-versions
Jul 17, 2023
Merged

librsvg: add 2.56.2 and rust upper version limit for 2.51#38766
alecbcs merged 2 commits intospack:developfrom
manuelakuhn:librsvg-fix-dep-versions

Conversation

@manuelakuhn
Copy link
Copy Markdown
Member

librsvg did not build anymore with the error:

error[E0793]: reference to packed field is unaligned
   --> $spack-stage/spack-stage-librsvg-2.51.0-dh25kyl2eni3gzdhzxlm6lkoioz2u6g6/spack-src/vendor/tendril/src/tendril.rs:241:20
    |
241 |                 if (*header).refcount.decrement() == 1 {
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)

error[E0793]: reference to packed field is unaligned
   --> $spack-stage/spack-stage-librsvg-2.51.0-dh25kyl2eni3gzdhzxlm6lkoioz2u6g6/spack-src/vendor/tendril/src/tendril.rs:958:9
    |
958 |         (*self.header()).refcount.increment();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)

The reason for this error was this change in [email protected]:: "Unaligned references to packed fields are now a hard error" (see Release notes). So limiting rust to @:1.68 fixed it.

While I was at it, I also added the minimal version requirements for the dependencies according to the configure file.

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Jul 6, 2023

Hi @manuelakuhn! I noticed that the following package(s) don't yet have maintainers:

  • librsvg

Are you interested in adopting any of these package(s)? If so, simply add the following to the package class:

    maintainers("manuelakuhn")

If not, could you contact the developers of this package and see if they are interested? You can quickly see who has worked on a package with spack blame:

$ spack blame librsvg

Thank you for your help! Please don't add maintainers without their consent.

You don't have to be a Spack expert or package developer in order to be a "maintainer," it just gives us a list of users willing to review PRs or debug issues relating to this package. A package can have multiple maintainers; just add a list of GitHub handles of anyone who wants to volunteer.

depends_on("rust", type="build", when="@2.41:")
# rust minimal version from NEWS file and upper bound because "Unaligned
# references to packed fields are a hard error" starting from 1.69
depends_on("[email protected]:1.68", when="@2.50:", type="build")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manuelakuhn do you know if building v2.56 with rust >1.68 works?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to work, at least it [email protected] installs with --test=root for me. I have added this version as well.

@alecbcs alecbcs self-assigned this Jul 10, 2023
@manuelakuhn manuelakuhn changed the title librsvg: add rust upper version limit librsvg: add 2.56.2 and rust upper version limit for 2.51 Jul 10, 2023
Copy link
Copy Markdown
Member

@alecbcs alecbcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed SHA. PR looks good to me! Thank you @manuelakuhn for all your hard work.

@alecbcs alecbcs merged commit 6ac93e1 into spack:develop Jul 17, 2023
@manuelakuhn manuelakuhn deleted the librsvg-fix-dep-versions branch July 17, 2023 16:59
eugeneswalker pushed a commit to eugeneswalker/spack that referenced this pull request Jul 22, 2023
* librsvg: add rust upper version limit

* librsvg: Add 2.56.2
mpokorny pushed a commit to mpokorny/spack that referenced this pull request Sep 18, 2023
* librsvg: add rust upper version limit

* librsvg: Add 2.56.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants