Repository navigation
c_import: a header outside the embedded macOS sysroot says what was searched (#2530, diagnostic half) - #2753
Merged
Merged
Conversation
…earched (#2530, diagnostic half) Without SDKROOT, `with check examples/c-interop/src/main.w` failed with a bare "sqlite3.h: 'sqlite3.h' file not found" — no word that the embedded, libc-only sysroot is what was searched, or what to do. `c_import_emit_header_error_detail_frontend` (Frontend.w) appended a remedy only when no sysroot existed at all; the #2530 case has one — the embedded one (`darwin_sdk_root`, EmbeddedSysroot.w). When the SDK in use is the embedded one (`darwin_sdk_is_embedded`: no WITH_SDKROOT/SDKROOT/[c_import] sdk_path named, binary carries a sysroot) and clang's detail names a header not found, the error now says the embedded sysroot holds libc only, names the header, and gives both ways out: name an SDK, or take the library through `with get`. With a named SDK the message is unchanged (verified both polarities). This is the issue's option (c), which applies under either design outcome; (a) embedding system-library headers and (b) moving the example to `with get` remain Eric's call (C interop, a published example), so #2530 stays open. Test err_2530_header_outside_embedded_sysroot (darwin only; the env directives blank SDKROOT/WITH_SDKROOT for the in-process compile so the embedded sysroot is in use on any shell). Fails pre-fix: "missing expected check error: WITH_SDKROOT".
This was referenced Oct 27, 2026
Contributor
Author
|
Battery GREEN on the stack top |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
c_import: a header outside the embedded macOS sysroot says what was searched (#2530, diagnostic half)
Without SDKROOT,
with check examples/c-interop/src/main.wfailed witha bare "sqlite3.h: 'sqlite3.h' file not found" — no word that the
embedded, libc-only sysroot is what was searched, or what to do.
c_import_emit_header_error_detail_frontend(Frontend.w) appended aremedy only when no sysroot existed at all; the #2530 case has one —
the embedded one (
darwin_sdk_root, EmbeddedSysroot.w).When the SDK in use is the embedded one (
darwin_sdk_is_embedded: noWITH_SDKROOT/SDKROOT/[c_import] sdk_path named, binary carries a
sysroot) and clang's detail names a header not found, the error now
says the embedded sysroot holds libc only, names the header, and gives
both ways out: name an SDK, or take the library through
with get.With a named SDK the message is unchanged (verified both polarities).
This is the issue's option (c), which applies under either design
outcome; (a) embedding system-library headers and (b) moving the
example to
with getremain Eric's call (C interop, a publishedexample), so #2530 stays open.
Test err_2530_header_outside_embedded_sysroot (darwin only; the env
directives blank SDKROOT/WITH_SDKROOT for the in-process compile so
the embedded sysroot is in use on any shell). Fails pre-fix: "missing
expected check error: WITH_SDKROOT".