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

Build does not work with hyper versions >= 0.14.3 #1471

Closed
webern opened this issue Apr 8, 2021 · 5 comments
Closed

Build does not work with hyper versions >= 0.14.3 #1471

webern opened this issue Apr 8, 2021 · 5 comments
Assignees
Labels
area/core Issues core to the OS (variant independent) status/in-progress This issue is currently being worked on type/bug Something isn't working
Milestone

Comments

@webern
Copy link
Contributor

webern commented Apr 8, 2021

We build most Bottlerocket binaries with RUSTFLAGS=-Cprefer-dynamic so that we can dynamically link to the Rust std library and reduce the size of our binaries.

Hyper 0.14.3 adds this line to its Cargo.toml to emit a c interface in a dynamic library:
https://github.com/hyperium/hyper/blob/48d4594930da4e227039cfa254411b85c98b63c5/Cargo.toml#L23

This, in conjunction with reqwest and prefer-dynamic causes cargo/rustc to try to link using the emitted hyper c library and the linker fails with missing symbols. The problem is described precisely here: rust-lang/rust#82151 (comment)

As it stands right now, this means that the highest version of hyper we can use with Bottlerocket is 0.14.2.

@webern webern added the area/core Issues core to the OS (variant independent) label Apr 8, 2021
@jhaynes jhaynes added priority/p1 type/bug Something isn't working labels Apr 8, 2021
@jhaynes jhaynes added this to the techdebt milestone Apr 8, 2021
@webern webern self-assigned this May 5, 2021
@webern
Copy link
Contributor Author

webern commented Jul 28, 2021

I want to link this to the underlying issue, which is this: rust-lang/rust#82151

And specifically this comment explains it well:
rust-lang/rust#82151 (comment)

@webern
Copy link
Contributor Author

webern commented Sep 23, 2021

Note, this PR attempts to fix the underlying issue, but appears to be stuck rust-lang/rust#88101

@cbgbt cbgbt mentioned this issue Nov 9, 2021
5 tasks
@webern
Copy link
Contributor Author

webern commented Feb 2, 2022

Good news!
This RFC was has been created, accepted and implemented in nightly: https://rust-lang.github.io/rfcs/3180-cargo-cli-crate-type.html

@seanmonstar reports that this will allow the removal of cdylib from Hyper's Cargo.toml and allow builds to instead opt-in to the creation of the cdylib. Once that change to Hyper's Cargo.toml is released, we should be able to update.

@webern webern added status/in-progress This issue is currently being worked on and removed status/notstarted labels Mar 17, 2022
@webern
Copy link
Contributor Author

webern commented Mar 17, 2022

It will be ready soon! hyperium/hyper@1c66370

@webern webern modified the milestones: techdebt, 1.7.0 Mar 22, 2022
@webern webern added this to v1.7.0 Mar 22, 2022
@webern webern moved this to In Progress in v1.7.0 Mar 22, 2022
@kdaula kdaula closed this as completed Jun 1, 2022
Repository owner moved this from In Progress to Done in v1.7.0 Jun 1, 2022
@webern
Copy link
Contributor Author

webern commented Jun 1, 2022

Fixed by #2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues core to the OS (variant independent) status/in-progress This issue is currently being worked on type/bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants