Skip to content

Conversation

@alexcrichton
Copy link
Member

This API is only available in WASIp1 and as the libc build for WASIp2 is changing the symbol was recently deleted. This functionality makes sense for WASIp1, but for WASIp2 it's a fundamentally different set of syscalls so this is no longer provided by libc.

Description

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

This API is only available in WASIp1 and as the libc build for WASIp2 is
changing the symbol was recently deleted. This functionality makes sense
for WASIp1, but for WASIp2 it's a fundamentally different set of
syscalls so this is no longer provided by libc.
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tgross35 tgross35 enabled auto-merge November 20, 2025 02:42
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Nov 20, 2025
@tgross35
Copy link
Contributor

Looks like there is another error:

              2: failed to resolve import `env::__wasi_clock_time_get

Do the versions at

libc/ci/wasi.sh

Lines 14 to 15 in c4dcfd2

wasmtime=38.0.2
wasi_sdk=27
also need to be bumped?

* Update to wasi-sdk-29 which is the latest
* Pass `-Clink-self-contained=n` instead of
  `-Ctarget-feature=-crt-static` (which didn't work) to force using the
  external libc.
auto-merge was automatically disabled November 20, 2025 02:59

Head branch was pushed to by a user without write access

@alexcrichton
Copy link
Member Author

Indeed! I'm realizing that such a bump shouldn't be necessary, however, so I've bundled a few changes here:

  • To prevent a mismatch between the libc.a that rustc nightly ships, and what's tested here in CI, -Ctarget-feature=-crt-static is replaced with -Clink-self-contained=n. That should insulate against future problems like this where the wasi-sdk in CI here diverges from the wasi-sdk in rustc.
  • I've gone ahead and updated to wasi-sdk-29 as well
  • The function in question remains gated as it's still removed in wasi-sdk-29

@tgross35
Copy link
Contributor

Looks like it worked! Thanks again for the instantaneous fix ❤️

@tgross35 tgross35 enabled auto-merge November 20, 2025 03:06
@tgross35 tgross35 added this pull request to the merge queue Nov 20, 2025
Merged via the queue into rust-lang:main with commit 6259f3a Nov 20, 2025
51 of 52 checks passed
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Dec 2, 2025
This API is only available in WASIp1 and as the libc build for WASIp2 is
changing the symbol was recently deleted. This functionality makes sense
for WASIp1, but for WASIp2 it's a fundamentally different set of
syscalls so this is no longer provided by libc.

(backport <rust-lang#4837>)
(cherry picked from commit ca20d7d)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Dec 2, 2025
* Update to wasi-sdk-29 which is the latest
* Pass `-Clink-self-contained=n` instead of
  `-Ctarget-feature=-crt-static` (which didn't work) to force using the
  external libc.

(backport <rust-lang#4837>)
(cherry picked from commit 6259f3a)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Dec 2, 2025
* Update to wasi-sdk-29 which is the latest
* Pass `-Clink-self-contained=n` instead of
  `-Ctarget-feature=-crt-static` (which didn't work) to force using the
  external libc.

(backport <rust-lang#4837>)
(cherry picked from commit 6259f3a)
github-merge-queue bot pushed a commit that referenced this pull request Dec 2, 2025
This API is only available in WASIp1 and as the libc build for WASIp2 is
changing the symbol was recently deleted. This functionality makes sense
for WASIp1, but for WASIp2 it's a fundamentally different set of
syscalls so this is no longer provided by libc.

(backport <#4837>)
(cherry picked from commit ca20d7d)
github-merge-queue bot pushed a commit that referenced this pull request Dec 2, 2025
This API is only available in WASIp1 and as the libc build for WASIp2 is
changing the symbol was recently deleted. This functionality makes sense
for WASIp1, but for WASIp2 it's a fundamentally different set of
syscalls so this is no longer provided by libc.

(backport <#4837>)
(cherry picked from commit ca20d7d)
@tgross35 tgross35 mentioned this pull request Dec 2, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 2, 2025
* Update to wasi-sdk-29 which is the latest
* Pass `-Clink-self-contained=n` instead of
  `-Ctarget-feature=-crt-static` (which didn't work) to force using the
  external libc.

(backport <#4837>)
(cherry picked from commit 6259f3a)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-wasi stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants