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

Using rustls-tls feature still depends on 'openssl-sys' #886

Closed
farazfazli opened this issue Jul 16, 2023 · 2 comments
Closed

Using rustls-tls feature still depends on 'openssl-sys' #886

farazfazli opened this issue Jul 16, 2023 · 2 comments

Comments

@farazfazli
Copy link

Describe the bug
Lettre still depends on 'openssl-sys' despite the 'rustls-tls' feature being enabled.

To Reproduce
Using the following line in Cargo.toml:

lettre = { version = "0.10.4", features = ["rustls-tls"] }

With these imports:

use lettre::{
    message::header::ContentType, transport::smtp::SmtpTransportBuilder, Message, SmtpTransport,
    Transport,
}

causes the following stack-trace:

  run pkg_config fail: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" "pkg-config" "--libs" "--cflags" "openssl"` did not exit successfully: exit status: 1
  error: could not find system library 'openssl' required by the 'openssl-sys' crate

  --- stderr
  Package openssl was not found in the pkg-config search path.
  Perhaps you should add the directory containing `openssl.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'openssl', required by 'virtual:world', not found
...

Expected behavior
I expected cargo build to not look for OpenSSL on my system and instead rely on rustls-tls as other packages (actix-web, reqwest) are doing in my project.

Environment

  • Lettre version: 0.10.4
  • OS: RHEL 9.1 (Plow)

Additional context
If any additional information/context is needed, please feel free to let me know and I will provide it. Thank you.

@paolobarbolini
Copy link
Member

Have you tried disabling default features?

@farazfazli
Copy link
Author

farazfazli commented Jul 17, 2023

Thanks for the swift reply @paolobarbolini. I tried with the following Cargo.toml line:

lettre = { version = "0.10.4", features = ["rustls-tls"], default-features = false }

and it fixed it. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants