-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix failed builds on RISC-V (64-bit) #3184
Conversation
src/uu/cp/Cargo.toml
Outdated
@@ -28,7 +28,7 @@ uucore = { version=">=0.0.11", package="uucore", path="../../uucore", features=[ | |||
walkdir = "2.2" | |||
|
|||
[target.'cfg(target_os = "linux")'.dependencies] | |||
ioctl-sys = "0.6" | |||
ioctl-sys = { git = "https://github.com/jmesmon/ioctl.git", rev = "295ed33a8704a0eff31bebdcf6ca0bfeb93bf675" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am uncomfortable depending on some personal forked git repo.
So, I won't accept this change. Sorry :(
Do you know why it isn't merged upstream + published as a new crate?
thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why a new release hasn't been made yet, but that repo is actually the upstream, official ioctl-sys.
I'll ask them about updating the crate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks for codyps/ioctl#22 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new crate release was just made and jmesmon/ioctl#22 was resolved, so I've amended commit 4345c2a to use the new version 0.8.0.
Cool stuff. Do you know if there is a way to get this tested on a github CI? |
I haven't tried it, but there is a QEMU github action: https://github.com/docker/setup-qemu-action |
I guess you saw that a few jobs are failing |
I've amended the existing commits to fix problems with the spell checker, as well as an outdated There are also some style warnings about existing code that my commits didn't modify. |
Fixed the style problems. Didn't catch the |
Rebased on #3186 to resolve an unrelated CI error.
After running:
EDIT: |
4345c2a
to
e4fc557
Compare
However, it looks like the added |
Can we get rid of the openssl dependency by using reqwest with rustls by using the From this bit in the docs it looks like openssl is only used when native tls is used: |
The |
I see. Thanks for checking! Let's review our options:
2 & 3 are both fine with me. |
@@ -252,7 +253,8 @@ lazy_static = { version="1.3" } | |||
textwrap = { version="0.14", features=["terminal_size"] } | |||
uucore = { version=">=0.0.11", package="uucore", path="src/uucore" } | |||
selinux = { version="0.2", optional = true } | |||
ureq = "2.4.0" | |||
reqwest = { version="0.11.9", features = ["blocking"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pulling a lot of new deps, is it possible to avoid that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unaware of any way to reduce the dependencies, besides simply not using reqwest
.
We could simply wait for ring
to add RISC-V support, and use the existing ureq
crate. There's already a PR for this: briansmith/ring#1459
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you're suggesting that we close this PR? We could create an issue referencing that PR instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could close this PR and create a different one if we want to take that route.
The downside is that we would still be depending on ring
's architecture support, which is problematic for other systems (see #3216).
I would prefer to try and resolve the CI issues with openssl & cross-compilation instead.
If I understood correctly, one can disable ureq = { version = "2.4.0", default-features = false, features = ["gzip"]} Did I miss something? |
@darleybarreto the I should have some time to look at this again this weekend. |
Oh, I thought |
The ureq dependency is causing compilation errors on various platforms (see uutils#3184, uutils#3216, uutils#3375). Hence we remove that dependency and do not automatically download the archive anymore. Instead, we ask the user to download it separately when the archive is not found.
The ureq dependency is causing compilation errors on various platforms (see uutils#3184, uutils#3216, uutils#3375). Hence we remove that dependency and do not automatically download the archive anymore. Instead, we ask the user to download it separately when the archive is not found.
Closing this as both issues in this PR have been fixed. Thank you for your efforts and for bringing these to our attention! |
These changes add support for the RISC-V (64-bit) architecture by updating the
ioctl-sys
dependency, and replacing usage of theureq
crate withreqwest
for downloadingtldr
.ioctl-sys
was updated to support 64-bit RISC-V about 5 months ago, with this commit: codyps/ioctl@295ed33The
ureq
crate depends onrustls
, which depends onring
.ring
does not support RISC-V or other less-popular architectures, which leads to build failures on these systems. Thereqwest
crate is less architecture-dependent, and can be used to downloadtldr
, instead.All changes have been tested with
cargo test
on both x86-64 GNU/Linux, and riscv64 GNU/Linux in QEMU.x86-64 GNU/Linux has no regressions.
riscv64 GNU/Linux in QEMU succeeds in building, but fails the following tests: