-
Notifications
You must be signed in to change notification settings - Fork 926
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
aws-lc-sys build failure on Linux when OpenSSL 3.4.1 headers are found #4260
Comments
@RJVB Thanks for filing this issue! I understand your frustrations, however it seems unlikely that we can do anything about it in this repo. Would you mind transferring this issue to https://github.com/aws/aws-lc-rs so that they can have a better look? The full |
I can do that of course, but wouldn't this rather be an issue of how I know next to nothing about rust or cargo (I just encounter them as build dependencies) but this feels like what can happen if you build a "vendored" dependency through, say, the CMake build system of some more complex project, and the 2 projects have conflicting dependencies. And I suppose you (rather than they) can answer the question if rustup itself pulls in OpenSSL and what version(s) it can work with. Linking to OpenSSL3 all while using an embedded older version is not a good idea, btw, as surely you know. |
We do use Lines 1688 to 1695 in 3b60eb2
... but vendoring is not on by default: Line 17 in 3b60eb2
The C part of our build process is entirely handled by the dependencies that rely on C, and we don't handle that directly. Are you sure you are having problems when building aws-lc-rs? |
@RJVB BTW if you just want to get rustup up and running, you can try compiling with the reqwest/rustls/aws-lc backend only: > cargo build --no-default-features --features=reqwest-rustls-tls ... or alternatively, you can disable the > cargo build --no-default-features --features=curl-backend ... or if you want to vendor OpenSSL: > cargo build --no-default-features --features=curl-backend,vendored-openssl |
@RJVB I think I know what you are confused about now. By default we have all these three backends on, and on Linux they all rely on OpenSSL in different ways (unfortunately none is handled directly by us), so it might be good to try what works for you by isolating them. Line 15 in 3b60eb2
We understand that the status quo is not satisfying, and the simplification is in the works (#3790), but we currently need to keep them for compatibility purposes. |
I clearly don't know how to read that but do I at least understand correctly that "vendoring is not on" means that the build will use whatever OpenSSL version it finds in the system?
No:
And so forth. Given the other info above this looks to me like a build system that knows to avoid including the wrong OpenSSL headers from the default/system search path but gets tripped up because the user injected flags that force the compiler to look in the wrong place first. That would indeed be something to report "upstream", but what about the fact they're apparently building in an obsolete OpenSSL version? |
@RJVB I highly recommend filing an issue against the aws-lc-rs repo. In my experience they have been very responsive in fixing build issues. Meanwhile, I don't think there is much we can do about your issues on the rustup side. (Are you rebuilding because your distro's libc is too old for the binaries we release?) |
That's one reason I have the packaging (MacPorts "port") in which this issue came up, but on Mac. The other is having a binary that's built against to (and has RPATH set for) the more up-to-date in /opt/local . I like my ports to build on Linux too and there I can (for now) use the downloadable binaries to bootstrap the rustup build with an up-to-date |
Verification
Problem
I'm trying to build rustup (1.28.1) itself locally on an older Linux distro and run into a build failure in
aws-lc-sys
when the OpenSSL3 headers are available. Errors range from theDEFINE_STACK_OF
macro being called with the wrong number of arguments to an obsolete header file being included inrust_wrapper.h
(asn1_mac.h
).After seeing that
aws-lc-sys
seems to contain its own OpenSSL copy I removed the explicit-I
arguments to expose my (self-built) OpenSSL3 install, and the build succeeded.However, I notice that the resulting rustup binary still links to libssl and libcrypto - from my OpenSSL3 install.
I have tried to find information about the dependency requirements for building rustup locally but came up empty.
What OpenSSL version(s) is/are supported, in particular?
Steps
-I
flags to find the intended dependencies, in particular OpenSSL3 headers (-I/opt/local/libexec/openssl3/include
).Possible Solution(s)
It would be of great help to know what OpenSSL versions are supported, and possibly what support there is for non-standard install layouts.
Notes
No response
Rustup version
1.28.1
Installed toolchains
stable-x86_64-unknown-linux-gnu
OS version
The text was updated successfully, but these errors were encountered: