Skip to content

Fix bootstrap rust build failure for vxworks - #153333

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
gautam899:main
Mar 19, 2026
Merged

Fix bootstrap rust build failure for vxworks#153333
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
gautam899:main

Conversation

@gautam899

@gautam899 gautam899 commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #153332

Starting with VxWorks 25.09, struct stat was updated to use struct timespec instead of time_t for timestamp fields.

The following changes were made in libc in the commit libc.

As a result, when performing a bootstrap build with VxWorks ≥ 25.09, libc no longer exposes the fields st_mtime, st_atime, and st_ctime, as they are conditionally compiled in src/vxworks/mod.rs here libc. This causes the build to fail.

For VxWorks versions earlier than 25.09, the build completes successfully without errors.

This PR resolves the issue by detecting the WIND_RELEASE_ID environment variable (which is set in the VxWorks build environment) and conditionally guarding the affected functions in the two additional files where the errors originate.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 3, 2026
@rustbot

rustbot commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, joboet

@rust-log-analyzer

This comment has been minimized.

@gautam899

Copy link
Copy Markdown
Contributor Author

ping @biabbas

@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Can you add documentation for the environment variable to https://doc.rust-lang.org/nightly/rustc/platform-support/vxworks.html?

cc rust-lang/rfcs#3750 as well, which seems like the long term solution here

@Mark-Simulacrum Mark-Simulacrum 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 9, 2026
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@gautam899

gautam899 commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

Can you add documentation for the environment variable to https://doc.rust-lang.org/nightly/rustc/platform-support/vxworks.html?

cc rust-lang/rfcs#3750 as well, which seems like the long term solution here

Hi @Mark-Simulacrum, I don't think there is a need to add documentation about the environment variable since this is set by vxworks workbench itself. The user is not required to set this environment variable from their end.

@gautam899

gautam899 commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 10, 2026
@tgross35

Copy link
Copy Markdown
Member

Hi @Mark-Simulacrum, I don't think there is a need to add documentation about the environment variable since this is set by vxworks workbench itself. The user is not required to set this environment variable from their end.

It would be useful to have documented that it reads this env, even if it isn't meant to be set, since this is pretty uncommon.

@gautam899

Copy link
Copy Markdown
Contributor Author

Hi @Mark-Simulacrum, I don't think there is a need to add documentation about the environment variable since this is set by vxworks workbench itself. The user is not required to set this environment variable from their end.

It would be useful to have documented that it reads this env, even if it isn't meant to be set, since this is pretty uncommon.

Cool. I'll go ahead and add some info about the environment variable.

@rustbot

rustbot commented Mar 14, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

@rustbot

rustbot commented Mar 14, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@gautam899

Copy link
Copy Markdown
Contributor Author

Hi @Mark-Simulacrum @tgross35 , I have added the documentation for the environment variable WIND_RELEASE_ID. Pls let me know if it would suffice.

@gautam899

Copy link
Copy Markdown
Contributor Author

ping @Mark-Simulacrum @Noratrieb

@Mark-Simulacrum

Copy link
Copy Markdown
Member

@bors r+

There's generally speaking no need to re-ping folks so aggressively. Reviews can and do take a week+ normally; this PR hasn't been open for that long, and the latest changes were made less than a week ago. Please be patient in the future :)

@rust-bors

rust-bors Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 24d86b5 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 19, 2026
@gautam899

Copy link
Copy Markdown
Contributor Author

@bors r+

There's generally speaking no need to re-ping folks so aggressively. Reviews can and do take a week+ normally; this PR hasn't been open for that long, and the latest changes were made less than a week ago. Please be patient in the future :)

Apologies. I'll take care of that in the future.

@rust-bors
rust-bors Bot merged commit 2c49023 into rust-lang:main Mar 19, 2026
@rustbot rustbot added this to the 1.96.0 milestone Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust build fails for target "aarch64-wrs-vxworks"

6 participants