Hugal31 / yara-rust

Rust bindings for VirusTotal/Yara
Apache License 2.0
76 stars 29 forks source link

Failed to cross compile to windows on bundled mode #116

Closed xyzaurora closed 1 year ago

xyzaurora commented 1 year ago

Hey, while cross compiling to windows while bundling yara-sys I get the following error

/x86_64-w64-mingw32/bin/ld: cannot find -lyara: No such file or directory

Yes, I've checked ldconfig -p

    libyara.so.10 (libc6,x86-64) => /usr/local/lib/libyara.so.10
    libyara.so (libc6,x86-64) => /usr/local/lib/libyara.so
ikrivosheev commented 1 year ago

@xyzaurora, hello! Can you show your Cargo.toml file?

Hugal31 commented 1 year ago

Is /usr/local/lib/libyara.so.10 cross-compiled for Windows? (Isn't it .dll on windows?)

ikrivosheev commented 1 year ago

Is /usr/local/lib/libyara.so.10 cross-compiled for Windows? (Isn't it .dll on windows?)

I had other thoughts. It's look like @xyzaurora tried to compile static library.

xyzaurora commented 1 year ago

Yeah, im using the bundled-4_3_0 feature

yara = { version = "0.19.0", features = ["bundled-4_3_0"] }
ikrivosheev commented 1 year ago

@xyzaurora I agree with @Hugal31 . It's a strange name for a library on the Windows platform.

xyzaurora commented 1 year ago

It is indeed not cross-compiled for windows, I realized that just now.

Thanks for the help!