Skip to content
New issue

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

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

Already on GitHub? # to your account

Can't find libgcc_s.so due to incorrect RPATH in musllinux wheel #2232

Closed
2 tasks done
matt-codecov opened this issue Sep 25, 2024 · 1 comment · Fixed by #2233
Closed
2 tasks done

Can't find libgcc_s.so due to incorrect RPATH in musllinux wheel #2232

matt-codecov opened this issue Sep 25, 2024 · 1 comment · Fixed by #2233
Labels
bug Something isn't working

Comments

@matt-codecov
Copy link

Bug Description

v1.7.2 is creating wheels that fail to load libgcc_s.so with an error message like this:

E   ImportError: Error loading shared library libgcc_s-1e52349c.so.1: No such file or directory (needed by /io/.venv/lib/python3.12/site-packages/codecov_rs/_bindings.abi3.so)

(job link) (download wheel)

Downgrading to v1.7.1 in the maturin action fixes the problem. (job link, download wheel)

Both wheels have the same file structure with relevant files:

  • codecov_rs/_bindings.abi3.so
  • codecov_rs.libs/libgcc_s-1e52349c.so.1

The problem is shown with objdump -p:

# The working wheel looks for `codecov_rs.libs` in the right place
$ objdump -p v1.7.1/codecov_rs/_bindings.abi3.so
...
Dynamic Section:
  RPATH        $ORIGIN/../codecov_rs.libs
  NEEDED       libgcc_s-1e52349c.so.1
  NEEDED       libc.so
  SONAME       lib_bindings.so
...

# The broken wheel looks one directory too high
$ objdump -p v1.7.2/codecov_rs/_bindings.abi3.so
...
Dynamic Section:
  RPATH        $ORIGIN/../../codecov_rs.libs
  NEEDED       libgcc_s-1e52349c.so.1
  NEEDED       libc.so
  SONAME       lib_bindings.so
...

v1.7.2 included #2219 which affects how RPATH is set and there's not much else in the release so the regression is probably caused by that? Not clear to me how, though, or why it's apparently musllinux-specific.

Your maturin version (maturin --version)

1.7.2

Your Python version (python -V)

3.12

Your pip version (pip -V)

24.0

What bindings you're using

pyo3

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

Sorry for the cop-out, but see the bug description.

@messense
Copy link
Member

Not clear to me how, though, or why it's apparently musllinux-specific.

Because glibc targets doesn't need to bundle these dylib dependencies.

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

Successfully merging a pull request may close this issue.

2 participants