Skip to content

Miri fails to link on macOS #153077

Description

@RalfJung

This night's CI run failed to link Miri on macOS:

  error: linking with `cc` failed: exit status: 1
    |
    = note:  "cc" "/Users/runner/work/miri/miri/target/release/deps/rustcCp3SzC/symbols.o" "<16 object files omitted>" "/Users/runner/work/miri/miri/target/release/deps/{libmiri-0677808f025590dc,libaes-09e9d28c6ff4e98b,libcipher-07a879939bb84157,libinout-9ac07fa210cb8e8c,libcrypto_common-20ba2c3c80de0c89,libgeneric_array-432515fad90ae2ef,libtypenum-1f710b46457a63cc,libdirectories-c8e97ef209ac03af,libdirs_sys-909fbb2d6ef5185a,liboption_ext-7ead06511e0a254d,liblibloading-eb30554de28b3c77,libmeasureme-361e730f14549109,librustc_hash-c691ea9089be4205,libparking_lot-ebbed55e476daba1,libparking_lot_core-7d42a1ba18cafe2b,liblock_api-044a4f7caf355672,libscopeguard-fe793b17e7b3ca9e,liblog-92cbfc272ac8f9f0,libchrono_tz-e7ec4315ddf96974,libphf-1c35e792ebb9c414,libphf_shared-9f1941949bec3b96,libsiphasher-b83ec05d6d146e9b,libchrono-1af576c490678ec0,libnum_traits-e195e779fdf5a3ad,libbitflags-c72cdb211a1a83d8,libserde-d33bf4120f04e612,libserde_core-7b485bd76c4c1521,liblibffi-c6363f8ec6cd29ac,liblibffi_sys-e1f822e8c8685318,libsmallvec-05f0212d13fce8ec,librand-aa6380c038c05e67,librand_chacha-d87eb525ac29daf0,libppv_lite86-798108eb2ef2c8b9,libzerocopy-a39d6e312cb19425,librand_core-d8ba3bb4449881d2,libgetrandom-38e7798d8a95fbc5,liblibc-c34cd58bbb393d67,libcfg_if-330c2477450fb8d5}.rlib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/librustc_driver-eb4552398d5d4c71.dylib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-*.rlib" "-liconv" "-lSystem" "-lSystem" "-lobjc" "-framework" "Foundation" "-lz" "-lLLVM-22-rust-1.95.0-nightly" "-lc++" "-liconv" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/runner/work/miri/miri/target/release/build/libffi-sys-b56f92500885a956/out/libffi-root/lib" "-L" "/Users/runner/work/miri/miri/target/release/build/libffi-sys-b56f92500885a956/out/libffi-root/lib32" "-L" "/Users/runner/work/miri/miri/target/release/build/libffi-sys-b56f92500885a956/out/libffi-root/lib64" "-o" "/Users/runner/work/miri/miri/target/release/deps/miri-eaa686b4b74c7c12" "-Wl,-dead_strip" "-nodefaultlibs" "-Wl,-rpath,<sysroot>/lib/rustlib/aarch64-apple-darwin/lib"
    = note: some arguments are omitted. use `--verbose` to show all linker arguments
    = note: ld: warning: ignoring duplicate libraries: '-lSystem', '-liconv'
            ld: warning: search path '/Users/runner/work/miri/miri/target/release/build/libffi-sys-b56f92500885a956/out/libffi-root/lib32' not found
            ld: warning: search path '/Users/runner/work/miri/miri/target/release/build/libffi-sys-b56f92500885a956/out/libffi-root/lib64' not found
            ld: library 'LLVM-22-rust-1.95.0-nightly' not found
            clang: error: linker command failed with exit code 1 (use -v to see invocation)

I so far have no clear idea for what changed where to cause this. @rust-lang/clippy is Clippy affected as well or do out-of-tree builds still work for you?

If the problem is caused by a rustc change, it's in this commit range: b3869b9...859951e.
My best guess is c033de9 which changed how LLVM is linked on the macOS dist builder which maybe could cause problems of this sort? No idea. That commit is part of #152768; Cc @ZuseZ4

Also Cc @bjorn3 for some more linker knowledge and @nikic since the error mentions LLVM.

Activity

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

    A-CIArea: Our Github Actions CIA-miriArea: The miri toolO-macosOperating system: macOSP-highHigh priorityT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions