Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provides better linking default and options #7

Open
Hugal31 opened this issue Apr 15, 2020 · 3 comments
Open

Provides better linking default and options #7

Hugal31 opened this issue Apr 15, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@Hugal31
Copy link
Owner

Hugal31 commented Apr 15, 2020

This blog post describe some reasonable behaviors for -sys crates : https://kornel.ski/rust-sys-crate.
Implement them.

@Hugal31 Hugal31 added the enhancement New feature or request label Apr 15, 2020
@Hugal31 Hugal31 self-assigned this Apr 15, 2020
@Hugal31
Copy link
Owner Author

Hugal31 commented Sep 8, 2020

@rc-grey added a LIBYARA_STATIC environment variable to make Yara link statically, but I didn't managed to make it work. I have some link errors when building the tests:

> YARA_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu LIBYARA_STATIC=1 cargo test
...
/usr/bin/ld: (.text+0x123d): undefined reference to `MD5_Update'
          /usr/bin/ld: (.text+0x1299): undefined reference to `MD5_Final'
          /usr/bin/ld: /home/laloge_h/sources/perso/yara-rust/target/debug/deps/libyara_sys-6d57026986dabd21.rlib(pe.o): in function `pe_parse_certificates':
          (.text+0x2ffd): undefined reference to `BIO_new_mem_buf'
          /usr/bin/ld: (.text+0x3011): undefined reference to `d2i_PKCS7_bio'
          /usr/bin/ld: (.text+0x3022): undefined reference to `PKCS7_get0_signers'
          /usr/bin/ld: (.text+0x3046): undefined reference to `OPENSSL_sk_num'
...

@ikrivosheev
Copy link
Contributor

@Hugal31 If I understand correctly, can we close this one?

@Hugal31
Copy link
Owner Author

Hugal31 commented Aug 22, 2022

Well, I still have link issues when trying to link statically. Does it work on your setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants