Skip to content

rustc 1.32 using system LLVM crashes while building the resvg crate #57762

Closed
@RazrFalcon

Description

@RazrFalcon

Initial issue: linebender/resvg#110

   Compiling resvg-capi v0.5.0 (/home/user/.cache/pikaur/build/resvg-git/src/resvg/capi)
error: Could not compile `resvg-capi`.

Caused by:
  process didn't exit successfully: `rustc --crate-name resvg capi/src/lib.rs --color always --crate-type cdylib --crate-type staticlib --emit=dep-info,link -C opt-level=3 -C lto --cfg 'feature="cairo-backend"' --cfg 'feature="cairo-sys-rs"' --cfg 'feature="glib"' --cfg 'feature="qt-backend"' --cfg 'feature="resvg"' -C metadata=34044ee5526873f1 --out-dir /home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps -L dependency=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps --extern cairo_sys=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/libcairo_sys-a11059b04a916894.rlib --extern fern=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/libfern-f758ae3d5f3ac504.rlib --extern glib=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/libglib-42c67ca816dc468b.rlib --extern log=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/liblog-4fed47ee5064f102.rlib --extern resvg=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/libresvg-9bfdf02a73881248.rlib -L native=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/build/resvg-qt-529ad70e8602e985/out` (signal: 11, SIGSEGV: invalid memory reference)

Steps to reproduce:

sudo pacman -S rust
git clone https://github.com/RazrFalcon/resvg.git
cd resvg/capi
cargo build --release

The master branch can be built without rustc crashing on Gentoo and on Travis (Ubuntu 14.04.5 LTS).

UPD: I've tried to build it too and I have the same error. Looks like something wrong with the Arch's rustc. Because if we use the one installed via rustup - everything is ok.

UPD: it can be fixed by disabling the LTO, which is enabled by default for resvg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.O-linuxOperating system: LinuxT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions