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

PowerPC binary build failure "relocation truncated to fit: R_PPC64_REL24" #9793

Open
zanieb opened this issue Dec 11, 2024 · 8 comments
Open

Comments

@zanieb
Copy link
Member

zanieb commented Dec 11, 2024

The build failed during linking with

libthread_local-14bdf71b2f8c428a.rlib(thread_local-14bdf71b2f8c428a.thread_local.9165f86b66b4614-cgu.0.rcgu.o): in function `thread_local::thread_id::get_slow':
          thread_local.9165f86b66b4614-cgu.0:(.text.unlikely._ZN12thread_local9thread_id8get_slow17h6b636cdf3f4cc69eE+0x250): relocation truncated to fit: R_PPC64_REL24 against symbol `__tls_get_addr' defined in .text.__tls_get_addr section in /usr/local/musl/bin/../lib/gcc/powerpc64le-unknown-linux-musl/11.2.0/../../../../powerpc64le-unknown-linux-musl/lib/libc.a(__tls_get_addr.lo)
          /home/runner/work/uv/uv/target/powerpc64le-unknown-linux-musl/release-no-lto/deps/libuv_installer-2b553695d2f31d2e.rlib(uv_installer-2b553695d2f31d2e.uv_installer.2988552f99df20af-cgu.04.rcgu.o): in function `std::sys::thread_local::native::lazy::Storage<T,D>::initialize':
          uv_installer.2988552f99df20af-cgu.04:(.text.unlikely._ZN3std3sys12thread_local6native4lazy20Storage$LT$T$C$D$GT$10initialize17hc81f5ebe44f2f56dE+0x34): relocation truncated to fit: R_PPC64_REL24 against symbol `__tls_get_addr' defined in .text.__tls_get_addr section in /usr/local/musl/bin/../lib/gcc/powerpc64le-unknown-linux-musl/11.2.0/../../../../powerpc64le-unknown-linux-musl/lib/libc.a(__tls_get_addr.lo)
          /home/runner/work/uv/uv/target/powerpc64le-unknown-linux-musl/release-no-lto/deps/libuv_installer-2b553695d2f31d2e.rlib(uv_installer-2b553695d2f31d2e.uv_installer.2988552f99df20af-cgu.10.rcgu.o): in function `rayon_core::registry::Registry::in_worker_cold':
          uv_installer.2988552f99df20af-cgu.10:(.text.unlikely._ZN10rayon_core8registry8Registry14in_worker_cold17h7266177902601b2eE+0x2c): relocation truncated to fit: R_PPC64_REL24 against symbol `__tls_get_addr' defined in .text.__tls_get_addr section in /usr/local/musl/bin/../lib/gcc/powerpc64le-unknown-linux-musl/11.2.0/../../../../powerpc64le-unknown-linux-musl/lib/libc.a(__tls_get_addr.lo)
          collect2: error: ld returned 1 exit status

ref https://github.com/astral-sh/uv/actions/runs/12265976138/job/34223179814?pr=9791

See https://stackoverflow.com/questions/10486116/what-does-this-gcc-error-relocation-truncated-to-fit-mean

@zanieb
Copy link
Member Author

zanieb commented Dec 11, 2024

Attempting a fix by changing some compiler flags

In most of these, I'm just trying to get the flag past Maturin in various ways. Not sure if it's working at all; e.g., the rustc call does not include the flags

Caused by: Cargo build finished with "exit status: 101": env -u CARGO "cargo" "rustc" "--profile" "release-no-lto" "--features" "self-update" "--target" "powerpc64le-unknown-linux-musl" "--message-format" "json-render-diagnostics" "--locked" "--manifest-path" "/home/runner/work/uv/uv/crates/uv/Cargo.toml" "--bin" "uv" "--" "-C" "strip=symbols"

edit: At least in some of these it looks like I was editing the gnu job instead of the musl cross job; see #9793 (comment) instead

@zanieb
Copy link
Member Author

zanieb commented Dec 11, 2024

Also tried

@zanieb
Copy link
Member Author

zanieb commented Dec 11, 2024

I got the compiler flags to go through, but they don't solve the issue

  • -Crelocation-model=pic -Clink-args=-Wl,-z,notext (0e0fd1d)
  • -Crelocation-model=pic -Clink-args=-Wl,-z,notext -Ccode-model=large" (0e0fd1d)
  • -Ctarget-feature=+crt-static(3842d88)
  • -Ccode-model=large (441ca34)
  • -Clink-args=-Wl,-z,notls (ca8f7b0)

@zanieb
Copy link
Member Author

zanieb commented Dec 11, 2024

The trace suggests some sort of interaction between uv-installer, rayon, and tracing-subscriber

@zanieb
Copy link
Member Author

zanieb commented Dec 11, 2024

The cross-build Docker image (ghcr.io/rust-cross/rust-musl-cross:powerpc64le-musl) is identical

@zanieb
Copy link
Member Author

zanieb commented Dec 11, 2024

I re-ran the 0.5.7 version bump CI job to see if that would still pass https://github.com/astral-sh/uv/actions/runs/12207650814 — it succeeded so sanity prevails and it is some sort of regression.

@zanieb
Copy link
Member Author

zanieb commented Dec 11, 2024

I think the next step is to do a bisect, though I suspect we've just reached some threshold of complexity that the linker has problems with on powerpc.

I briefly looked at the download stats for this artifact and they're low but non-zero.

As a drastic step, I think we could turn of tracing for this target? But that seems pretty invasive.

charliermarsh added a commit that referenced this issue Dec 11, 2024
## Summary

This is blocking the release (#9793). We seem to have hit some sort of
limit that's causing builds to fail on this target. It's a Tier 3 Rust
target with _unknown_ (???) `std` support (see the question mark
[here](https://doc.rust-lang.org/rustc/platform-support.html)).
@zanieb
Copy link
Member Author

zanieb commented Dec 11, 2024

We are going to drop support for now, see #9810

zanieb added a commit that referenced this issue Dec 11, 2024
This reverts commit 6cc7a56 to reapply
#9511 since we've disabled ppc64le-musl per #9793
tmeijn pushed a commit to tmeijn/dotfiles that referenced this issue Dec 12, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.5.7` -> `0.5.8` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.5.8`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#058)

[Compare Source](astral-sh/uv@0.5.7...0.5.8)

**This release does not include the `powerpc64le-unknown-linux-musl` target due to a build issue. See [#&#8203;9793](astral-sh/uv#9793) for details. If this change affects you, please file an issue with your use-case.**

##### Enhancements

-   Omit empty resolution markers in lockfile  ([#&#8203;9738](astral-sh/uv#9738))
-   Add `--install-dir` to to `uv python install` and `uninstall` commands ([#&#8203;7920](astral-sh/uv#7920))
-   Add `--show-urls` and `--only-downloads` to `uv python list` ([#&#8203;8062](astral-sh/uv#8062))
-   Add `uv python list --all-arches` ([#&#8203;9782](astral-sh/uv#9782))
-   Add `uv run --gui-script` flag for running Python scripts with `pythonw.exe` ([#&#8203;9152](astral-sh/uv#9152))
-   Allow `--gui-script` on Unix ([#&#8203;9787](astral-sh/uv#9787))
-   Allow download of Python distribution variants optimized for newer x86\_64 microarchitectures ([#&#8203;9781](astral-sh/uv#9781))
-   Allow execution of `pyw` files on Unix ([#&#8203;9759](astral-sh/uv#9759))
-   Allow users to specify URLs in `project.dependencies` and `tool.uv.sources` ([#&#8203;9718](astral-sh/uv#9718))
-   Encode mutually-incompatible pairs of markers ([#&#8203;9444](astral-sh/uv#9444))
-   Improve the error message when a Python install request is not valid ([#&#8203;9783](astral-sh/uv#9783))
-   Preserve directory-level standalone build symlinks ([#&#8203;9723](astral-sh/uv#9723))
-   Add support for `uv publish --index <name>` ([#&#8203;9694](astral-sh/uv#9694))
-   Reframe `--locked` and `--frozen` as `--check` operations for `uv lock` ([#&#8203;9662](astral-sh/uv#9662))
-   Rename Python install scratch directory from `.cache` -> `.temp` ([#&#8203;9756](astral-sh/uv#9756))
-   Enable `uv tool uninstall uv` on Windows ([#&#8203;8963](astral-sh/uv#8963))
-   Improve self-dependency hint to make shadowing clear ([#&#8203;9716](astral-sh/uv#9716))
-   Refactor unavailable metadata to shrink the resolver ([#&#8203;9769](astral-sh/uv#9769))
-   Show 'depends on itself' for proxy packages ([#&#8203;9717](astral-sh/uv#9717))
-   Show a dedicated error for missing subdirectories ([#&#8203;9761](astral-sh/uv#9761))
-   Show a dedicated hint for missing `git+` prefixes ([#&#8203;9789](astral-sh/uv#9789))

##### Performance

-   Eagerly error when parsing `pyproject.toml` requirements ([#&#8203;9704](astral-sh/uv#9704))
-   Use copy-on-write when normalizing paths ([#&#8203;9710](astral-sh/uv#9710))

##### Bug fixes

-   Avoid enforcing non-conflicts in `uv export` ([#&#8203;9751](astral-sh/uv#9751))
-   Don't drop comments between items in TOML tables ([#&#8203;9784](astral-sh/uv#9784))
-   Don't fail with `--no-build` when static metadata is available ([#&#8203;9785](astral-sh/uv#9785))
-   Don't filter non-patch registry version ([#&#8203;9736](astral-sh/uv#9736))
-   Don't read metadata from stale `.egg-info` files ([#&#8203;9760](astral-sh/uv#9760))
-   Enforce correctness of self-dependencies ([#&#8203;9705](astral-sh/uv#9705))
-   Fix projects's typo in resolver error messages ([#&#8203;9708](astral-sh/uv#9708))
-   Ignore `.` prefixed directories during managed Python installation discovery ([#&#8203;9786](astral-sh/uv#9786))
-   Improve handling of invalid virtual environments during interpreter discovery ([#&#8203;8086](astral-sh/uv#8086))
-   Normalize relative paths when `--project` is specified ([#&#8203;9709](astral-sh/uv#9709))
-   Respect self-constraints on recursive extras ([#&#8203;9714](astral-sh/uv#9714))
-   Respect user settings for tracing coloring ([#&#8203;9733](astral-sh/uv#9733))
-   Retry on tar extraction errors ([#&#8203;9753](astral-sh/uv#9753))
-   Add conflict markers to the lock file ([#&#8203;9370](astral-sh/uv#9370))
-   De-duplicate resolution markers ([#&#8203;9780](astral-sh/uv#9780))
-   Avoid 403 error hint for PyTorch URLs ([#&#8203;9750](astral-sh/uv#9750))
-   Avoid treating non-existent `--find-links` as relative URLs ([#&#8203;9720](astral-sh/uv#9720))
-   Omit Windows Store `python3.13.exe` et al ([#&#8203;9679](astral-sh/uv#9679))
-   Replace executables with broken symlinks during `uv python install` ([#&#8203;9706](astral-sh/uv#9706))

##### Documentation

-   Fix build failure links ([#&#8203;9740](astral-sh/uv#9740))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant