Skip to content

Apple arm64e targets fail to link with newer Xcode 15 #130085

Open
@madsmtm

Description

@madsmtm
Contributor

See tracking issue for these targets in #73628.

Building a project using the arm64e-apple-ios target fails to link when using Xcode 15.4. Using Xcode 14.3.1 works.

This might also be the case for arm64e-apple-darwin, but I can't test that due to rust-lang/cc-rs#1205.

$ cargo new foo && cd foo && cargo +nightly build --target=arm64e-apple-ios -Zbuild-std
// Or
$ ./x test --target=arm64e-apple-ios

The exact error is:

  = note: ld: warning: search path '$HOME/.rustup/toolchains/nightly-2024-01-15-aarch64-apple-darwin/lib/rustlib/arm64e-apple-ios/lib' not found
          ld: warning: search path '$HOME/.rustup/toolchains/nightly-2024-01-15-aarch64-apple-darwin/lib/rustlib/arm64e-apple-ios/lib' not found
          ld: warning: ignoring file '/private/var/folders/0j/tk3sfgz540712zgqd1hrry0m0000gn/T/rustcMbh3OI/symbols.o': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/foo-fd00ad1dff52af6b.26sqj2knsb351po8.rcgu.o': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/foo-fd00ad1dff52af6b.3mx9ar89kmsx5j1l.rcgu.o': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/foo-fd00ad1dff52af6b.45hdsivk0rjaalqm.rcgu.o': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/foo-fd00ad1dff52af6b.44zwmgr66v8ihk0u.rcgu.o': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libpanic_unwind-f79c716b594cd87d.rlib[3](panic_unwind-f79c716b594cd87d.panic_unwind.b0d5fa77f79efb86-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libpanic_unwind-f79c716b594cd87d.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/foo-fd00ad1dff52af6b.5dkwtrczm5qjphu6.rcgu.o': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/foo-fd00ad1dff52af6b.42cln6of8os0f9gy.rcgu.o': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/foo-fd00ad1dff52af6b.3d02ymmiyeu3vpo7.rcgu.o': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libaddr2line-fb1df4cdd978991d.rlib[3](addr2line-fb1df4cdd978991d.addr2line.b32b3d1578f40f68-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libaddr2line-fb1df4cdd978991d.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/librustc_demangle-070595bb373ffce1.rlib[4](rustc_demangle-070595bb373ffce1.rustc_demangle.319f1cf397a9ecca-cgu.1.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/librustc_demangle-070595bb373ffce1.rlib[3](rustc_demangle-070595bb373ffce1.rustc_demangle.319f1cf397a9ecca-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd_detect-72eccc55aeb6dc6e.rlib[3](std_detect-72eccc55aeb6dc6e.std_detect.b917a1edde698b77-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/foo-fd00ad1dff52af6b.529zhzjdbavai3fn.rcgu.o': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libadler-2503ee2f726d439b.rlib[3](adler-2503ee2f726d439b.adler.9aa407738f930ee2-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libminiz_oxide-d07b686f8d54a430.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libmemchr-075960409c25bbb9.rlib[3](memchr-075960409c25bbb9.memchr.adf4ce8aa7930ef2-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/librustc_demangle-070595bb373ffce1.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/librustc_std_workspace_alloc-d4a4490e1effb483.rlib[3](rustc_std_workspace_alloc-d4a4490e1effb483.rustc_std_workspace_alloc.2e3ab25734ed68d6-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libadler-2503ee2f726d439b.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libhashbrown-e6b966447a347358.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libminiz_oxide-d07b686f8d54a430.rlib[3](miniz_oxide-d07b686f8d54a430.miniz_oxide.c3e4f4e376ceb04b-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/librustc_std_workspace_alloc-d4a4490e1effb483.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libunwind-8017996f774c6593.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libunwind-8017996f774c6593.rlib[3](unwind-8017996f774c6593.unwind.e4507e56c8db69a9-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libhashbrown-e6b966447a347358.rlib[3](hashbrown-e6b966447a347358.hashbrown.2979a5dc0df80385-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libmemchr-075960409c25bbb9.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libgimli-9049beec931fd184.rlib[7](gimli-9049beec931fd184.gimli.291f80e1c06160d3-cgu.4.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libgimli-9049beec931fd184.rlib[6](gimli-9049beec931fd184.gimli.291f80e1c06160d3-cgu.3.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd_detect-72eccc55aeb6dc6e.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/librustc_std_workspace_core-57c9b9461bb0a02d.rlib[3](rustc_std_workspace_core-57c9b9461bb0a02d.rustc_std_workspace_core.2cc70b459bc5d55b-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcfg_if-ab04255e62dd4d18.rlib[3](cfg_if-ab04255e62dd4d18.cfg_if.9512f2fb5bcdd678-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libobject-8770e67c8539abe4.rlib[5](object-8770e67c8539abe4.object.58425892dede8931-cgu.2.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/liblibc-e3f8a8bc867e7d2f.rlib[3](libc-e3f8a8bc867e7d2f.libc.565c562bf8166800-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/liblibc-e3f8a8bc867e7d2f.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libgimli-9049beec931fd184.rlib[5](gimli-9049beec931fd184.gimli.291f80e1c06160d3-cgu.2.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcompiler_builtins-ce1cb3c3fce0a16d.rlib[5](compiler_builtins-ce1cb3c3fce0a16d.compiler_builtins.6948197a790d2fa7-cgu.2.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcfg_if-ab04255e62dd4d18.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libgimli-9049beec931fd184.rlib[4](gimli-9049beec931fd184.gimli.291f80e1c06160d3-cgu.1.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libgimli-9049beec931fd184.rlib[3](gimli-9049beec931fd184.gimli.291f80e1c06160d3-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/liballoc-85c3b697c47ff844.rlib[6](alloc-85c3b697c47ff844.alloc.2bb4af1538dd142e-cgu.3.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[18](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.15.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libobject-8770e67c8539abe4.rlib[4](object-8770e67c8539abe4.object.58425892dede8931-cgu.1.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[17](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.14.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcompiler_builtins-ce1cb3c3fce0a16d.rlib[4](compiler_builtins-ce1cb3c3fce0a16d.compiler_builtins.6948197a790d2fa7-cgu.1.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcompiler_builtins-ce1cb3c3fce0a16d.rlib[3](compiler_builtins-ce1cb3c3fce0a16d.compiler_builtins.6948197a790d2fa7-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libobject-8770e67c8539abe4.rlib[3](object-8770e67c8539abe4.object.58425892dede8931-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[16](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.13.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcompiler_builtins-ce1cb3c3fce0a16d.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libobject-8770e67c8539abe4.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libgimli-9049beec931fd184.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/librustc_std_workspace_core-57c9b9461bb0a02d.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[15](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.12.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[14](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.11.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[13](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.10.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[12](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.09.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[11](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.08.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[10](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.07.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[9](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.06.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[8](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.05.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[7](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.04.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[6](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.03.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[5](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.02.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[4](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.01.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[3](std-e730827ac25e8eb8.std.390e242b97fa85e2-cgu.00.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libstd-e730827ac25e8eb8.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/liballoc-85c3b697c47ff844.rlib[5](alloc-85c3b697c47ff844.alloc.2bb4af1538dd142e-cgu.2.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/liballoc-85c3b697c47ff844.rlib[4](alloc-85c3b697c47ff844.alloc.2bb4af1538dd142e-cgu.1.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/liballoc-85c3b697c47ff844.rlib[3](alloc-85c3b697c47ff844.alloc.2bb4af1538dd142e-cgu.0.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/liballoc-85c3b697c47ff844.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[18](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.15.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[17](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.14.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[16](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.13.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[15](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.12.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[14](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.11.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[13](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.10.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[12](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.09.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[11](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.08.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[10](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.07.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[9](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.06.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[8](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.05.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[7](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.04.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[6](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.03.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[5](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.02.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[4](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.01.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[3](core-8349edf93c8d5e6a.core.b68d8c8fce132d46-cgu.00.rcgu.o)': found architecture 'arm64e.old', required architecture 'arm64e'
          ld: warning: ignoring file '$PROJECT/target/arm64e-apple-ios/debug/deps/libcore-8349edf93c8d5e6a.rlib[2](lib.rmeta)': found architecture 'arm64e.old', required architecture 'arm64e'
          Undefined symbols for architecture arm64e:
            "_main", referenced from:
                <initial-undefines>
          ld: symbol(s) not found for architecture arm64e
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

I feel fairly confident that we're passing the right arguments to the linker nowadays (this happens even with #129369), so I suspect it's the object files that we generate that's the problem somehow, but I may be mistaken?

Meta

rustc +nightly --version --verbose:

rustc 1.83.0-nightly (26b5599e4 2024-09-06)
binary: rustc
commit-hash: 26b5599e4d6ed2b45152c60493c1788c0a27533d
commit-date: 2024-09-06
host: aarch64-apple-darwin
release: 1.83.0-nightly
LLVM version: 19.1.0

Happens as far back as +nightly-2023-11-22, the day after the PR introducing these merged, so it's definitely due to changes in Xcode, not because of a regression in rustc.

@rustbot label O-ios O-macos O-AArch64

CC target maintainer @arttet.

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
O-iosOperating system: iOS
O-macosOperating system: macOS
O-AArch64Armv8-A or later processors in AArch64 mode
on Sep 7, 2024
added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Sep 7, 2024
BlackHoleFox

BlackHoleFox commented on Sep 8, 2024

@BlackHoleFox
Contributor

The .old prefix in the warnings getting spammed would seem to hint that Apple has added a new identifier or ABI version for the arm64e target? This seems to indicate its an upstream LLVM limitation, perhaps.

Firefox has patched their LLVM build to set the correct arch flags based on Apple's LLVM output.

added 3 commits that reference this issue on Sep 9, 2024

Rollup merge of rust-lang#130068 - madsmtm:deployment-target-test, r=…

6def68a

Rollup merge of rust-lang#130068 - madsmtm:deployment-target-test, r=…

c1604f7

Rollup merge of rust-lang#130068 - madsmtm:deployment-target-test, r=…

fd938c7
added a commit that references this issue on Sep 9, 2024
arttet

arttet commented on Sep 14, 2024

@arttet
Contributor

Hey @madsmtm,

You can handle it if you use the LLVM linker (lld).

--set rust.use-lld=true
./configure \
		--enable-option-checking \
		--enable-verbose-tests \
		--codegen-backends=llvm \
		--enable-codegen-tests \
		--enable-dist-src \
		--tools=cargo,clippy,rustdoc,rustfmt,rust-analyzer,analysis,src \
		--target=arm64e-apple-ios,aarch64-apple-ios,arm64e-apple-darwin,aarch64-apple-darwin \
		--set llvm.download-ci-llvm=true \
		--set build.verbose=0 \
		--set rust.channel=dev \
		--set rust.description="" \
		--set rust.use-lld=true \
		--dist-compression-formats=xz \
		--prefix=install

See llvm/llvm-project#79543

8 remaining items

Loading
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.O-AArch64Armv8-A or later processors in AArch64 modeO-iosOperating system: iOSO-macosOperating system: macOST-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

        Participants

        @madsmtm@BlackHoleFox@jieyouxu@rustbot@arttet

        Issue actions

          Apple arm64e targets fail to link with newer Xcode 15 · Issue #130085 · rust-lang/rust