Skip to content

tvOS unresolved import crate::sys::thread_local_dtor::register_dtor #116491

Closed
@simlay

Description

@simlay

Over in #104385, register_dtor was added for iOS and watchOS but not tvOS.

My test cases:

fn main() {
    println!("Hello, world!");
}

Using nightly-2023-09-24-aarch64-apple-darwin expected to see this build succeed:

$ cargo +nightly-2023-09-24-aarch64-apple-darwin build -Zbuild-std --target aarch64-apple-tvos
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s

Using nightly-2023-09-25-aarch64-apple-darwin, we see that it fails with unresolved import crate::sys::thread_local_dtor::register_dtor:

$ cargo +nightly-2023-09-25-aarch64-apple-darwin build -Zbuild-std --target aarch64-apple-tvos
   Compiling compiler_builtins v0.1.101
   Compiling libc v0.2.148
   Compiling cc v1.0.79
   Compiling memchr v2.5.0
   Compiling unwind v0.0.0 (/Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/unwind)
   Compiling std v0.0.0 (/Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/std)
   Compiling alloc v0.0.0 (/Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc)
   Compiling cfg-if v1.0.0
   Compiling adler v1.0.2
   Compiling rustc-demangle v0.1.23
   Compiling rustc-std-workspace-alloc v1.99.0 (/Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/rustc-std-workspace-alloc)
   Compiling panic_abort v0.0.0 (/Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/panic_abort)
   Compiling panic_unwind v0.0.0 (/Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/panic_unwind)
   Compiling gimli v0.28.0
   Compiling hashbrown v0.14.0
   Compiling object v0.32.0
   Compiling miniz_oxide v0.7.1
   Compiling std_detect v0.1.5 (/Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/stdarch/crates/std_detect)
   Compiling addr2line v0.21.0
error[E0432]: unresolved import `crate::sys::thread_local_dtor::register_dtor`
  --> /Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/common/thread_local/fast_local.rs:3:5
   |
3  | use crate::sys::thread_local_dtor::register_dtor;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `register_dtor` in `sys::unix::thread_local_dtor`
   |
note: found an item that was configured out
  --> /Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/unix/thread_local_dtor.rs:15:15
   |
15 | pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
   |               ^^^^^^^^^^^^^
note: found an item that was configured out
  --> /Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/unix/thread_local_dtor.rs:52:15
   |
52 | pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
   |               ^^^^^^^^^^^^^
note: found an item that was configured out
  --> /Users/sebastian.imlay/.rustup/toolchains/nightly-2023-09-25-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/unix/thread_local_dtor.rs:88:15
   |
88 | pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
   |               ^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0432`.
error: could not compile `std` (lib) due to previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-tvosOperating system: tvOS (including simulator)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions