-
Notifications
You must be signed in to change notification settings - Fork 381
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
OpenSSL error #510
Comments
@akaylh Did you find a fix to this issue? |
no, I can not find reason. |
You could reopen this issue then, since the problem still persists. |
I'm also facing the same issue |
This is happening because OpenSSL was removed from the Docker container. There are a couple ways to fix this. The easiest, and my preferred, is to use Rustls instead of OpenSSL. It's common for dependencies which use OpenSSL by default to provide a way for you to tell them to use Rustls instead via feature flags. Example: You can look through your The alternative is more complicated: configure a custom Docker image based on the one used by |
Install musl toolchains: |
I have the same issue, any update ? |
@Mohsen7s see my above comment |
@adamgreig I think this issue can be closed. |
@andrewbanchich I'm not looking for tricky hacks. This has to be fixed internally not forcing developers to change code |
It isn't a trick or a hack. Cross doesn't allow us to use OpenSSL anymore due to the issue I referenced. This issue is about why this error happens. If you don't want to just use Rustls instead of building a custom Docker image, I think you'd need to open an issue to ask them to offer a custom Docker image that includes OpenSSL. |
fwiw the workaround doesn't seem to work with the v2 resolver, and thus 2021 edition default settings |
I've been using it with the 2021 edition without any issues. What error are you seeing @ZanderBrown ? |
Despite setting openssl to be vendored somehow the overall tree often ends up with openssl trying to find openssl Of course this may well be a problem with the openssl crate |
And my solution is not an option for you? |
If you mean rusttls, no — for whatever reason connections fail What does work is overriding the resolver version back to v1 |
If setting resolver to v1 is working for you than you have a dependency issue, some crate you're using does not have the correct features enabled in the dev/release profile, you should be able to solve it if you compare what features are enabled when v1 is set, it's most likely a dev dependency that depends on the feature you need. The only workaround for this issue from cross' side is custom-docker-images. |
@andrewbanchich Your solution is only applicable in situations where OpenSSL is used by rust itself. When there its a C code which based on OpenSSL its not possible to switch to rustls without making change to underlying C project based on OpenSSL. To me this is called a hack or trick. There are plenty of C libraries based on OpenSSL which are used by rust bridges. |
I also explained you can create a custom Docker image. This should work for whatever use case you have. |
@andrewbanchich Yeah I knew that but I guess the whole point of using cross-rs, which described itself as |
rustls has an issue connecting to ip addresses, the issue has been around for a long time. |
The same issued here :( |
This is fixed and documented.This also links to the relevant documentation for using external dependencies. You will need to use the openssl = { version = "0.10", features = ["vendored"] } For glibc images (not musl ones), see my comment here. For these glibc images, support for Please note that you may have to use an older version of cross (the latest from crates.io, not from git), since we currently need to downgrade musl libc due to #485, which I believe affects the non-vendored versions of OpenSSL. I've also added instructions for how to use OpenSSL specifically on the Recipes page on the wiki, since it is a common dependency. |
We can't exactly support every external C dependency or our builds would become very complex, our images large, and it would be way beyond the scope of this project. Especially for musl targets where it would need to be compiled from source. We've started documenting how to set up using cross with external dependencies to minimize the effort required. |
2024: Following working for me. |
You dont need cross-rs for this, you could just use cargo :) |
I use x86_64-unknown-linux-musl to cross build for linux, It worked well before, and suddenly reported this error one day
The text was updated successfully, but these errors were encountered: