Skip to content

IncompatibleSignature error when build-std targeting x86_64-unknown-linux-gnu ( but x86_64-unknown-linux-musl works ) #1597

@jyi2ya

Description

@jyi2ya

backtrace:

   Compiling rustc-std-workspace-core v1.99.0 (/home/jyi/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/home/jyi/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc)
   Compiling rustc-demangle v0.1.26
   Compiling cfg-if v1.0.1
   Compiling panic_abort v0.0.0 (/home/jyi/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort)

thread 'rustc' (1006399) panicked at compiler/rustc_codegen_cranelift/src/abi/mod.rs:183:81:
called `Result::unwrap()` on an `Err` value: IncompatibleSignature("__gttf2", Signature { params: [AbiParam { value_type: types::F128, purpose: Normal, extension: None }, AbiParam { value_type: types::F128, purpose: Normal, extension: None }], returns: [AbiParam { value_type: types::I64, purpose: Normal, extension: None }], call_conv: SystemV }, Signature { params: [AbiParam { value_type: types::F128, purpose: Normal, extension: None }, AbiParam { value_type: types::F128, purpose: Normal, extension: None }], returns: [AbiParam { value_type: types::I32, purpose: Normal, extension: None }], call_conv: SystemV })
stack backtrace:
   0:     0x7bd69cd855d3 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h97079290f23ad57c
   1:     0x7bd69d4020d8 - core::fmt::write::h03b7efc05382c63b
   2:     0x7bd69cd3a121 - std::io::Write::write_fmt::h9da0ff269e5ec4ee
   3:     0x7bd69cd4b572 - std::sys::backtrace::BacktraceLock::print::hb92f5fb1eea3a068
   4:     0x7bd69cd51409 - std::panicking::default_hook::{{closure}}::h819ab1a75f15e960
   5:     0x7bd69cd50f33 - std::panicking::default_hook::h3ad85c004ea00605
   6:     0x7bd69bd7d277 - std[f09c06a802cf9262]::panicking::update_hook::<alloc[42c7fd14e797ecf]::boxed::Box<rustc_driver_impl[a91cf1aa9f68fff8]::install_ice_hook::{closure#1}>>::{closure#0}
   7:     0x7bd69cd5182f - std::panicking::panic_with_hook::h90a51d287d53cf15
   8:     0x7bd69cd515ea - std::panicking::panic_handler::{{closure}}::h0bac72143ebe2ef8
   9:     0x7bd69cd4b6a9 - std::sys::backtrace::__rust_end_short_backtrace::h8da0d58ee8d12ab5
  10:     0x7bd69cd2c32d - __rustc[f0d13d4df6a562ff]::rust_begin_unwind
  11:     0x7bd699cf1a50 - core::panicking::panic_fmt::h7945300511b52bf7
  12:     0x7bd699744ef6 - core::result::unwrap_failed::ha3e7ba750291fc6c
  13:     0x7bd68b86378e - <rustc_codegen_cranelift[6894c6c7f611daae]::common::FunctionCx>::lib_call_unadjusted
  14:     0x7bd68b863c8d - <rustc_codegen_cranelift[6894c6c7f611daae]::common::FunctionCx>::lib_call
  15:     0x7bd68b8844e2 - rustc_codegen_cranelift[6894c6c7f611daae]::codegen_f16_f128::fcmp
  16:     0x7bd68b88c325 - rustc_codegen_cranelift[6894c6c7f611daae]::num::codegen_float_binop
  17:     0x7bd68b894f00 - rustc_codegen_cranelift[6894c6c7f611daae]::base::codegen_fn_body
  18:     0x7bd68b8be39e - rustc_codegen_cranelift[6894c6c7f611daae]::driver::aot::codegen_cgu_content
  19:     0x7bd68b8b96a5 - rustc_codegen_cranelift[6894c6c7f611daae]::driver::aot::module_codegen

my .cargo/config.toml:

[net]
git-fetch-with-cli = true

[build]
target-dir = "/home/jyi/.cargo/target"

[profile.dev]
codegen-backend = "cranelift"

[unstable]
mtime-on-use = true
build-std = ['std', 'panic_abort']
# debug profile doesnt work with 'panic_immediate_abort' which requires 'panic = abort'
build-std-features = ['optimize_for_size']
profile-rustflags = true
codegen-backend = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions