Skip to content

Linking against libpanic_unwind failed on macos due to lib.rmeta being unrecognizable by ld #107252

@NobodyXu

Description

@NobodyXu

The CI of jobslot failed when linking against libpanic_unwind on macos:

  = note: ld: in /Users/runner/.rustup/toolchains/1.52-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-2fe2b8cd4fa63c34.rlib(lib.rmeta), archive member 'lib.rmeta' with length 35552 is not mach-o or llvm bitcode file '/Users/runner/.rustup/toolchains/1.52-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-2fe2b8cd4fa63c34.rlib'
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Meta

cargo toolchain installed via rustup:

1.52-x86_64-apple-darwin

GHA runner info:

Current runner version: '2.300.2'
Operating System
  macOS
  12.6.2
  21G320
Runner Image
  Image: macos-12
  Version: 20230117.3
  Included Software: https://github.com/actions/runner-images/blob/macOS-12/20230117.3/images/macos/macos-12-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20230117.3
Runner Image Provisioner
  2.0.98.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions