[Pkg-rust-maintainers] Bug#976601: rustc: version in buster fails to build Rust code, aborting with "undefined symbol: llvm.x86.subborrow.64"

Sascha Steinbiss satta at debian.org
Sat Dec 5 16:26:03 GMT 2020


Package: rustc
Version: 1.41.1+dfsg1-1~deb10u1
Severity: normal

Dear Maintainer,

while trying to build the new 6.0.1 version of Suricata [1] with the
current Rust toolchain in buster, I noticed that one of the Rust
components in this project [2] fails to build. This can be reproduced on
buster simply by:

$ git clone https://github.com/rusticata/der-parser -b der-parser-4.x
Cloning into 'der-parser'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (61/61), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 2154 (delta 31), reused 48 (delta 23), pack-reused 2093
Receiving objects: 100% (2154/2154), 516.92 KiB | 1.29 MiB/s, done.
Resolving deltas: 100% (1396/1396), done.
$ cd der-parser
[satta at BLN04NB0421:~/der-parser] $ [satta at BLN04NB0421:~/der-parser] $ cargo build                                                                                                        [der-parser-4.x] [0]
    Updating crates.io index
  Downloaded proc-macro-hack v0.5.19
  Downloaded num-bigint v0.3.1
  Downloaded nom v5.1.2
  Downloaded num-integer v0.1.44
  Downloaded lexical-core v0.7.4
   Compiling autocfg v1.0.1
   Compiling ryu v1.0.5
   Compiling bitflags v1.2.1
   Compiling memchr v2.3.4
   Compiling lexical-core v0.7.4
   Compiling version_check v0.9.2
   Compiling cfg-if v0.1.10
   Compiling arrayvec v0.5.2
   Compiling static_assertions v1.1.0
   Compiling proc-macro-hack v0.5.19
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling num-bigint v0.3.1
   Compiling nom v5.1.2
   Compiling rusticata-macros v2.1.0
   Compiling der-oid-macro v0.2.0 (/home/satta/der-parser/der-oid-macro)
   Compiling der-parser v4.1.0 (/home/satta/der-parser)
warning: unknown lint: `broken_intra_doc_links`
   --> src/lib.rs:142:9
    |
142 | #![deny(broken_intra_doc_links)]
    |         ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unknown_lints)]` on by default

error: /home/satta/der-parser/target/debug/deps/libder_oid_macro-b8b90f0c61ae3277.so: undefined symbol: llvm.x86.subborrow.64
   --> src/lib.rs:173:9
    |
173 | pub use der_oid_macro::oid;
    |         ^^^^^^^^^^^^^

error: aborting due to previous error

error: could not compile `der-parser`.

To learn more, run the command again with --verbose.


Here's an upstream bug ticket regarding this issue:
https://github.com/rusticata/der-parser/issues/36

Interestingly, the der-parser code mentioned above builds with the Debian
Rust compiler package when built as part of the Suricata 6.0.0 tarball [3],
in which it is vendored in the rust/ subdirectory, but fails with the above
mentioned error when built as part of the vendored code in the Suricata
6.0.1 tarball [4]. No changes have been made to the vendored der-parser
code between those two versions, so it might also be dependent on the mix
of vendored crates in this context and how they might interact.
Also, ARM builds do not seem to be affected, according to the upstream
ticket.

Could the recent move to 1.41.1+dfsg1-1~deb10u1 and the switch to LLVM 7
(see changelog) [5] be related? 

We also notice a mismatch between the cargo and Rust versions:

$ which rustc
/usr/bin/rustc
$ rustc -V
rustc 1.41.1
$ which cargo
/usr/bin/cargo
$ cargo -V
cargo 1.42.1

If you have any more questions and I can help to clear them up, feel
free to let me know! This currently blocks backporting Suricata 6.0.1
to buster with the current Rust version, and I start to suspect that
some quirk in the current buster Rust package might be the problem.
(Yes , there are some other things to sort out to get 6.0.x into
unstable/testing first before this becomes an issue, but I just wanted
to test the waters regarding the Rust ecosystem that is usually a bit
sensitive when it comes to versions.)

Thanks
Sascha


[1] https://suricata-ids.org
[2] https://github.com/rusticata/der-parser
[3] https://www.openinfosecfoundation.org/download/suricata-6.0.0.tar.gz
[4] https://www.openinfosecfoundation.org/download/suricata-6.0.1.tar.gz
[5] https://tracker.debian.org/news/1175959/accepted-rustc-1411dfsg1-1deb10u1-source-amd64-all-into-proposed-updates-stable-new-proposed-updates/

Versions of packages rustc depends on:
ii  binutils              2.34-5
ii  gcc                   4:8.3.0-1
ii  libc6                 2.30-4
ii  libc6-dev [libc-dev]  2.30-4
ii  libgcc-s1 [libgcc1]   10-20200411-1
ii  libgcc1               1:8.3.0-6
ii  libstd-rust-dev       1.41.1+dfsg1-1~deb10u1

Versions of packages rustc recommends:
ii  cargo     0.43.1-3~deb10u1
ii  rust-gdb  1.41.1+dfsg1-1~deb10u1

Versions of packages rustc suggests:
pn  lld-7     <none>
pn  rust-doc  <none>
pn  rust-src  <none>

-- no debconf information



More information about the Pkg-rust-maintainers mailing list