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

[BUGFIX] rust-sccache: update to 0.2.15, enable feature=dist-server for x86_64* #29756

Closed
wants to merge 1 commit into from

Conversation

Logarithmus
Copy link
Contributor

@Logarithmus Logarithmus commented Mar 25, 2021

Have the results of the proposed changes been tested?

  • I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
  • I generally don't use the affected packages but briefly tested this PR

@ericonr
Copy link
Member

ericonr commented Mar 25, 2021

Should be able to remove the cargo update command, since we are now on OpenSSL.

I don't think this needs a sub package, though.

@Logarithmus
Copy link
Contributor Author

running 1 test
test test_rust_cargo ... FAILED

failures:

---- test_rust_cargo stdout ----
thread 'test_rust_cargo' panicked at 'Failed to spawn "/usr/bin/cargo" "clean": No such file or directory (os error 2)', /host/cargo/registry/src/github.com-1ecc6299db9ec823/assert_cmd-1.0.2/src/assert.rs:63:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Hmm...

@Logarithmus
Copy link
Contributor Author

Logarithmus commented Mar 26, 2021

Should be able to remove the cargo update command, since we are now on OpenSSL.

I don't think this needs a sub package, though.

It definitely needs a subpackage, because most users don't use distributed builds functionality. They just use local and/or S3 cache to speed up repeated builds, for which sccache binary is sufficient. And sccache-dist binary is about 9 MiB, which is quite a lot IMHO, considering that Void aims to be minimal/bloat-free distro.

@Logarithmus Logarithmus changed the title rust-sccache: update to 0.2.15 rust-sccache: update to 0.2.15, enable dist-server feature Mar 26, 2021
@Logarithmus Logarithmus force-pushed the sccache branch 4 times, most recently from 0c37669 to 2f87743 Compare March 27, 2021 15:06
@Logarithmus Logarithmus changed the title rust-sccache: update to 0.2.15, enable dist-server feature rust-sccache: update to 0.2.15, new package: rust-sccache-dist-0.2.15 Mar 27, 2021
@Logarithmus
Copy link
Contributor Author

Logarithmus commented Mar 27, 2021

Turns out sccache-dist supports x86_64 only. So instead of subpackage I decided to create a separate template for it.

@Logarithmus
Copy link
Contributor Author

Logarithmus commented May 5, 2021

@ericonr sccache-0.2.13 is buggy and doesn't work. I always get this error when I run cargo build:

Caused by:
  process didn't exit successfully: `/usr/bin/sccache rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 2)
  --- stderr
  error: failed to execute compile
  caused by: Failed to send data to or receive data from server
  caused by: Failed to read response header
  caused by: failed to fill whole buffer

More info: mozilla/sccache#887, mozilla/sccache#887 (comment)
As you can see, version 0.2.13 is unusable. I noticed that and thus filed this PR back in March. Unfortunately, you don't seem interested in merging it, so I decided to provide some proofs that this change is very important.

I've also managed to add sccache support to xbps-src, just like ccache. Obviously, it doesn't work on sccache-0.2.13, so this PR is a blocker.

@Logarithmus Logarithmus changed the title rust-sccache: update to 0.2.15, new package: rust-sccache-dist-0.2.15 [BUGFIX] rust-sccache: update to 0.2.15, new package: rust-sccache-dist-0.2.15 May 6, 2021
@Logarithmus Logarithmus mentioned this pull request May 6, 2021
4 tasks
@ericonr
Copy link
Member

ericonr commented May 6, 2021

Please don't make separate packages, the rust-std package is 117MB compressed, and anyone using this has one (or more) rust-std installed (either via void packages or rustup).

@Logarithmus
Copy link
Contributor Author

Please don't make separate packages, the rust-std package is 117MB compressed, and anyone using this has one (or more) rust-std installed (either via void packages or rustup).

sccache supports x86_64, i686, arm* & aarch64, and sccache-dist supports only x86_64. How would you handle that in a single package? By checking $XBPS_TARGET_MACHINE and calling cargo build --release manually in template?
IMHO making 2 packages is way simpler & cleaner.

@ericonr
Copy link
Member

ericonr commented May 7, 2021

Just conditionally add --features dist-server, no?

@Logarithmus Logarithmus force-pushed the sccache branch 3 times, most recently from 2b7311d to bdb22db Compare June 29, 2021 21:52
@Logarithmus
Copy link
Contributor Author

@ericonr seems it builds fine, though during build of x86_64-musl there were some issues with Internet connection on CI server.

@Logarithmus Logarithmus changed the title [BUGFIX] rust-sccache: update to 0.2.15, new package: rust-sccache-dist-0.2.15 [BUGFIX] rust-sccache: update to 0.2.15, enable feature=dist-server for x86_64* Jun 29, 2021
@Logarithmus
Copy link
Contributor Author

Logarithmus commented Jul 27, 2021

@ericonr seems like cargo 0.54.0 has some issue with HTTP/2 and thus fails to work inside Github Actions. The issue has its roots in curl.
More info: rust-lang/cargo#9697, rust-lang/crates.io#3782 (comment), rust-lang/cargo#9695, curl/curl#7400

I really hope rust-lang/cargo#9695 will be included into rust 1.54, otherwise we will have to wait for another 6 weeks...

@redasamik
Copy link

redasamik commented Jul 27, 2021 via email

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label May 14, 2022
@github-actions github-actions bot closed this May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants