Skip to content

Linker error when using Rust 1.89.0 targeting Android #3565

@UebelAndre

Description

@UebelAndre

Observed when implementing #3562

>>> referenced by alloc.rs:94 (library/alloc/src/alloc.rs:94)
>>>               std-49a654fb68df8348.std.b9ec7a62a4fcada1-cgu.0.rcgu.o:(core::ops::function::FnOnce::call_once::h155c34b978aac7b1) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/libstd-49a654fb68df8348.a
>>> referenced 133 more times
ld.lld: error: undefined symbol: __rustc::__rust_realloc
>>> referenced by alloc.rs:134 (library/alloc/src/alloc.rs:134)
>>>               std-49a654fb68df8348.std.b9ec7a62a4fcada1-cgu.0.rcgu.o:(core::cell::once::OnceCell$LT$T$GT$::try_init::h1783a7f459e36c01) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/libstd-49a654fb68df8348.a
>>> referenced by alloc.rs:134 (library/alloc/src/alloc.rs:134)
>>>               std-49a654fb68df8348.std.b9ec7a62a4fcada1-cgu.0.rcgu.o:(core::cell::once::OnceCell$LT$T$GT$::try_init::h1783a7f459e36c01) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/libstd-49a654fb68df8348.a
>>> referenced by alloc.rs:134 (library/alloc/src/alloc.rs:134)
>>>               std-49a654fb68df8348.std.b9ec7a62a4fcada1-cgu.0.rcgu.o:(core::cell::once::OnceCell$LT$T$GT$::try_init::h1783a7f459e36c01) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/libstd-49a654fb68df8348.a
>>> referenced 18 more times
ld.lld: error: undefined symbol: __rustc::__rust_alloc_error_handler_should_panic
>>> referenced by alloc.rs:355 (library/std/src/alloc.rs:355)
>>>               std-49a654fb68df8348.std.b9ec7a62a4fcada1-cgu.0.rcgu.o:(std::alloc::default_alloc_error_hook::hf3380f9b4a93075f) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/libstd-49a654fb68df8348.a
>>> referenced by alloc.rs:355 (library/std/src/alloc.rs:355)
>>>               std-49a654fb68df8348.std.b9ec7a62a4fcada1-cgu.0.rcgu.o:(std::alloc::default_alloc_error_hook::hf3380f9b4a93075f) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/libstd-49a654fb68df8348.a
>>> referenced by alloc.rs:435 (library/alloc/src/alloc.rs:435)
>>>               alloc-1a248dfad3948912.alloc.18157a76ff4320ab-cgu.0.rcgu.o:(__rustc::__rdl_oom) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/liballoc-1a248dfad3948912.a
>>> referenced 1 more times
ld.lld: error: undefined symbol: __rustc::__rust_alloc_zeroed
>>> referenced by alloc.rs:177 (library/alloc/src/alloc.rs:177)
>>>               std-49a654fb68df8348.std.b9ec7a62a4fcada1-cgu.0.rcgu.o:(std::backtrace_rs::symbolize::gimli::stash::Stash::allocate::hd95f7fff544bf5ce) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/libstd-49a654fb68df8348.a
>>> referenced by gimli.ce0e178c805f5022-cgu.0
>>>               gimli-91f02f63e85cf7d9.gimli.ce0e178c805f5022-cgu.0.rcgu.o:(alloc::raw_vec::RawVecInner$LT$A$GT$::try_allocate_in::h5869044978cd47e8) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/libgimli-91f02f63e85cf7d9.a
ld.lld: error: undefined symbol: __rustc::__rust_alloc_error_handler
>>> referenced by alloc.rs:406 (library/alloc/src/alloc.rs:406)
>>>               alloc-1a248dfad3948912.alloc.18157a76ff4320ab-cgu.0.rcgu.o:(alloc::alloc::handle_alloc_error::hd68963146d5af4b4) in archive bazel-out/darwin_arm64-fastbuild-android-ST-190b1649d98b/bin/external/rules_rust++rust+rust_macos_aarch64__aarch64-linux-android__stable_tools/lib/rustlib/aarch64-linux-android/lib/liballoc-1a248dfad3948912.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)

https://buildkite.com/bazel/rules-rust-rustlang/builds/15278/steps/canvas?sid=0198d2b0-5a0c-4a02-8809-f72409522d10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions