Skip to content

build error: generated a symlink in a tarball #135554

Closed

Description

@bryteise

When building rust-1.84.0 from the source tarball on Linux I'm seeing the following in a backtrace:

thread 'main' panicked at src/utils/tarball.rs:397:21: generated a symlink in a tarball: /builddir/build/BUILD/rustc-1.84.0-src/build/tmp/tarball/rustc/x86_64-unknown-linux-gnu/rustc-1.84.0-x86_64-unknown-linux-gnu/rustc/lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-objcopy

My config.toml has the following:

profile = "dist"
[llvm]
link-shared = true
download-ci-llvm = false
[build]
target = [
  "x86_64-unknown-linux-gnu",
  "i686-unknown-linux-gnu",
]
cargo = "/usr/bin/cargo"
rustc = "/usr/bin/rustc"
rustfmt = "/usr/bin/rustfmt"
locked-deps = true
vendor = true
tools = ["cargo", "clippy", "rustdoc", "rustfmt"]
sanitizers = true
profiler = true
docs = false
[install]
prefix = "/usr"
[rust]
codegen-units-std = 1
debuginfo-level = 1
debuginfo-level-std = 2
channel = "stable"
description = ""
rpath = false
frame-pointers = true
lld = false
use-lld = "external"
llvm-bitcode-linker = false
deny-warnings = false
backtrace-on-ice = true
remap-debuginfo = false
jemalloc = true
# codegen-tests depend on LLVM utils (FileCheck) we don't provide
codegen-tests = false

Looking at another issue I tried llvm-tools = false and hit a different issue:

src.symlink_metadata() failed with No such file or directory (os error 2) ("src = /builddir/build/BUILD/rustc-1.84.0-src/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-objcopy")

I'm inclined to just patch out the test for the symlink in the tarfile for now as that appears to be only there because of windows but this seems like a problem regardless.

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jan 15, 2025
  2. added
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    on Jan 16, 2025
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jan 16, 2025
  4. onur-ozkan commented on Jan 16, 2025

    @onur-ozkan
    Contributor

    We should resolve symlinks before adding them to tarballs. I plan to submit a PR for this in a few hours.

  5. changed the title [-]1.84.0 profile="dist" build error: generated a symlink in a tarball[/-] [+]build error: generated a symlink in a tarball[/+] on Jan 16, 2025
  6. onur-ozkan commented on Jan 16, 2025

    @onur-ozkan
    Contributor

    You can cherry-pick #135585 until we backport it into the stable release.

  7. bryteise commented on Jan 16, 2025

    @bryteise
    Author

    Thanks!

  8. added a commit that references this issue on Jan 16, 2025
  9. added a commit that references this issue on Jan 17, 2025
  10. added this to the 1.84.1 milestone on Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions