Skip to content

[native_toolchain_c] Tools do not resolve from build hook on Windows. #2109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MichealReed opened this issue Mar 19, 2025 · 2 comments · Fixed by #2110
Closed

[native_toolchain_c] Tools do not resolve from build hook on Windows. #2109

MichealReed opened this issue Mar 19, 2025 · 2 comments · Fixed by #2110

Comments

@MichealReed
Copy link
Contributor

The tool resolvers work in tests and outside of the build hook, but at least on Windows if I try to use them inside of the hook, it always fails.

I tried three, but there may be more. Tests emulating the build hook environment might be beneficial here.

[  +98 ms] [  +75 ms] Running `where vswhere.exe`.
[  +93 ms] [  +44 ms] INFO: Could not find files for the given pattern(s).

[        ]              Running `where ndk-build.cmd`.
[        ]            INFO: Could not find files for the given pattern(s).

[  +80 ms] [  +78 ms] Running `where clang.exe`.
[        ] [  +52 ms] Running `where vswhere.exe`.
[  +93 ms] [  +39 ms] INFO: Could not find files for the given pattern(s).

Maybe an environment variable issue from #32?

It's very difficult to diagnose which variable is missing in this sort of situation.

@dcharkes
Copy link
Collaborator

I think this should have been fixed by:

I am a bit surprised we didn't notice that typo earlier. I suppose it is because we're passing in the toolchains from Flutter into the hooks in the CCompilerConfig. For Android targets that's the NDK toolchain. So, we never tried to find a default toolchain.

@MichealReed
Copy link
Contributor Author

I think this should have been fixed by:

Seems so, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants