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

gcc: build with --disable-multilib, as it used only to bootstrap llvm #114523

Closed
wants to merge 4 commits into from

Conversation

klensy
Copy link
Contributor

@klensy klensy commented Aug 5, 2023

Should probably reduce CI time a little

@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Aug 5, 2023
@Kobzol
Copy link
Contributor

Kobzol commented Aug 5, 2023

Note that the GCC build is pretty much perfectly cached in Docker and almost never rebuilt. Therefore speeding up the GCC build won't actually reduce CI time.

@klensy
Copy link
Contributor Author

klensy commented Aug 5, 2023

Please kick a try build, thanks.

@Kobzol
Copy link
Contributor

Kobzol commented Aug 5, 2023

@bors try

@bors
Copy link
Contributor

bors commented Aug 5, 2023

⌛ Trying commit d3d91bce7fa1895bebc80362007839e1da3f75a9 with merge 27c5e124bc8b71c4a4a611d9a48b0b39c1fc9b2b...

@klensy
Copy link
Contributor Author

klensy commented Aug 5, 2023

Note that the GCC build is pretty much perfectly cached in Docker and almost never rebuilt. Therefore speeding up the GCC build won't actually reduce CI time.

Oh, maybe.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Aug 5, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 5, 2023
@Kobzol
Copy link
Contributor

Kobzol commented Aug 5, 2023

To provide a little more context: anything that is built inside the Dockerfile is cached via an external Docker image cache. The Docker cache sometimes gets busted, but for 99% runs it works. So there's not much point in optimizing the duration of building stuff inside the Docker. The important stuff to optimize is in the opt-dist tool, or in bootstrap itself.

@klensy
Copy link
Contributor Author

klensy commented Aug 5, 2023

Smaller size?

Kindly ask for retry, wrongly mixed comments and code in previous attempt.

@Kobzol
Copy link
Contributor

Kobzol commented Aug 5, 2023

@bors try

Smaller size of the Docker image? Possibly, but that hasn't been a bottleneck in any sort of way so far, I don't think that we need to care about that much.

@bors
Copy link
Contributor

bors commented Aug 5, 2023

⌛ Trying commit 28e0286565b86a7a2f46a368c6eb73e4e2c67f18 with merge d79d498296c64e8208946099ee74b6cb7f3d3665...

@bors
Copy link
Contributor

bors commented Aug 5, 2023

💔 Test failed - checks-actions

@Kobzol
Copy link
Contributor

Kobzol commented Aug 6, 2023

@bors try

@bors
Copy link
Contributor

bors commented Aug 6, 2023

⌛ Trying commit 6577de82ac54e90d57235b5333a2762fd48defae with merge 1ab1182368cc378834e79a5888af6e7cec32fecd...

@klensy
Copy link
Contributor Author

klensy commented Aug 6, 2023

Predicting fail here

ln /rustroot/lib/*.{a,so} -rst /rustroot/lib/gcc/x86_64-pc-linux-gnu/$GCC/32/

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Aug 6, 2023

💔 Test failed - checks-actions

@cuviper
Copy link
Member

cuviper commented Aug 14, 2023

This script is also reused by dist-i686-linux:

COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/

Their Dockerfiles are identical up to this point, which helps with caching locally, but I'm not sure if that matters in CI -- probably only the final container is relevant in that case.

@klensy
Copy link
Contributor Author

klensy commented Aug 14, 2023

Maybe move copy of build-gcc.sh for i686 into it's own folder, so

# FIXME: clang doesn't find 32-bit libraries in /rustroot/lib,
# but it does look all the way under /rustroot/lib/[...]/32,
# so we can link stuff there to help it out.
ln /rustroot/lib/*.{a,so} -rst /rustroot/lib/gcc/x86_64-pc-linux-gnu/$GCC/32/

can be removed?

@cuviper
Copy link
Member

cuviper commented Aug 14, 2023

If we split them, I think we could skip the gcc build entirely on dist-x86_64-linux and use devtoolset-11-gcc-c++, after installing centos-release-scl for the extra yum repos. IIRC, the only reason I didn't use that before, when updating to centos:7, was because it lacked 32-bit libraries.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=klensy
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_255c3366-8173-4870-b8e5-5e16276ba752
GITHUB_EVENT_NAME=pull_request
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=fa256ee66fc231920055263978c0a38103a7f51d
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_255c3366-8173-4870-b8e5-5e16276ba752
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_255c3366-8173-4870-b8e5-5e16276ba752
GITHUB_TRIGGERING_ACTOR=klensy
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/114523/merge
GITHUB_WORKFLOW_SHA=fa256ee66fc231920055263978c0a38103a7f51d
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_18_X64=/opt/hostedtoolcache/go/1.18.10/x64
---
##[endgroup]
Built container sha256:384d47c73d6f4b64ba533416b0b98c41c5499995cfcdb34342b6451ac513c639
Uploading finished image to https://ci-caches.rust-lang.org/docker/62ff09e1afc467f4a5daa8fbc463750f2c323a717370391b8e0dff971359310c166ef46cf38d54a7d03350f402f636b0c0b10f733393122b9776ad3b86a76471

<botocore.awsrequest.AWSRequest object at 0x7f1523b43550>
gzip: stdout: Broken pipe
xargs: docker: terminated by signal 13
[CI_JOB_NAME=dist-x86_64-linux]
useradd: warning: the home directory already exists.
---
Caused by:
    No such file or directory (os error 2)

Stack backtrace:
   0: <core::result::Result<opt_dist::metrics::BuildStep, anyhow::Error> as core::ops::try_trait::FromResidual<core::result::Result<core::convert::Infallible, std::io::error::Error>>>::from_residual
      opt_dist::metrics::load_metrics
             at /rustc/fa256ee66fc231920055263978c0a38103a7f51d/src/tools/opt-dist/src/metrics.rs:31:19
             at /rustc/fa256ee66fc231920055263978c0a38103a7f51d/src/tools/opt-dist/src/metrics.rs:31:19
   1: <opt_dist::exec::Bootstrap>::run
             at /rustc/fa256ee66fc231920055263978c0a38103a7f51d/src/tools/opt-dist/src/exec.rs:175:23
   2: opt_dist::execute_pipeline::{closure#1}::{closure#0}
             at /rustc/fa256ee66fc231920055263978c0a38103a7f51d/src/tools/opt-dist/src/main.rs:56:13
      <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/fa256ee66fc231920055263978c0a38103a7f51d/src/tools/opt-dist/src/timer.rs:111:22
      opt_dist::execute_pipeline::{closure#1}
             at /rustc/fa256ee66fc231920055263978c0a38103a7f51d/src/tools/opt-dist/src/main.rs:45:9
      <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, opt_dist::training::RustcPGOProfile>
             at /rustc/fa256ee66fc231920055263978c0a38103a7f51d/src/tools/opt-dist/src/timer.rs:111:22
   3: opt_dist::execute_pipeline
             at /rustc/fa256ee66fc231920055263978c0a38103a7f51d/src/tools/opt-dist/src/main.rs:42:29
             at /rustc/fa256ee66fc231920055263978c0a38103a7f51d/src/tools/opt-dist/src/main.rs:207:18
   4: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/7ba605cd90d6467bda469d1cd2148ac32ea562bf/library/core/src/ops/function.rs:250:5
             at /rustc/7ba605cd90d6467bda469d1cd2148ac32ea562bf/library/core/src/ops/function.rs:250:5
      std::sys_common::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
   5: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/7ba605cd90d6467bda469d1cd2148ac32ea562bf/library/std/src/rt.rs:166:18
             at /rustc/7ba605cd90d6467bda469d1cd2148ac32ea562bf/library/std/src/rt.rs:166:18
   6: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
      std::panicking::try::do_call
             at /rustc/7ba605cd90d6467bda469d1cd2148ac32ea562bf/library/std/src/panicking.rs:500:40
      std::panicking::try
             at /rustc/7ba605cd90d6467bda469d1cd2148ac32ea562bf/library/std/src/panicking.rs:464:19

@bors
Copy link
Contributor

bors commented Oct 14, 2023

☔ The latest upstream changes (presumably #116352) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC
Copy link
Member

@klensy any updates on this? thanks

@Dylan-DPC
Copy link
Member

Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks

@Dylan-DPC Dylan-DPC closed this Sep 25, 2024
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants