-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Linker Error when using rust-http in a dylib (plugin) #17763
Comments
This may be a dupe of #14344, but I'd want to investigate more thoroughly. |
Actually, this is a bug in
Looks like the symbol is a macro, not an actual function on some platforms. |
cc @sfackler |
@alexcrichton Thanks a ton for figuring this out. I've was struggling to figure this out all day yesterday. |
Hmmm.. I tried to fix this with sfackler/rust-openssl#64 but the error hasn't changed. Any ideas? |
Are you sure you're pulling the new version? |
Yes. |
This is super strange because it only happens when you try to use it in a dylib (specifically a plugin) - using rust-openssl in something static works fine. |
Yup. This is still failing on my builds, too, which run |
@alexcrichton Since there aren't any problems using rust-openssl as a static library or in a static library, I think this is potentially a rust issue instead of an openssl issue, especially with the latest fix for BN_is_zero being a macro. |
I'm especially convinced that this is an error because you can find |
@reem, your comment here: sfackler/rust-openssl#64 (comment) is not quite true, you need to assemble the object file into an archive and then provide a |
fix: Insert a tail `Ok(())` for expr block instead of wrapping with `Ok` Fixes rust-lang#17728 When type mismatch is `Result<(), E>, ()` or `Option<()>, ()` and target expr is a block expression, it is more reasonable to insert a wrapped unit - `Ok(())` or `Some(())` - as the tail expression of that block than wrapping the entire block with `Ok` or `Some`
Reproduce: https://github.com/reem/rust-http-content-type
The linker error goes away if you remove the implementation of this method: https://github.com/reem/rust-http-content-type/blob/master/generator/src/download.rs#L7-L24, which is the only usage of
rust-http
.The actual error, I believe, has to do with
rust-http
s usage ofrust-openssl
, but I don't really know how to debug any further.Opening this issue because @huonw suggested it after we tried to debug.
Actual Error Log:
The text was updated successfully, but these errors were encountered: