Skip to content

error: <inline asm>:11:1: this directive must appear between .cfi_startproc and .cfi_endproc directives #41

@xobs

Description

@xobs

The latest version of nightly Rust has started producing the error mentioned above:

   Compiling unwinding v0.2.4
error: <inline asm>:11:1: this directive must appear between .cfi_startproc and .cfi_endproc directives
.cfi_def_cfa_offset 0x90
^

error: could not compile `unwinding` (lib)

Caused by:
  process didn't exit successfully: `/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name unwinding --edition=2021 /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unwinding-0.2.4/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="fde-custom"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="unwinder"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("alloc", "compiler_builtins", "core", "default", "dwarf-expr", "fde-custom", "fde-gnu-eh-frame-hdr", "fde-phdr", "fde-phdr-aux", "fde-phdr-dl", "fde-registry", "fde-static", "hide-trace", "libc", "panic", "panic-handler", "panic-handler-dummy", "panicking", "personality", "personality-dummy", "print", "rustc-dep-of-std", "spin", "system-alloc", "unwinder"))' -C metadata=b255928c0957c633 -C extra-filename=-1ee460f01ef04a46 --out-dir /home/runner/work/rust-nightly/rust-nightly/build/rust/library/target/riscv32imac-unknown-xous-elf/release/deps --target riscv32imac-unknown-xous-elf -C strip=debuginfo -L dependency=/home/runner/work/rust-nightly/rust-nightly/build/rust/library/target/riscv32imac-unknown-xous-elf/release/deps -L dependency=/home/runner/work/rust-nightly/rust-nightly/build/rust/library/target/release/deps --extern compiler_builtins=/home/runner/work/rust-nightly/rust-nightly/build/rust/library/target/riscv32imac-unknown-xous-elf/release/deps/libcompiler_builtins-6590f15bf048bb62.rmeta --extern gimli=/home/runner/work/rust-nightly/rust-nightly/build/rust/library/target/riscv32imac-unknown-xous-elf/release/deps/libgimli-dac8086df33c8820.rmeta --extern core=/home/runner/work/rust-nightly/rust-nightly/build/rust/library/target/riscv32imac-unknown-xous-elf/release/deps/librustc_std_workspace_core-787d5f62566a54af.rmeta --cap-lints allow -Cforce-unwind-tables=yes -Cembed-bitcode=yes -Zforce-unstable-if-unmarked=yes -Z binary-dep-depinfo -L native=/home/runner/work/rust-nightly/rust-nightly/build/rust/library/target/riscv32imac-unknown-xous-elf/release/build/compiler_builtins-463ae0a77e7dd83f/out` (exit status: 1)

This can be reproduced by installing the latest Rust nightly (d4025ee45 as of this issue) and running the following on the appropriate rust source tree:

user@ubuntu:/opt/Xous/rust-nightly/rust$ RUST_COMPILER_RT_ROOT="$(pwd)/src/llvm-project/compiler-rt" RUSTFLAGS="-Cforce-unwind-tables=yes -Cembed-bitcode=yes" cargo +nightly build --target riscv32imac-unknown-xous-elf -Zbinary-dep-depinfo --release --features "panic-unwind compiler-builtins-c compiler-builtins-mem" --manifest-path "library/sysroot/Cargo.toml"
   Compiling shlex v1.3.0
   Compiling core v0.0.0 (/opt/Xous/rust-nightly/rust/library/core)
   Compiling libc v0.2.167
   Compiling std v0.0.0 (/opt/Xous/rust-nightly/rust/library/std)
   Compiling cc v1.2.0
   Compiling compiler_builtins v0.1.138
   Compiling rustc-std-workspace-core v1.99.0 (/opt/Xous/rust-nightly/rust/library/rustc-std-workspace-core)
   Compiling alloc v0.0.0 (/opt/Xous/rust-nightly/rust/library/alloc)
   Compiling cfg-if v1.0.0
   Compiling rustc-demangle v0.1.24
   Compiling dlmalloc v0.2.7
   Compiling rustc-std-workspace-alloc v1.99.0 (/opt/Xous/rust-nightly/rust/library/rustc-std-workspace-alloc)
   Compiling panic_abort v0.0.0 (/opt/Xous/rust-nightly/rust/library/panic_abort)
   Compiling gimli v0.31.1
   Compiling std_detect v0.1.5 (/opt/Xous/rust-nightly/rust/library/stdarch/crates/std_detect)
   Compiling hashbrown v0.15.2
   Compiling unwinding v0.2.4
   Compiling unwind v0.0.0 (/opt/Xous/rust-nightly/rust/library/unwind)
   Compiling panic_unwind v0.0.0 (/opt/Xous/rust-nightly/rust/library/panic_unwind)
error: <inline asm>:11:1: this directive must appear between .cfi_startproc and .cfi_endproc directives
.cfi_def_cfa_offset 0x90
^

error: could not compile `unwinding` (lib)

Caused by:
  process didn't exit successfully: `/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name unwinding --edition=2021 /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unwinding-0.2.4/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=120 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="fde-custom"' --cfg 'feature="rustc-dep-of-std"' --cfg 'feature="unwinder"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("alloc", "compiler_builtins", "core", "default", "dwarf-expr", "fde-custom", "fde-gnu-eh-frame-hdr", "fde-phdr", "fde-phdr-aux", "fde-phdr-dl", "fde-registry", "fde-static", "hide-trace", "libc", "panic", "panic-handler", "panic-handler-dummy", "panicking", "personality", "personality-dummy", "print", "rustc-dep-of-std", "spin", "system-alloc", "unwinder"))' -C metadata=a330dcc068565f04 -C extra-filename=-26ed38c42d75d551 --out-dir /opt/Xous/rust-nightly/rust/library/target/riscv32imac-unknown-xous-elf/release/deps --target riscv32imac-unknown-xous-elf -C strip=debuginfo -L dependency=/opt/Xous/rust-nightly/rust/library/target/riscv32imac-unknown-xous-elf/release/deps -L dependency=/opt/Xous/rust-nightly/rust/library/target/release/deps --extern compiler_builtins=/opt/Xous/rust-nightly/rust/library/target/riscv32imac-unknown-xous-elf/release/deps/libcompiler_builtins-8a32899bd86d6b95.rmeta --extern gimli=/opt/Xous/rust-nightly/rust/library/target/riscv32imac-unknown-xous-elf/release/deps/libgimli-205974f5690a8539.rmeta --extern core=/opt/Xous/rust-nightly/rust/library/target/riscv32imac-unknown-xous-elf/release/deps/librustc_std_workspace_core-bbdc3c0e2b4ffb58.rmeta --cap-lints allow -Cforce-unwind-tables=yes -Cembed-bitcode=yes -Z binary-dep-depinfo -L native=/opt/Xous/rust-nightly/rust/library/target/riscv32imac-unknown-xous-elf/release/build/compiler_builtins-8420e0cd54597b2e/out` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
user@ubuntu:/opt/Xous/rust-nightly/rust$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions