Skip to content

Document Linux source-build workaround for rustc 1.99 / LLVM 23 ThinLTO SIGILL #2811

Closed

Description

@rwarmstr

Scope update: the AUR packaging opt-out bug has been split into #2813. This issue now requests only documentation of the compiler crash configuration and verified workaround.

Summary

Building Lightcraft from source through the Arch AUR package fails with a compiler SIGILL while compiling the lightcraft-cli and lightcraft executables. This occurred with 0.7.1-1 on October 13 and recurred with 0.13.0-1 on October 24 after the package update replaced a local workaround.

This appears to be an LLVM/compiler issue triggered during ThinLTO, rather than an application runtime crash. Reporting here to document the affected build configuration and workaround; the exact compiler root cause has not been isolated.

Environment

  • Arch Linux, x86_64
  • AMD Ryzen 9 7900X3D
  • rustc 1.99.0 (b940084d7 2026-09-28), LLVM 23.1.1, stable rustup toolchain
  • AUR lightcraft 0.13.0-1 (packaging commit 71da1d7)
  • makepkg LTO enabled; RUSTFLAGS="-C opt-level=3 -C target-cpu=native"
  • Release profile: opt-level=3, lto=thin, codegen-units=1

Reproduction

  1. Build the AUR lightcraft 0.13.0-1 package using the environment above.
  2. cargo build --frozen --release reaches the executable crates.
  3. rustc terminates with signal 4 (SIGILL). Both executable builds produced core dumps.

Diagnostic excerpt

The October 24 lightcraft-cli core dump identifies thread "lto cgu.0.rcgu." and signal ILL_ILLOPN. Its top frames are in libLLVM.so.23.1-rust-1.99.0-stable:

combineConcatVectorOps(...).cold                        +0xa4c6abb
combineConcatVectorOps(...) lambda                      +0x85dd39b
combineConcatVectorOps(...).cold                        +0xa4cdc62
combineConcatVectorOps(...) lambda                      +0x85dd17f
combineConcatVectorOps(...).cold                        +0xa4c564a
llvm::X86TargetLowering::PerformDAGCombine               +0x9b3f1a6
DAGCombiner::combine                                    +0x90defba
llvm::SelectionDAG::Combine                             +0x90dedd8

The original 0.7.1 build also failed at these same LLVM offsets, with optimize_and_codegen_thin and spawn_thin_lto_work in the stack.

Verified workaround

Explicitly exporting CARGO_PROFILE_RELEASE_LTO=off inside the PKGBUILD's _srcenv() function allowed both 0.7.1-1 and 0.13.0-1 to build successfully; both rebuilt CLIs ran, and the 0.7.1 package was installed successfully. No change to RUSTFLAGS or target-cpu=native was needed. For a direct Cargo source build, the corresponding explicit override is:

CARGO_PROFILE_RELEASE_LTO=off cargo build --frozen --release

The direct-Cargo command above is the equivalent override; verification was performed through the AUR recipe. An environment prefix on makepkg alone can be overwritten by exports inside the PKGBUILD, so the packaging recipe must honor or set the override. The downstream opt-out fix is tracked separately in #2813.

Relationship to #1196 and requested documentation

I reviewed #1196, its linked documentation PR #1667, and the low-memory build guidance shipped in v0.13.0. #1196 describes systemd-oomd/kernel OOM kills on a 16 GB machine and was closed after that guidance landed. This report instead has rustc signal 4 (SIGILL / ILL_ILLOPN) in LLVM vector-combine code on a 64 GB machine. The reports share LTO as a build setting/workaround, but there is no evidence establishing the same root cause; this should not be treated as a confirmed OOM duplicate.

Please document the affected rustc 1.99.0 / LLVM 23.1.1 configuration and explicit LTO-off workaround in the Linux source-build troubleshooting guidance, distinguishing it from OOM advice. The compiler root cause has not been isolated, and this ticket does not request changing the default release profile or claim a compiler fix. If a separate Rust/LLVM report or reduced reproducer is needed, please advise on routing.

Activity

  1. ticket-craft commented on Oct 24, 2026

    @ticket-craft

    Thanks! This ticket describes several separate problems:

    • AUR PKGBUILD does not disable Rust LTO when lto is off
    • Document the rustc 1.99 / LLVM 23 ThinLTO SIGILL build configuration

    It helps a lot if each one has its own ticket, so they can be tracked and fixed separately.

    Possibly related: #1196.

  2. changed the title [-]Linux/AUR source build: rustc 1.99.0 SIGILL in LLVM 23 ThinLTO (0.7.1 and 0.13.0)[/-] [+]Document Linux source-build workaround for rustc 1.99 / LLVM 23 ThinLTO SIGILL[/+] on Oct 24, 2026
  3. rwarmstr commented on Oct 24, 2026

    @rwarmstr
    Author

    Split as requested: #2813 now tracks only the AUR !lto opt-out bug and proposed downstream conditional fix. I narrowed this issue’s title/body to documentation of the rustc 1.99 / LLVM 23 SIGILL configuration and verified workaround.

    I also reviewed #1196 and #1667: that report covers OOM kills on 16 GB systems, and the low-memory documentation is already in v0.13.0. Our observed failure is SIGILL / ILL_ILLOPN inside LLVM’s vector optimizer on a 64 GB system. Both involve LTO, but a shared root cause is unproven. The distinction and cross-links are now in both tickets.

  4. added 2 commits that reference this issue on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions