Skip to content

Conversation

cmuellner
Copy link

The build of rustc_codegen_cranelift is currently broken because of a build issue with its dependency libc:

 Compiling libc v0.2.148 error: invalid `--check-cfg` argument: `values(emscripten_new_stat_abi)` (expected `cfg(name, values("value1", "value2", ... "valueN"))`) [RUSTC-TIMING] libc test:false 0.332 error: could not compile `libc` (lib) due to 1 previous error 

Let's update Cargo.lock to resolve this issue.

The build of rustc_codegen_cranelift is currently broken because of a build issue with its dependency libc: Compiling libc v0.2.148 error: invalid `--check-cfg` argument: `values(emscripten_new_stat_abi)` (expected `cfg(name, values("value1", "value2", ... "valueN"))`) [RUSTC-TIMING] libc test:false 0.332 error: could not compile `libc` (lib) due to 1 previous error Let's update Cargo.lock to resolve this issue. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 8, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jan 8, 2024

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-tidy failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Prepare all required actions Getting action download info Download action repository 'actions/checkout@v4' (SHA:b4ffde65f46336ab88eb53be808477a3936bae11) Download action repository 'actions/upload-artifact@v3' (SHA:a8a3f3ad30e3422c9c7b888a15615d19a852ae32) Complete job name: PR - mingw-check-tidy git config --global core.autocrlf false shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} --- GITHUB_ACTION=__run_7 GITHUB_ACTIONS=true GITHUB_ACTION_REF= GITHUB_ACTION_REPOSITORY= GITHUB_ACTOR=cmuellner GITHUB_API_URL=https://api.github.com GITHUB_BASE_REF=master GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_35df0559-e125-4741-9d83-a7d438ac5592 GITHUB_EVENT_NAME=pull_request --- GITHUB_SERVER_URL=https://github.com GITHUB_SHA=f07825935f4bb657899861198fe7bb66fbffc2a7 GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_35df0559-e125-4741-9d83-a7d438ac5592 GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_35df0559-e125-4741-9d83-a7d438ac5592 GITHUB_TRIGGERING_ACTOR=cmuellner GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/119741/merge GITHUB_WORKFLOW_SHA=f07825935f4bb657899861198fe7bb66fbffc2a7 GITHUB_WORKSPACE=/home/runner/work/rust/rust GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64 --- Removing intermediate container 473257a68740 ---> 571d14bce348 Step 6/10 : COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/ ---> 1e7fa8c7b965 Step 7/10 : RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt && pip3 install virtualenv Collecting binaryornot==0.4.4 Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB) Collecting boolean-py==4.0 Downloading boolean.py-4.0-py3-none-any.whl (25 kB) --- Building wheels for collected packages: reuse Building wheel for reuse (pyproject.toml): started Building wheel for reuse (pyproject.toml): finished with status 'done' Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=180123 sha256=f323ccf11d14c5b11f6d5e70edb46e391f4b49a5df5c7d922224477ad8ee15c5 Stored in directory: /tmp/pip-ephem-wheel-cache-7ho4dez1/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet Attempting uninstall: setuptools Found existing installation: setuptools 59.6.0 Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr Can't uninstall 'setuptools'. No files were found to uninstall. Successfully installed binaryornot-0.4.4 boolean-py-4.0 chardet-5.1.0 jinja2-3.1.2 license-expression-30.0.0 markupsafe-2.1.1 python-debian-0.1.49 reuse-1.1.0 setuptools-66.0.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Collecting virtualenv Downloading virtualenv-20.25.0-py3-none-any.whl (3.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.8/3.8 MB 20.1 MB/s eta 0:00:00 Collecting platformdirs<5,>=3.9.1 Downloading platformdirs-4.1.0-py3-none-any.whl (17 kB) Collecting distlib<1,>=0.3.7 Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB) Collecting filelock<4,>=3.12.2 Downloading filelock-3.13.1-py3-none-any.whl (11 kB) Downloading filelock-3.13.1-py3-none-any.whl (11 kB) Installing collected packages: distlib, platformdirs, filelock, virtualenv Successfully installed distlib-0.3.8 filelock-3.13.1 platformdirs-4.1.0 virtualenv-20.25.0 Removing intermediate container bee6c2d25f65 ---> 76d72959d6be Step 8/10 : COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/ ---> ed0991698743 ---> ed0991698743 Step 9/10 : COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/ ---> 035055c8a089 Step 10/10 : ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint Removing intermediate container 8b35b36c7bf7 ---> ea1c4c673bb6 Successfully built ea1c4c673bb6 Successfully tagged rust-ci:latest Successfully tagged rust-ci:latest ##[endgroup] Built container sha256:ea1c4c673bb6e69708bf66e1b411eef2b42f2ad0d4cd51f43b73411d19b3ab1a Uploading finished image sha256:ea1c4c673bb6e69708bf66e1b411eef2b42f2ad0d4cd51f43b73411d19b3ab1a to https://ci-caches.rust-lang.org/docker/139141a603ff222e98d20ef66f0e4eaedfc4b373e41d302ecff577f90ee0c6cf0cab092d18a8f6a073c88b362b9a680d3b2b6e5c828faaf25d1b853eabb78b1a IMAGE CREATED CREATED BY SIZE COMMENT ea1c4c673bb6 1 second ago /bin/sh -c #(nop) ENV SCRIPT=TIDY_PRINT_DIF… 0B ed0991698743 2 seconds ago /bin/sh -c #(nop) COPY file:078ea1d11e7b7cda… 367B 76d72959d6be 3 seconds ago |1 DEBIAN_FRONTEND=noninteractive /bin/sh -c… 23.9MB 1e7fa8c7b965 10 seconds ago /bin/sh -c #(nop) COPY file:ac591dd6bc5afa66… 5.33kB 571d14bce348 11 seconds ago |1 DEBIAN_FRONTEND=noninteractive /bin/sh -c… 23.1MB --- <missing> 3 weeks ago /bin/sh -c #(nop) LABEL org.opencontainers.… 0B <missing> 3 weeks ago /bin/sh -c #(nop) ARG LAUNCHPAD_BUILD_ARCH 0B <missing> 3 weeks ago /bin/sh -c #(nop) ARG RELEASE 0B <botocore.awsrequest.AWSRequest object at 0x7fe3f2d367d0> gzip: stdout: Broken pipe xargs: docker: terminated by signal 13 https://ci-caches.rust-lang.org/docker/139141a603ff222e98d20ef66f0e4eaedfc4b373e41d302ecff577f90ee0c6cf0cab092d18a8f6a073c88b362b9a680d3b2b6e5c828faaf25d1b853eabb78b1a sha256:ea1c4c673bb6e69708bf66e1b411eef2b42f2ad0d4cd51f43b73411d19b3ab1a --- DirectMap4k: 171968 kB DirectMap2M: 8216576 kB DirectMap1G: 10485760 kB ##[endgroup] Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint + TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint Finished dev [unoptimized] target(s) in 0.03s ##[endgroup] downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/0ee9cfd54db7b5f4be35f026588904500c866196/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz extracting /checkout/obj/build/cache/llvm-0ee9cfd54db7b5f4be35f026588904500c866196-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm --- Finished release [optimized] target(s) in 25.50s ##[endgroup] fmt check tidy check Go to `src/tools/tidy/src/deps.rs:184` for the list. tidy error: Dependency for compiler/rustc_codegen_cranelift not explicitly permitted: syn 2.0.48 (registry+https://github.com/rust-lang/crates.io-index) tidy error: Dependency for compiler/rustc_codegen_cranelift not explicitly permitted: unicode-ident 1.0.12 (registry+https://github.com/rust-lang/crates.io-index) tidy error: Dependency for compiler/rustc_codegen_cranelift not explicitly permitted: quote 1.0.35 (registry+https://github.com/rust-lang/crates.io-index) tidy error: Dependency for compiler/rustc_codegen_cranelift not explicitly permitted: zerocopy-derive 0.7.32 (registry+https://github.com/rust-lang/crates.io-index) tidy error: Dependency for compiler/rustc_codegen_cranelift not explicitly permitted: zerocopy 0.7.32 (registry+https://github.com/rust-lang/crates.io-index) tidy error: Dependency for compiler/rustc_codegen_cranelift not explicitly permitted: proc-macro2 1.0.76 (registry+https://github.com/rust-lang/crates.io-index) removing old virtual environment removing old virtual environment creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (23.3.1) Collecting pip Downloading pip-23.3.2-py3-none-any.whl.metadata (3.5 kB) Downloading pip-23.3.2-py3-none-any.whl (2.1 MB) Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 23.3.1 Uninstalling pip-23.3.1: Uninstalling pip-23.3.1: Successfully uninstalled pip-23.3.1 Successfully installed pip-23.3.2 Collecting black==23.3.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 7)) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 10.7 MB/s eta 0:00:00 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 10.7 MB/s eta 0:00:00 Collecting click==8.1.3 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 34)) Downloading click-8.1.3-py3-none-any.whl (96 kB) Collecting importlib-metadata==6.7.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 38)) Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB) Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB) Collecting mypy-extensions==1.0.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 42)) Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB) Collecting packaging==23.1 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 46)) Downloading packaging-23.1-py3-none-any.whl (48 kB) Collecting pathspec==0.11.1 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 50)) Downloading pathspec-0.11.1-py3-none-any.whl (29 kB) Downloading pathspec-0.11.1-py3-none-any.whl (29 kB) Collecting platformdirs==3.6.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 54)) Downloading platformdirs-3.6.0-py3-none-any.whl (16 kB) Collecting ruff==0.0.272 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 58)) Downloading ruff-0.0.272-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB) Collecting tomli==2.0.1 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 77)) Downloading tomli-2.0.1-py3-none-any.whl (12 kB) Collecting typed-ast==1.5.4 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 81)) Downloading typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (877 kB) Downloading typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (877 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 877.7/877.7 kB 55.6 MB/s eta 0:00:00 Collecting typing-extensions==4.6.3 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 107)) Downloading typing_extensions-4.6.3-py3-none-any.whl (31 kB) Collecting zipp==3.15.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 114)) Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB) Installing collected packages: zipp, typing-extensions, typed-ast, tomli, ruff, platformdirs, pathspec, packaging, mypy-extensions, click, importlib-metadata, black Successfully installed black-23.3.0 click-8.1.3 importlib-metadata-6.7.0 mypy-extensions-1.0.0 packaging-23.1 pathspec-0.11.1 platformdirs-3.6.0 ruff-0.0.272 tomli-2.0.1 typed-ast-1.5.4 typing-extensions-4.6.3 zipp-3.15.0 some tidy checks failed Build completed unsuccessfully in 0:01:03 local time: Mon Jan 8 14:30:22 UTC 2024 network time: Mon, 08 Jan 2024 14:30:22 GMT 
@bjorn3
Copy link
Member

bjorn3 commented Jan 8, 2024

  1. --check-cfg shouldn't apply to non-local dependencies like libc.
  2. Could you please open this PR against https://github.com/rust-lang/rustc_codegen_cranelift?
  3. Could you avoid updating ahash? It introduces a proc macro dependency and I'm trying to avoid all uses of proc macros because of the compile time hit.
@davidtwco
Copy link
Member

r? @bjorn3

@rustbot rustbot assigned bjorn3 and unassigned davidtwco Jan 8, 2024
@Urgau
Copy link
Member

Urgau commented Jan 8, 2024

@bjorn3 The libc crate has a exception in bootstrap that (unconditionally) enables --check-cfg support for it.

// Downstream forks of the Rust compiler might want to use a custom libc to add support for
// targets that are not yet available upstream. Adding a patch to replace libc with a
// custom one would cause compilation errors though, because Cargo would interpret the
// custom libc as part of the workspace, and apply the check-cfg lints on it.
//
// The libc build script emits check-cfg flags only when this environment variable is set,
// so this line allows the use of custom libcs.
cargo.env("LIBC_CHECK_CFG", "1");

I'm not sure why CI didn't failed, but rustc_codegen_gcc failed earlier and I had to update their libc version to 0.2.150 (the first version that fixed the issue). I also had to update the libc version of rustc, std... when changing the syntax.

@bors
Copy link
Collaborator

bors commented Jan 27, 2024

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

@bjorn3
Copy link
Member

bjorn3 commented Jan 27, 2024

Some of the dependencies were updated in another PR.

@wesleywiser wesleywiser 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 Mar 21, 2024
@cmuellner
Copy link
Author

I won't find enough time to revisit this.
Therefore, closing the issue.

@cmuellner cmuellner closed this Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

8 participants