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

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

Open
madsmtm opened this issue Sep 7, 2024 · 2 comments
Open

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

madsmtm opened this issue Sep 7, 2024 · 2 comments
Labels
C-bug Category: This is a bug. O-AArch64 Armv8-A or later processors in AArch64 mode O-ios Operating system: iOS O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@madsmtm
Copy link
Contributor

madsmtm commented Sep 7, 2024

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.

@madsmtm madsmtm added the C-bug Category: This is a bug. label Sep 7, 2024
@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. O-ios Operating system: iOS O-macos Operating system: macOS O-AArch64 Armv8-A or later processors in AArch64 mode labels Sep 7, 2024
@jieyouxu jieyouxu added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 7, 2024
@BlackHoleFox
Copy link
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.

workingjubilee added a commit to workingjubilee/rustc that referenced this issue Sep 9, 2024
…jieyouxu

Test codegen when setting deployment target

Test our codegen in different scenarios when setting the deployment target. There are many places here where this is still incorrect, these will be fixed in rust-lang#129342, rust-lang#129367 and rust-lang#129369. See rust-lang#129432 for the bigger picture.

Tested locally using:
```console
./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7s-apple-ios,i386-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin"
```

The only Apple targets that aren't tested by the above command are:
- `arm64e-apple-darwin`, failed to build, see rust-lang/cc-rs#1205.
- `armv7k-apple-watchos`, failed to link, see rust-lang#130071.
- `arm64e-apple-ios`, failed to link, see rust-lang#130085.
- `i686-apple-darwin`, requires a bit of setup and an older machine, see [the docs](https://doc.rust-lang.org/nightly/rustc/platform-support/i686-apple-darwin.html).
- `i386-apple-ios` requires you to set `IPHONEOS_DEPLOYMENT_TARGET=10.0` for the test helpers to work, will be fixed by rust-lang/cc-rs#1030.

But all of this is as it was before this PR.

Fixes rust-lang#47825, since we now have a test that compiles a `dylib` for `aarch64-apple-ios`.

Split out from rust-lang#129342, see that for a little bit of the review that this has gone through already.

r? petrochenkov

`@rustbot` label O-apple
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Sep 9, 2024
…jieyouxu

Test codegen when setting deployment target

Test our codegen in different scenarios when setting the deployment target. There are many places here where this is still incorrect, these will be fixed in rust-lang#129342, rust-lang#129367 and rust-lang#129369. See rust-lang#129432 for the bigger picture.

Tested locally using:
```console
./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7s-apple-ios,i386-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin"
```

The only Apple targets that aren't tested by the above command are:
- `arm64e-apple-darwin`, failed to build, see rust-lang/cc-rs#1205.
- `armv7k-apple-watchos`, failed to link, see rust-lang#130071.
- `arm64e-apple-ios`, failed to link, see rust-lang#130085.
- `i686-apple-darwin`, requires a bit of setup and an older machine, see [the docs](https://doc.rust-lang.org/nightly/rustc/platform-support/i686-apple-darwin.html).
- `i386-apple-ios` requires you to set `IPHONEOS_DEPLOYMENT_TARGET=10.0` for the test helpers to work, will be fixed by rust-lang/cc-rs#1030.

But all of this is as it was before this PR.

Fixes rust-lang#47825, since we now have a test that compiles a `dylib` for `aarch64-apple-ios`.

Split out from rust-lang#129342, see that for a little bit of the review that this has gone through already.

r? petrochenkov

``@rustbot`` label O-apple
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Sep 9, 2024
…jieyouxu

Test codegen when setting deployment target

Test our codegen in different scenarios when setting the deployment target. There are many places here where this is still incorrect, these will be fixed in rust-lang#129342, rust-lang#129367 and rust-lang#129369. See rust-lang#129432 for the bigger picture.

Tested locally using:
```console
./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7s-apple-ios,i386-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin"
```

The only Apple targets that aren't tested by the above command are:
- `arm64e-apple-darwin`, failed to build, see rust-lang/cc-rs#1205.
- `armv7k-apple-watchos`, failed to link, see rust-lang#130071.
- `arm64e-apple-ios`, failed to link, see rust-lang#130085.
- `i686-apple-darwin`, requires a bit of setup and an older machine, see [the docs](https://doc.rust-lang.org/nightly/rustc/platform-support/i686-apple-darwin.html).
- `i386-apple-ios` requires you to set `IPHONEOS_DEPLOYMENT_TARGET=10.0` for the test helpers to work, will be fixed by rust-lang/cc-rs#1030.

But all of this is as it was before this PR.

Fixes rust-lang#47825, since we now have a test that compiles a `dylib` for `aarch64-apple-ios`.

Split out from rust-lang#129342, see that for a little bit of the review that this has gone through already.

r? petrochenkov

```@rustbot``` label O-apple
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Sep 9, 2024
Rollup merge of rust-lang#130068 - madsmtm:deployment-target-test, r=jieyouxu

Test codegen when setting deployment target

Test our codegen in different scenarios when setting the deployment target. There are many places here where this is still incorrect, these will be fixed in rust-lang#129342, rust-lang#129367 and rust-lang#129369. See rust-lang#129432 for the bigger picture.

Tested locally using:
```console
./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7s-apple-ios,i386-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin"
```

The only Apple targets that aren't tested by the above command are:
- `arm64e-apple-darwin`, failed to build, see rust-lang/cc-rs#1205.
- `armv7k-apple-watchos`, failed to link, see rust-lang#130071.
- `arm64e-apple-ios`, failed to link, see rust-lang#130085.
- `i686-apple-darwin`, requires a bit of setup and an older machine, see [the docs](https://doc.rust-lang.org/nightly/rustc/platform-support/i686-apple-darwin.html).
- `i386-apple-ios` requires you to set `IPHONEOS_DEPLOYMENT_TARGET=10.0` for the test helpers to work, will be fixed by rust-lang/cc-rs#1030.

But all of this is as it was before this PR.

Fixes rust-lang#47825, since we now have a test that compiles a `dylib` for `aarch64-apple-ios`.

Split out from rust-lang#129342, see that for a little bit of the review that this has gone through already.

r? petrochenkov

```@rustbot``` label O-apple
RalfJung pushed a commit to RalfJung/miri that referenced this issue Sep 10, 2024
Test codegen when setting deployment target

Test our codegen in different scenarios when setting the deployment target. There are many places here where this is still incorrect, these will be fixed in rust-lang/rust#129342, rust-lang/rust#129367 and rust-lang/rust#129369. See rust-lang/rust#129432 for the bigger picture.

Tested locally using:
```console
./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7s-apple-ios,i386-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin"
```

The only Apple targets that aren't tested by the above command are:
- `arm64e-apple-darwin`, failed to build, see rust-lang/cc-rs#1205.
- `armv7k-apple-watchos`, failed to link, see rust-lang/rust#130071.
- `arm64e-apple-ios`, failed to link, see rust-lang/rust#130085.
- `i686-apple-darwin`, requires a bit of setup and an older machine, see [the docs](https://doc.rust-lang.org/nightly/rustc/platform-support/i686-apple-darwin.html).
- `i386-apple-ios` requires you to set `IPHONEOS_DEPLOYMENT_TARGET=10.0` for the test helpers to work, will be fixed by rust-lang/cc-rs#1030.

But all of this is as it was before this PR.

Fixes rust-lang/rust#47825, since we now have a test that compiles a `dylib` for `aarch64-apple-ios`.

Split out from rust-lang/rust#129342, see that for a little bit of the review that this has gone through already.

r? petrochenkov

```@rustbot``` label O-apple
@arttet
Copy link
Contributor

arttet commented Sep 14, 2024

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

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Sep 27, 2024
…trochenkov

Move Apple linker args from `rustc_target` to `rustc_codegen_ssa`

They are dependent on the deployment target and SDK version, but having these in `rustc_target` makes it hard to introduce that dependency. Part of the work needed to do rust-lang#118204, see rust-lang#129342 for some discussion.

Tested using:
```console
./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7k-apple-watchos,armv7s-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin"
IPHONEOS_DEPLOYMENT_TARGET=10.0 ./x test tests/run-make/apple-deployment-target --target=i386-apple-ios
```

`arm64e-apple-darwin` and `arm64e-apple-ios` have not been tested, see rust-lang#130085, neither is `i686-apple-darwin`, since that requires using an x86_64 macbook, and I currently can't get mine to work, see rust-lang#130434.

CC `@petrochenkov`
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Sep 27, 2024
Rollup merge of rust-lang#130435 - madsmtm:move-apple-link-args, r=petrochenkov

Move Apple linker args from `rustc_target` to `rustc_codegen_ssa`

They are dependent on the deployment target and SDK version, but having these in `rustc_target` makes it hard to introduce that dependency. Part of the work needed to do rust-lang#118204, see rust-lang#129342 for some discussion.

Tested using:
```console
./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7k-apple-watchos,armv7s-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin"
IPHONEOS_DEPLOYMENT_TARGET=10.0 ./x test tests/run-make/apple-deployment-target --target=i386-apple-ios
```

`arm64e-apple-darwin` and `arm64e-apple-ios` have not been tested, see rust-lang#130085, neither is `i686-apple-darwin`, since that requires using an x86_64 macbook, and I currently can't get mine to work, see rust-lang#130434.

CC `@petrochenkov`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-AArch64 Armv8-A or later processors in AArch64 mode O-ios Operating system: iOS O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants