port tests/run-make/extern-fn-reachable to rmake
uses helper functions added in #128147, must not be merged before that PR.
try-job: aarch64-apple try-job: armhf-gnu try-job: test-various try-job: x86_64-msvc try-job: x86_64-mingw try-job: i686-msvc try-job: i686-mingw try-job: x86_64-gnu-llvm-17
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jieyouxu (or someone else) some time within the next two weeks.
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
The run-make-support library was changed
cc @jieyouxu
This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.
cc @jieyouxu
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)
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
--stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#13 2.821 Building wheels for collected packages: reuse
#13 2.822 Building wheel for reuse (pyproject.toml): started
#13 3.065 Building wheel for reuse (pyproject.toml): finished with status 'done'
#13 3.066 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#13 3.066 Stored in directory: /tmp/pip-ephem-wheel-cache-fkzz_s1q/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#13 3.069 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#13 3.464 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#13 3.465 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
#13 3.988 Collecting virtualenv
#13 3.988 Collecting virtualenv
#13 4.045 Downloading virtualenv-20.26.3-py3-none-any.whl (5.7 MB)
#13 4.273 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 25.2 MB/s eta 0:00:00
#13 4.329 Collecting platformdirs<5,>=3.9.1
#13 4.337 Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB)
#13 4.359 Collecting distlib<1,>=0.3.7
#13 4.382 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 43.5 MB/s eta 0:00:00
#13 4.422 Collecting filelock<4,>=3.12.2
#13 4.429 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
#13 4.429 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
#13 4.511 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 4.702 Successfully installed distlib-0.3.8 filelock-3.15.4 platformdirs-4.2.2 virtualenv-20.26.3
#13 DONE 4.8s
#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k: 196544 kB
DirectMap2M: 7143424 kB
DirectMap1G: 11534336 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/78c857394ec8c01f06cb1df260c51178180a40e5/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-78c857394ec8c01f06cb1df260c51178180a40e5-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
##[endgroup]
fmt check
fmt: checked 5399 files
tidy check
tidy error: Makefile `/checkout/tests/run-make/extern-fn-reachable/Makefile` no longer exists and should be removed from the exclusions in `src/tools/tidy/src/allowed_run_make_makefiles.txt`, you can run `x test tidy --bless` to update the allow list
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 (24.1)
Downloading pip-24.1.2-py3-none-any.whl.metadata (3.6 kB)
Downloading pip-24.1.2-py3-none-any.whl (1.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 11.5 MB/s eta 0:00:00
Installing collected packages: pip
---
All checks passed!
checking C++ file formatting
some tidy checks failed
Command LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/rust-tidy" "/checkout" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "/checkout/obj/build" "4" "--extra-checks=py:lint,cpp:fmt" (failure_mode=DelayFail) did not execute successfully.
Created at: src/core/build_steps/tool.rs:1116:23
Executed at: src/core/build_steps/test.rs:1084:29
Build completed unsuccessfully in 0:01:18
:umbrella: The latest upstream changes (presumably #128147) made this pull request unmergeable. Please resolve the merge conflicts.
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)
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
--stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#13 2.970 Building wheels for collected packages: reuse
#13 2.971 Building wheel for reuse (pyproject.toml): started
#13 3.222 Building wheel for reuse (pyproject.toml): finished with status 'done'
#13 3.223 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#13 3.223 Stored in directory: /tmp/pip-ephem-wheel-cache-9gbua_uj/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#13 3.225 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#13 3.622 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#13 3.623 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
#13 4.158 Collecting virtualenv
#13 4.158 Collecting virtualenv
#13 4.206 Downloading virtualenv-20.26.3-py3-none-any.whl (5.7 MB)
#13 4.430 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 25.6 MB/s eta 0:00:00
#13 4.486 Collecting platformdirs<5,>=3.9.1
#13 4.494 Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB)
#13 4.515 Collecting distlib<1,>=0.3.7
#13 4.534 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 50.3 MB/s eta 0:00:00
#13 4.572 Collecting filelock<4,>=3.12.2
#13 4.579 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
#13 4.579 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
#13 4.660 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 4.851 Successfully installed distlib-0.3.8 filelock-3.15.4 platformdirs-4.2.2 virtualenv-20.26.3
#13 DONE 4.9s
#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k: 245696 kB
DirectMap2M: 7094272 kB
DirectMap1G: 11534336 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/53676730146e38e4697b6204c2ee61a9fd6b7e51/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-53676730146e38e4697b6204c2ee61a9fd6b7e51-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
+use run_make_support::rustc;
+use run_make_support::symbols::contains_exact_symbols;
fn main() {
rustc().input("dylib.rs").output("dylib.so").prefer_dynamic().run();
fmt error: Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/tests/run-make/exit-code/rmake.rs" "/checkout/tests/run-make/exit-code/success.rs" "/checkout/tests/run-make/exit-code/compile-error.rs" "/checkout/tests/run-make/redundant-libs/main.rs" "/checkout/tests/run-make/dylib-soname/foo.rs" "/checkout/tests/run-make/dylib-soname/rmake.rs" "/checkout/tests/run-make/libtest-padding/rmake.rs" "/checkout/tests/run-make/libtest-padding/tests.rs" "/checkout/tests/run-make/pgo-gen-lto/test.rs" "/checkout/tests/run-make/inaccessible-temp-dir/rmake.rs" "/checkout/tests/run-make/inaccessible-temp-dir/program.rs" "/checkout/tests/run-make/macos-fat-archive/rmake.rs" "/checkout/tests/run-make/macos-fat-archive/lib.rs" "/checkout/tests/run-make/raw-dylib-c/driver.rs" "/checkout/tests/run-make/raw-dylib-c/lib.rs" "/checkout/tests/run-make/extern-fn-reachable/rmake.rs" "/checkout/tests/run-make/extern-fn-reachable/dylib.rs" "/checkout/tests/run-make/ice-static-mir/foo.rs" "/checkout/tests/run-make/ice-static-mir/bar.rs" "/checkout/tests/run-make/ice-static-mir/baz.rs" "/checkout/tests/run-make/ice-static-mir/rmake.rs" "/checkout/tests/run-make/interdependent-c-libraries/foo.rs" "/checkout/tests/run-make/interdependent-c-libraries/bar.rs" "/checkout/tests/run-make/interdependent-c-libraries/rmake.rs" "/checkout/tests/run-make/interdependent-c-libraries/main.rs" "/checkout/tests/run-make/sanitizer-dylib-link/rmake.rs" "/checkout/tests/run-make/sanitizer-dylib-link/program.rs" "/checkout/tests/run-make/sanitizer-dylib-link/library.rs" "/checkout/src/tools/run-make-support/src/external_deps/cygpath.rs" "/checkout/src/tools/run-make-support/src/external_deps/rustdoc.rs" "/checkout/src/tools/run-make-support/src/external_deps/cc.rs" "/checkout/src/tools/run-make-support/src/external_deps/clang.rs" "/checkout/src/tools/run-make-support/src/external_deps/c_build.rs" "/checkout/src/tools/run-make-support/src/external_deps/rustc.rs" "/checkout/src/tools/run-make-support/src/external_deps/python.rs" "/checkout/src/tools/run-make-support/src/external_deps/mod.rs" "/checkout/src/tools/run-make-support/src/external_deps/llvm.rs" "/checkout/src/tools/run-make-support/src/scoped_run.rs" "/checkout/src/tools/run-make-support/src/util.rs" "/checkout/src/tools/run-make-support/src/macros.rs" "/checkout/src/tools/lld-wrapper/src/main.rs" "/checkout/src/tools/x/src/main.rs" "/checkout/src/tools/suggest-tests/src/static_suggestions.rs" "/checkout/src/tools/suggest-tests/src/tests.rs" "/checkout/src/tools/suggest-tests/src/lib.rs" "/checkout/src/tools/suggest-tests/src/dynamic_suggestions.rs" "/checkout/src/tools/suggest-tests/src/main.rs" "/checkout/src/tools/rustdoc-themes/main.rs" "/checkout/src/tools/tidy/src/walk.rs" "/checkout/src/tools/tidy/src/error_codes.rs" "/checkout/src/tools/tidy/src/unknown_revision.rs" "/checkout/src/tools/tidy/src/alphabetical/tests.rs" "/checkout/src/tools/tidy/src/fluent_alphabetical.rs" "/checkout/src/tools/tidy/src/target_specific_tests.rs" "/checkout/src/tools/tidy/src/rustdoc_gui_tests.rs" "/checkout/src/tools/tidy/src/pal.rs" "/checkout/src/tools/tidy/src/debug_artifacts.rs" "/checkout/src/tools/tidy/src/ui_tests.rs" "/checkout/src/tools/tidy/src/run_make_tests.rs" "/checkout/src/tools/tidy/src/alphabetical.rs" "/checkout/src/tools/tidy/src/rustdoc_css_themes.rs" "/checkout/src/tools/tidy/src/features/version/tests.rs" "/checkout/src/tools/tidy/src/features/tests.rs" "/checkout/tests/run-make/exit-code/lint-failure.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
local time: Fri Aug 2 15:20:41 UTC 2024
network time: Fri, 02 Aug 2024 15:20:41 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
:umbrella: The latest upstream changes (presumably #127926) made this pull request unmergeable. Please resolve the merge conflicts.
@rustbot author
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)
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
--stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#13 2.883 Building wheels for collected packages: reuse
#13 2.884 Building wheel for reuse (pyproject.toml): started
#13 3.147 Building wheel for reuse (pyproject.toml): finished with status 'done'
#13 3.149 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#13 3.149 Stored in directory: /tmp/pip-ephem-wheel-cache-m8m4lycm/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#13 3.151 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#13 3.561 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#13 3.561 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
#13 4.147 Collecting virtualenv
#13 4.147 Collecting virtualenv
#13 4.197 Downloading virtualenv-20.26.3-py3-none-any.whl (5.7 MB)
#13 4.354 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 36.9 MB/s eta 0:00:00
#13 4.408 Collecting platformdirs<5,>=3.9.1
#13 4.415 Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB)
#13 4.451 Collecting filelock<4,>=3.12.2
#13 4.476 Collecting distlib<1,>=0.3.7
#13 4.481 Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)
#13 4.489 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 86.7 MB/s eta 0:00:00
#13 4.489 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 86.7 MB/s eta 0:00:00
#13 4.575 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 4.771 Successfully installed distlib-0.3.8 filelock-3.15.4 platformdirs-4.2.2 virtualenv-20.26.3
#13 DONE 4.9s
#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k: 206784 kB
DirectMap2M: 8181760 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,cpp:fmt
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/60d146580c10036ce89e019422c6bc2fd9729b65/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-60d146580c10036ce89e019422c6bc2fd9729b65-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
use run_make_support::rustc;
use run_make_support::symbols::assert_contains_exact_symbols;
-use run_make_support::object::ObjectSymbol;
fn main() {
rustc().input("dylib.rs").output("dylib.so").prefer_dynamic().run();
- "dylib.so",
- "dylib.so",
- &["fun1", "fun2", "fun3", "fun4", "fun5"],
- |sym| dbg!(dbg!(sym).is_global()) && !dbg!(sym.is_undefined()),
- );
+ assert_contains_exact_symbols("dylib.so", &["fun1", "fun2", "fun3", "fun4", "fun5"], |sym| {
+ dbg!(dbg!(sym).is_global()) && !dbg!(sym.is_undefined())
}
fmt error: Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/tests/run-make/metadata-dep-info/dash-separated.rs" "/checkout/tests/run-make/metadata-dep-info/rmake.rs" "/checkout/tests/run-make/link-arg/empty.rs" "/checkout/tests/run-make/link-arg/rmake.rs" "/checkout/tests/run-make/raw-dylib-inline-cross-dylib/lib_wrapper.rs" "/checkout/tests/run-make/raw-dylib-inline-cross-dylib/rmake.rs" "/checkout/tests/run-make/raw-dylib-inline-cross-dylib/driver.rs" "/checkout/tests/run-make/raw-dylib-inline-cross-dylib/lib.rs" "/checkout/tests/run-make/libtest-thread-limit/test.rs" "/checkout/tests/run-make/exit-code/lint-failure.rs" "/checkout/tests/run-make/exit-code/rmake.rs" "/checkout/tests/run-make/exit-code/success.rs" "/checkout/tests/run-make/exit-code/compile-error.rs" "/checkout/tests/run-make/redundant-libs/main.rs" "/checkout/tests/run-make/dylib-soname/foo.rs" "/checkout/tests/run-make/dylib-soname/rmake.rs" "/checkout/tests/run-make/libtest-padding/rmake.rs" "/checkout/tests/run-make/libtest-padding/tests.rs" "/checkout/tests/run-make/pgo-gen-lto/test.rs" "/checkout/tests/run-make/inaccessible-temp-dir/rmake.rs" "/checkout/tests/run-make/inaccessible-temp-dir/program.rs" "/checkout/tests/run-make/macos-fat-archive/rmake.rs" "/checkout/tests/run-make/macos-fat-archive/lib.rs" "/checkout/tests/run-make/raw-dylib-c/driver.rs" "/checkout/tests/run-make/raw-dylib-c/lib.rs" "/checkout/tests/run-make/extern-fn-reachable/rmake.rs" "/checkout/tests/run-make/extern-fn-reachable/dylib.rs" "/checkout/tests/run-make/ice-static-mir/foo.rs" "/checkout/tests/run-make/ice-static-mir/bar.rs" "/checkout/tests/run-make/ice-static-mir/baz.rs" "/checkout/tests/run-make/ice-static-mir/rmake.rs" "/checkout/tests/run-make/interdependent-c-libraries/foo.rs" "/checkout/tests/run-make/interdependent-c-libraries/bar.rs" "/checkout/tests/run-make/interdependent-c-libraries/rmake.rs" "/checkout/tests/run-make/interdependent-c-libraries/main.rs" "/checkout/tests/run-make/sanitizer-dylib-link/rmake.rs" "/checkout/tests/run-make/sanitizer-dylib-link/program.rs" "/checkout/tests/run-make/sanitizer-dylib-link/library.rs" "/checkout/tests/run-make/wasm-symbols-not-exported/foo.rs" "/checkout/tests/run-make/wasm-symbols-not-exported/bar.rs" "/checkout/tests/run-make/wasm-symbols-not-exported/rmake.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-multiple/examples/ex.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-multiple/examples/ex2.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-multiple/src/lib.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-multiple/rmake.rs" "/checkout/tests/run-make/incr-add-rust-src-component/main.rs" "/checkout/tests/run-make/llvm-outputs/rmake.rs" "/checkout/tests/run-make/no-input-file/rmake.rs" "/checkout/tests/run-make/dep-info-doesnt-run-much/foo.rs" "/checkout/tests/run-make/cpp-global-destructors/foo.rs" "/checkout/tests/run-make/cpp-global-destructors/rmake.rs" "/checkout/tests/run-make/duplicate-output-flavors/foo.rs" "/checkout/tests/run-make/duplicate-output-flavors/rmake.rs" "/checkout/tests/run-make/rlib-format-packed-bundled-libs-3/rmake.rs" "/checkout/tests/run-make/rlib-format-packed-bundled-libs-3/rust_dep_cfg.rs" "/checkout/tests/run-make/rlib-format-packed-bundled-libs-3/main.rs" "/checkout/tests/run-make/rlib-format-packed-bundled-libs-3/rust_dep.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-macros/src/proc.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-macros/src/lib.rs" "/checkout/tests/run-make/rustdoc-scrape-examples-macros/rmake.rs" "/checkout/tests/run-make/sanitizer-cdylib-link/rmake.rs" "/checkout/tests/run-make/sanitizer-cdylib-link/program.rs" "/checkout/tests/run-make/use-suggestions-rust-2018/ep-nested-lib.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
local time: Tue Aug 6 19:00:01 UTC 2024
network time: Tue, 06 Aug 2024 19:00:01 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
@rustbot review
@bors try
:hourglass: Trying commit c1d8892acf1d485e9b3bc63d09d987e9cd816d0e with merge b5490c82c9d567d58d0cb22905e827343e39ba4e...
The job aarch64-apple failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
Updating files: 98% (47999/48978)
Updating files: 99% (48489/48978)
Updating files: 100% (48978/48978)
Updating files: 100% (48978/48978), done.
Switched to a new branch 'try'
branch 'try' set up to track 'origin/try'.
[command]/opt/homebrew/bin/git log -1 --format='%H'
'b5490c82c9d567d58d0cb22905e827343e39ba4e'
##[group]Run src/ci/scripts/setup-environment.sh
src/ci/scripts/setup-environment.sh
---
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
file:.git/config submodule.library/stdarch.url=https://github.com/rust-lang/stdarch.git
file:.git/config submodule.src/doc/book.active=true
---
---- [run-make] tests/run-make/extern-fn-reachable stdout ----
error: rmake recipe failed to complete
status: exit status: 101
command: cd "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/run-make/extern-fn-reachable/rmake_out" && env -u RUSTFLAGS AR="ar" CC="/Applications/Xcode_14.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=11 -isysroot /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk" CXX="/Applications/Xcode_14.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC --target=arm64-apple-darwin -mmacosx-version-min=11 -isysroot /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -stdlib=libc++" DYLD_LIBRARY_PATH="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0-bootstrap-tools/aarch64-apple-darwin/release/deps:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0/lib:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2-tools-bin:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/lib/rustlib/aarch64-apple-darwin/lib" HOST_RPATH_DIR="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/lib" LD_LIB_PATH_ENVVAR="DYLD_LIBRARY_PATH" LLVM_BIN_DIR="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/ci-llvm/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen codegendata codegentypes core coroutines coverage csky cskyasmparser cskycodegen cskydesc cskydisassembler cskyinfo debuginfobtf debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerclassic dwarflinkerparallel dwp engine executionengine extensions filecheck frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo hipstdpar instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcdebugging orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld sandboxir scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser textapi textapibinaryreader transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray xtensa xtensaasmparser xtensacodegen xtensadesc xtensadisassembler xtensainfo" LLVM_FILECHECK="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/ci-llvm/bin/FileCheck" NODE="/opt/homebrew/bin/node" PYTHON="/usr/bin/python3" RUSTC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" RUSTDOC="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustdoc" SOURCE_ROOT="/Users/runner/work/rust/rust" TARGET="aarch64-apple-darwin" TARGET_RPATH_DIR="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/lib/rustlib/aarch64-apple-darwin/lib" TARGET_RPATH_ENV="/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/run-make/extern-fn-reachable/rmake_out:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0-bootstrap-tools/aarch64-apple-darwin/release/deps:/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage0/lib" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/run-make/extern-fn-reachable/rmake"
--- stderr -------------------------------
--- stderr -------------------------------
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:14] sym = Symbol {
name: "_fun1",
address: 16292,
size: 0,
section: Section(
SectionIndex(
1,
),
),
),
scope: Dynamic,
weak: false,
flags: MachO {
n_desc: 0,
},
}
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:9] dbg!(sym).is_global() = true
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:41] sym.is_undefined() = false
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:14] sym = Symbol {
name: "_fun2",
address: 16296,
size: 0,
section: Section(
SectionIndex(
1,
),
),
),
scope: Dynamic,
weak: false,
flags: MachO {
n_desc: 0,
},
}
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:9] dbg!(sym).is_global() = true
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:41] sym.is_undefined() = false
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:14] sym = Symbol {
name: "_fun3",
address: 16300,
size: 0,
section: Section(
SectionIndex(
1,
),
),
),
scope: Dynamic,
weak: false,
flags: MachO {
n_desc: 0,
},
}
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:9] dbg!(sym).is_global() = true
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:41] sym.is_undefined() = false
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:14] sym = Symbol {
name: "_fun4",
address: 16304,
size: 0,
section: Section(
SectionIndex(
1,
),
),
),
scope: Dynamic,
weak: false,
flags: MachO {
n_desc: 0,
},
}
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:9] dbg!(sym).is_global() = true
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:41] sym.is_undefined() = false
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:14] sym = Symbol {
name: "_fun5",
address: 16308,
size: 0,
section: Section(
SectionIndex(
1,
),
),
),
scope: Dynamic,
weak: false,
flags: MachO {
n_desc: 0,
},
}
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:9] dbg!(sym).is_global() = true
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:41] sym.is_undefined() = false
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:14] sym = Symbol {
name: "_rust_metadata_dylib_466e03c52fa389c6",
address: 16384,
size: 0,
kind: Unknown,
SectionIndex(
3,
),
),
),
scope: Dynamic,
weak: false,
flags: MachO {
n_desc: 0,
},
}
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:9] dbg!(sym).is_global() = true
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:41] sym.is_undefined() = false
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:14] sym = Symbol {
name: "dyld_stub_binder",
address: 0,
size: 0,
kind: Unknown,
section: Undefined,
scope: Unknown,
weak: false,
flags: MachO {
n_desc: 512,
}
}
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:9] dbg!(sym).is_global() = true
[/Users/runner/work/rust/rust/tests/run-make/extern-fn-reachable/rmake.rs:8:41] sym.is_undefined() = true
dylib.so does not contain symbol(s):
* fun1
* fun2
* fun3
* fun4
* fun5
missing symbols
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------
:broken_heart: Test failed - checks-actions
Symbol names on OSX are listed as _fun4 with a ~~trailing~~ leading underscore. In previous tests, we've been doing the rough and potentially prone to error check of "does this output contain the string fun4". If you want to make this correct, you may consider adding an is_darwin check to your helper function to autoformat symbols.
Symbol names on OSX are listed as _fun4 with a trailing underscore.
do you mean a leading underscore? or do you mean its listed as _fun_?
Leading, sorry, it's a typo.
@Oneirical any idea why it does that? is there some piece of documentation saying that's how it works?
it seems odd that a no_mangle symbol would be subject to a form of mangling.
any idea why it does that? is there some piece of documentation saying that's how it works?
it seems odd that a no_mangle symbol would be subject to a form of mangling.
@lolbinarycat based on https://developer.apple.com/forums/thread/715385
C, and all later languages, add a leading underscore (_) to distinguish their symbols from assembly language symbols.
It might be a macos/apple linker convention that we follow?
From triage. @lolbinarycat Do you need to address something from above or it's ready for review?
@alex-semenyuk this is mostly blocked on "symbols are really weird on other platforms and i don't fully understand what's going on"
I need to revisit this and ask the target maintainers and people who know about the symbol situation.
Dear apple experts, do you know if macOS expects dylib symbol names with an underscore prefix? The closest thing I can find is developer.apple.com/forums/thread/715385 and the sentence "C, and all later languages, add a leading underscore (_) to distinguish their symbols from assembly language symbols." I'm asking as I don't know what is the intended behavior.
@rustbot ping apple
Hey Apple notification group! This issue or PR could use some Apple-specific guidance. Could one of you weigh in? Thanks <3
(In case it's useful, here are some instructions for tackling these sorts of issues).
cc @BlackHoleFox @hkratz @inflation @madsmtm @nvzqz @shepmaster @thomcc
Dear apple experts, do you know if macOS expects dylib symbol names with an underscore prefix?
Yes. dyld expects anything beyond assembly procedures starts with an underscore prefix.
Dear apple experts, do you know if macOS expects dylib symbol names with an underscore prefix?
Yes. dyld expects anything beyond assembly procedures starts with an underscore prefix.
Thank you, that's what I expected but I couldn't find relevant "official" docs. Do you know of any official docs or references that describes this? I couldn't find anything in docs for dyld (incl. its man pages) that describes this.
The closest I got is https://opensource.apple.com/source/dyld/dyld-132.13/src/dyldAPIs.cpp.auto.html and
void* dlsym(void* handle, const char* symbolName)
{
if ( dyld::gLogAPIs )
dyld::log("%s(%p, %s)\n", __func__, handle, symbolName);
dlerrorClear();
const ImageLoader* image;
const ImageLoader::Symbol* sym;
// dlsym() assumes symbolName passed in is same as in C source code
// dyld assumes all symbol names have an underscore prefix
which is almost like "source: I made it up" lol.
@bjorn3 said:
Mach-O states that all exported symbols should have an underscore as prefix. At the same time dlsym will implicitly add it, so outside of compilers, linkers and people writing assembly, nobody needs to be aware of this.
On macOS we should expect that the dylib symbol begins with an underscore _.
@rustbot author
:umbrella: The latest upstream changes (presumably #131387) made this pull request unmergeable. Please resolve the merge conflicts.
@lolbinarycat
ping from triage - can you post your status on this PR? This PR has not received an update in a few months.
Well, first that was because it was blocked on figuring out what macos is up to, now it's just because i've been busy with other things.
I'll try and finish this up, but if anyone else has more time on their hands and wants to take ownership of this PR, let me know.