Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when parsing patchelf --version #2382

Closed
2 tasks done
Timmmm opened this issue Dec 11, 2024 · 1 comment
Closed
2 tasks done

Error when parsing patchelf --version #2382

Timmmm opened this issue Dec 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Timmmm
Copy link

Timmmm commented Dec 11, 2024

Bug Description

I get this error:

 maturin failed
  Caused by: Failed to parse patchelf version
  Caused by: unexpected end of input while parsing minor version number

It is caused because my patchelf does not use a semver version:

❯ patchelf --version
patchelf 0.12

This is on RHEL 8.

The code uses parse::<semver::Version> to parse it, from the semver crate.

That parse function requires a patch component.

Those docs suggest using VersionReq instead but that doesn't seem right. I would maybe just do something like if only_one_dot(version) { version += ".0" }. Or just split on dots.

I guess the other option is to give a better error message since apparently Patchelf 0.14 is required and maybe they switched to proper semver by that point.

Your maturin version (maturin --version)

1.5.1

Your Python version (python -V)

3.12.5

Your pip version (pip -V)

23.2.1

What bindings you're using

bin

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

  1. Install patchelf 0.12.
  2. Built a maturin project that requires patchelf.
@Timmmm Timmmm added the bug Something isn't working label Dec 11, 2024
@messense
Copy link
Member

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants