Project

General

Profile

Actions

Bug #5986

closed
VJ

rust: update to der-parser 4.1.1

Bug #5986: rust: update to der-parser 4.1.1

Added by Victor Julien almost 3 years ago. Updated about 2 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:


Related issues 1 (0 open1 closed)

Related to Suricata - Bug #4204: rust: undefined symbol: llvm.x86.subborrow.64ClosedActions

VJ Updated by Victor Julien almost 3 years ago Actions #1

  • Related to Bug #4204: rust: undefined symbol: llvm.x86.subborrow.64 added

VJ Updated by Victor Julien almost 3 years ago Actions #2

  • Status changed from New to In Progress
  • Assignee changed from OISF Dev to Victor Julien

VJ Updated by Victor Julien almost 3 years ago Actions #3

  • Status changed from In Progress to Assigned
  • Assignee changed from Victor Julien to Jason Ish

I've tried to get this to work, but I'm failing so far.

der-parser = { version = "4.1.1", default-features = false }
   Compiling der-parser v4.1.1
     Running `rustc --crate-name der_parser --edition=2018 /suricata-6.0.12-dev/rust/vendor/der-parser/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="der-oid-macro"' --cfg 'feature="oid-macro"' --cfg 'feature="proc-macro-hack"' -C metadata=436c044d5b582e8d -C extra-filename=-436c044d5b582e8d --out-dir /suricata-6.0.12-dev/rust/target/debug/deps -L dependency=/suricata-6.0.12-dev/rust/target/debug/deps --extern der_oid_macro=/suricata-6.0.12-dev/rust/target/debug/deps/libder_oid_macro-3fb2e591f8f05ba1.so --extern nom=/suricata-6.0.12-dev/rust/target/debug/deps/libnom-716ce4b582790627.rmeta --extern num_traits=/suricata-6.0.12-dev/rust/target/debug/deps/libnum_traits-b4c4884e8c1f0a90.rmeta --extern proc_macro_hack=/suricata-6.0.12-dev/rust/target/debug/deps/libproc_macro_hack-c59c90ab92b3ee2f.so --extern rusticata_macros=/suricata-6.0.12-dev/rust/target/debug/deps/librusticata_macros-4bd356d6a404ce4e.rmeta --cap-lints allow`
error: /suricata-6.0.12-dev/rust/target/debug/deps/libder_oid_macro-3fb2e591f8f05ba1.so: undefined symbol: llvm.x86.subborrow.64
   --> /suricata-6.0.12-dev/rust/vendor/der-parser/src/lib.rs:173:9
    |
173 | pub use der_oid_macro::oid;
    |         ^^^^^^^^^^^^^

error: aborting due to previous error

error: could not compile `der-parser`.

Caused by:
  process didn't exit successfully: `rustc --crate-name der_parser --edition=2018 /suricata-6.0.12-dev/rust/vendor/der-parser/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="der-oid-macro"' --cfg 'feature="oid-macro"' --cfg 'feature="proc-macro-hack"' -C metadata=436c044d5b582e8d -C extra-filename=-436c044d5b582e8d --out-dir /suricata-6.0.12-dev/rust/target/debug/deps -L dependency=/suricata-6.0.12-dev/rust/target/debug/deps --extern der_oid_macro=/suricata-6.0.12-dev/rust/target/debug/deps/libder_oid_macro-3fb2e591f8f05ba1.so --extern nom=/suricata-6.0.12-dev/rust/target/debug/deps/libnom-716ce4b582790627.rmeta --extern num_traits=/suricata-6.0.12-dev/rust/target/debug/deps/libnum_traits-b4c4884e8c1f0a90.rmeta --extern proc_macro_hack=/suricata-6.0.12-dev/rust/target/debug/deps/libproc_macro_hack-c59c90ab92b3ee2f.so --extern rusticata_macros=/suricata-6.0.12-dev/rust/target/debug/deps/librusticata_macros-4bd356d6a404ce4e.rmeta --cap-lints allow` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed

I wonder if this is due to der-parser also being pulled in through other crates. Can we set the default features to false for these too?

JI Updated by Jason Ish almost 3 years ago Actions #4

Debian 10 issue right?

VJ Updated by Victor Julien almost 3 years ago Actions #5

Yes. I tested in a debian 10 docker, with apt install rustc cargo.

JI Updated by Jason Ish almost 3 years ago Actions #6

Unfortunately, our feature specification is not transitive to dependencies also depending on der-parser.

We could:
- Fork der-parser into a repo we control, remove the offending code and create a tag we point out. We can then override the der-parser that dependencies point to.
- Or, just like the fork but copy in (vendor) the der-parser code into our source tree and make the modification there.

JI Updated by Jason Ish almost 3 years ago Actions #7

Example using the forked repo approach: https://github.com/OISF/suricata/pull/8728

VJ Updated by Victor Julien almost 3 years ago Actions #8

  • Target version changed from 6.0.12 to 6.0.13

VJ Updated by Victor Julien almost 3 years ago Actions #9

  • Target version changed from 6.0.13 to 6.0.14

JI Updated by Jason Ish over 2 years ago Actions #10

  • Target version changed from 6.0.14 to 6.0.15

JI Updated by Jason Ish over 2 years ago Actions #11

  • Target version changed from 6.0.15 to 6.0.16

VJ Updated by Victor Julien over 2 years ago Actions #12

  • Target version changed from 6.0.16 to 6.0.17

VJ Updated by Victor Julien about 2 years ago Actions #13

  • Status changed from Assigned to Rejected
  • Assignee deleted (Jason Ish)
  • Target version deleted (6.0.17)

Rejecting as 6.0.x is now in extended support and EOL in 6 months.

Actions

Also available in: PDF Atom