Skip to content

With Rust 1.87, yara doesn't link on Windows #152

@drewkett

Description

@drewkett

With Rust 1.87, rust no longer links advapi32 by default for windows rust-lang/rust#138233. This breaks linking Yara which depends on some of these symbols such as OpenProcessToken and others. This at least affects the vendored feature (as that is what I use) but also presumably breaks yara-static.

The fix is to add something like println!("cargo::rustc-link-lib=advapi32") in the yara-sys/build.rs. I can put it in a PR, but one question is whether its important to scope this to 1.87 and above (using something like rustversion) or just always emit it, which shouldn't cause any problems as it should just duplicate what the compiler is doing in those cases anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions