Project

General

Profile

Actions

Bug #5986

closed

rust: update to der-parser 4.1.1

Added by Victor Julien over 1 year ago. Updated 10 months 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
Actions #1

Updated by Victor Julien over 1 year ago

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

Updated by Victor Julien over 1 year ago

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

Updated by Victor Julien over 1 year ago

  • 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?

Actions #4

Updated by Jason Ish over 1 year ago

Debian 10 issue right?

Actions #5

Updated by Victor Julien over 1 year ago

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

Actions #6

Updated by Jason Ish over 1 year ago

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.

Actions #7

Updated by Jason Ish over 1 year ago

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

Actions #8

Updated by Victor Julien over 1 year ago

  • Target version changed from 6.0.12 to 6.0.13
Actions #9

Updated by Victor Julien over 1 year ago

  • Target version changed from 6.0.13 to 6.0.14
Actions #10

Updated by Jason Ish about 1 year ago

  • Target version changed from 6.0.14 to 6.0.15
Actions #11

Updated by Jason Ish about 1 year ago

  • Target version changed from 6.0.15 to 6.0.16
Actions #12

Updated by Victor Julien about 1 year ago

  • Target version changed from 6.0.16 to 6.0.17
Actions #13

Updated by Victor Julien 10 months ago

  • 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: Atom PDF