Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Add host link path in rustc invocations to reenable rmpv testcase #291

Merged
merged 3 commits into from
May 15, 2022

Conversation

dario23
Copy link
Contributor

@dario23 dario23 commented May 6, 2022

No description provided.

@dario23 dario23 force-pushed the debug-rmpv-ci branch 2 times, most recently from 2520619 to a4a1781 Compare May 6, 2022 22:03
@dario23
Copy link
Contributor Author

dario23 commented May 14, 2022

ok, got a lead: the stderr for the cargo-semver invocation for rmpv says

cargo semver stderr: error[E0463]: can't find crate for `paste` which `rmpv` depends on

and paste is a proc-macro, which is built as .so on linux, and then loaded by rustc somehow during build. the test works if we're not passing any TEST_TARGET=, but it doesn't even if we cargo build --target [target] before the TEST_TARGET=[target] cargo test. i'm assuming the problem is somewhere around rebuilding the proc-macro crate for the explicit target, but i'm not sure where/why.

@dario23
Copy link
Contributor Author

dario23 commented May 14, 2022

ah, the --target parameter causes cargo-semver to only add the library search path under .../target/x86_64-unknown-linux-gnu/debug/deps, but some things might be in the arch-"independent"/host path .../target/debug/deps still. in fact, libpaste-[hash].so is there, causing this invocation to fail. there is even a TODO comment there, it just wasn't as obvious (to me) that this is why it fails here. i'll take a look at implementing that.

dario23 added 3 commits May 15, 2022 00:18
This avoids us hiding some errors, like we did with the failing rmvp
testcase.
This is necessary to make proc-macros work, since they are built for the
host, not the given target. Host and target being equal doesn't help,
since specifying an explicit target will still lead to a separate folder
under `target/`.
@dario23 dario23 changed the title WIP: Debug why rmpv testcase fails in CI Add host link path in rustc invocations to reenable rmpv testcase May 14, 2022
@dario23 dario23 marked this pull request as ready for review May 14, 2022 22:34
@JohnTitor
Copy link
Member

Looks awesome, thanks!
@bors r+

@bors
Copy link
Contributor

bors commented May 15, 2022

📌 Commit b62a2c6 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented May 15, 2022

⌛ Testing commit b62a2c6 with merge 8bcd30a...

@bors
Copy link
Contributor

bors commented May 15, 2022

☀️ Test successful - checks-actions
Approved by: JohnTitor
Pushing 8bcd30a to master...

@bors bors merged commit 8bcd30a into rust-lang:master May 15, 2022
@dario23 dario23 deleted the debug-rmpv-ci branch May 15, 2022 10:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants