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

Unable to build for arm64_32-apple-watchos #111217

Closed
AnLUFan opened this issue May 4, 2023 · 5 comments
Closed

Unable to build for arm64_32-apple-watchos #111217

AnLUFan opened this issue May 4, 2023 · 5 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-watchos Operating System: watchOS P-low Low priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@AnLUFan
Copy link

AnLUFan commented May 4, 2023

Code

Unmodified cargo init --lib

Meta

rustc +nightly --version --verbose:

rustc 1.71.0-nightly (a368898de 2023-05-02)
binary: rustc
commit-hash: a368898de758e1b8def6c9060044a5b40eb79e84
commit-date: 2023-05-02
host: aarch64-apple-darwin
release: 1.71.0-nightly
LLVM version: 16.0.2

Error output

thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unimplemented architecture Aarch64_Ilp32")', compiler/rustc_codegen_ssa/src/back/metadata.rs:290:19
Backtrace

RUST_BACKTRACE=1 cargo +nightly build -Z build-std --target arm64_32-apple-watchos
   Compiling core v0.0.0 (/Users/REDACTED/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core)
   Compiling rustc-std-workspace-core v1.99.0 (/Users/REDACTED/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling compiler_builtins v0.1.91
   Compiling libc v0.2.142
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unimplemented architecture Aarch64_Ilp32")', compiler/rustc_codegen_ssa/src/back/metadata.rs:290:19
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_codegen_ssa::back::metadata::create_wrapper_file
   4: rustc_codegen_ssa::back::link::link_rlib
   5: rustc_codegen_ssa::back::link::link_binary
   6: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::link
   7: <rustc_interface::queries::Linker>::link
   8: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.71.0-nightly (a368898de 2023-05-02) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `rustc-std-workspace-core` (lib)
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unimplemented architecture Aarch64_Ilp32")', compiler/rustc_codegen_ssa/src/back/metadata.rs:290:19
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_codegen_ssa::back::metadata::create_wrapper_file
   4: rustc_codegen_ssa::back::link::link_rlib
   5: rustc_codegen_ssa::back::link::link_binary
   6: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::link
   7: <rustc_interface::queries::Linker>::link
   8: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.71.0-nightly (a368898de 2023-05-02) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `libc` (lib)
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unimplemented architecture Aarch64_Ilp32")', compiler/rustc_codegen_ssa/src/back/metadata.rs:290:19
stack backtrace:
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unimplemented architecture Aarch64_Ilp32")', compiler/rustc_codegen_ssa/src/back/metadata.rs:290:19
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_codegen_ssa::back::metadata::create_wrapper_file
   4: rustc_codegen_ssa::back::link::link_rlib
   5: rustc_codegen_ssa::back::link::link_binary
   6: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::link
   7: <rustc_interface::queries::Linker>::link
   8: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.71.0-nightly (a368898de 2023-05-02) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `compiler_builtins` (lib)
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_codegen_ssa::back::metadata::create_wrapper_file
   4: rustc_codegen_ssa::back::link::link_rlib
   5: rustc_codegen_ssa::back::link::link_binary
   6: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::link
   7: <rustc_interface::queries::Linker>::link
   8: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.71.0-nightly (a368898de 2023-05-02) running on aarch64-apple-darwin

note: compiler flags: --crate-type lib -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
error: could not compile `core` (lib)

@AnLUFan AnLUFan added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 4, 2023
@jyn514
Copy link
Member

jyn514 commented May 4, 2023

arm64_32-apple-watchos is a tier 3 target. Generally we do not support tier 3, although we do take patches fixing bugs.

@jyn514 jyn514 added P-low Low priority O-watchos Operating System: watchOS labels May 4, 2023
@workingjubilee
Copy link
Member

Now now, a very minimal amount of support is technically still support!

More to the point, this is something that the target maintainers are probably best equipped to help with: @deg4uss3r @vladimir-ea

Is this a regression? Did this work before?

@vladimir-ea
Copy link
Contributor

Thanks for raising @AnLUFan and thanks for tagging me @workingjubilee

This does appear to be a regression caused by:

commit a529ba8
Author: Amanieu d'Antras
Date: 09/01/2023, 17:49

Fix aarch64-unknown-linux-gnu_ilp32 target This was broken because the synthetic object files produced by rustc were for 64-bit AArch64, which caused link failures when combined with 32-bit ILP32 object files. This PR updates the object crate to 0.30.1 which adds support for generating ILP32 AArch64 object files.

Specifically this change to compiler/rustc_codegen_ssa/src/back/metadata.rs

Screenshot 2023-05-05 at 09 56 52

I will see if I can fix.

@workingjubilee workingjubilee added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label May 5, 2023
@workingjubilee
Copy link
Member

workingjubilee commented May 5, 2023

...might be a stable to stable regression actually, with that age, but whatevs! Kiiinda hard to use a tier 3 target with a stable compiler in any case.

vladimir-ea added a commit to vladimir-ea/rust that referenced this issue May 5, 2023
vladimir-ea added a commit to vladimir-ea/object that referenced this issue May 5, 2023
vladimir-ea added a commit to vladimir-ea/object that referenced this issue May 8, 2023
@workingjubilee
Copy link
Member

#111413 is in and this currently seems to successfully build. Thank you everyone! I will close this.

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. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-watchos Operating System: watchOS P-low Low priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. 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

4 participants