Rust fails to link (error: linking with 'cc' failed: exit status: 1
) when using devtools due to lto being enabled by default. Adding options=(!lto)
to PKGBUILD allows it compile.
I came across this issue before with the system76-power package so here is what I found on it:
It seems to be related rusts linker-plugin-lto or LLVM not working correctly with the devtools implementation. devtools probably has a flag enabled that either just breaks things or requires rust to have additional arguments to work properly. Alternatively, makechrootpkg might spawn in such a way that rust's linker is unable to find what is needed to successfully link.
The aurutils issue reference from earlier makes use of makechrootpkg, which is what the Convenience Way of Building in a clean chroot does.
Sources: (Solved) Can't link any Rust program linker-plugin-lto stopped working in Rust 1.45.0 -Clinker-plugin-lto doesn't work without extra manual work Regression on nightly since LLVM 8 upgrade: thread sanitizer doesn't compile anymore
Pinned Comments
yangtsesu commented on 2017-08-24 03:07 (UTC)