wil/Common.h - no such file #1701

Closed
opened 2026-01-30 22:34:07 +00:00 by claunia · 7 comments
Owner

Originally created by @elithrar on GitHub (Jun 16, 2019).

Summary: A header file - wil/Common.h - can't be found, even after blowing away the git repo and starting over.

Environment

Microsoft Windows [Version 10.0.18917.1000]

checked out: microsoft/terminal@94bcbb9

Steps to reproduce

  1. Clone the repo
  2. Init submodules as per the README
  3. Kick off the build in PowerShell
➜  git clone https://github.com/microsoft/terminal.git
➜  git submodule update --init --recursive
Submodule 'dep/gsl' (https://github.com/microsoft/gsl) registered for path 'dep/gsl'
Submodule 'dep/wil' (https://github.com/microsoft/wil) registered for path 'dep/wil'
Cloning into '/mnt/c/Users/Gamer/repos/terminal/dep/gsl'...
Cloning into '/mnt/c/Users/Gamer/repos/terminal/dep/wil'...
Submodule path 'dep/gsl': checked out 'b74b286d5e333561b0f1ef1abd18de2606624455'
Submodule path 'dep/wil': checked out 'fbcd1d2abb558da4564ce343b688f7a658f51318'
Import-Module .\tools\OpenConsole.psm1
Set-MsBuildDevEnvironment
Invoke-OpenConsoleBuild

Expected behavior

The solution builds & outputs a binary.

Actual behavior

The header file isn't found. This applies when I attempt to build it directly via VS 2019 as well (with the C++, UWP, C++ plat tools packages auto-installed).

It's hard to debug further (I'm not a native Windows developer), but it doesn't appear to be a git-related issue - the submodule sync is done.

Previous issues related to this seem to be based on users overlooking submodules used here; which (as above) seem to be checked out.

Build FAILED.

"C:\Users\Gamer\repos\terminal\OpenConsole.sln" (default target) (1) ->
"C:\Users\Gamer\repos\terminal\src\host\exe\Host.EXE.vcxproj.metaproj" (default target) (2) ->
"C:\Users\Gamer\repos\terminal\src\buffer\out\lib\bufferout.vcxproj" (default target) (3) ->
(ClCompile target) ->
  C:\Users\Gamer\repos\terminal\src\inc\LibraryIncludes.h(48): fatal error C1083: Cannot open include file: 'wil/Common.h': No such file or d irectory [C:\Users\Gamer\repos\terminal\src\buffer\out\lib\bufferout.vcxproj]

"C:\Users\Gamer\repos\terminal\OpenConsole.sln" (default target) (1) ->
"C:\Users\Gamer\repos\terminal\src\cascadia\TerminalCore\lib\TerminalCore-lib.vcxproj.metaproj" (default target) (23) ->
"C:\Users\Gamer\repos\terminal\src\cascadia\TerminalSettings\TerminalSettings.vcxproj" (default target) (24) ->
(CppWinRTMakeComponentProjection target) ->
  C:\Users\Gamer\repos\terminal\packages\Microsoft.Windows.CppWinRT.2.0.190417.3\build\native\Microsoft.Windows.CppWinRT.targets(448,9): erro r MSB3073: The command ""C:\Users\Gamer\repos\terminal\packages\Microsoft.Windows.CppWinRT.2.0.190417.3\build\native\..\..\bin\"cppwinrt @"x6 4\Debug\cppwinrt_comp.rsp"" exited with code 9009. [C:\Users\Gamer\repos\terminal\src\cascadia\TerminalSettings\TerminalSettings.vcxproj]
    0 Warning(s)
Originally created by @elithrar on GitHub (Jun 16, 2019). Summary: A header file - `wil/Common.h` - can't be found, even after blowing away the git repo and starting over. # Environment ```none Microsoft Windows [Version 10.0.18917.1000] ``` checked out: microsoft/terminal@94bcbb9 # Steps to reproduce 1. Clone the repo 2. Init submodules as per the README 3. Kick off the build in PowerShell ``` ➜ git clone https://github.com/microsoft/terminal.git ➜ git submodule update --init --recursive Submodule 'dep/gsl' (https://github.com/microsoft/gsl) registered for path 'dep/gsl' Submodule 'dep/wil' (https://github.com/microsoft/wil) registered for path 'dep/wil' Cloning into '/mnt/c/Users/Gamer/repos/terminal/dep/gsl'... Cloning into '/mnt/c/Users/Gamer/repos/terminal/dep/wil'... Submodule path 'dep/gsl': checked out 'b74b286d5e333561b0f1ef1abd18de2606624455' Submodule path 'dep/wil': checked out 'fbcd1d2abb558da4564ce343b688f7a658f51318' ``` ```powershell Import-Module .\tools\OpenConsole.psm1 Set-MsBuildDevEnvironment Invoke-OpenConsoleBuild ``` # Expected behavior The solution builds & outputs a binary. # Actual behavior The header file isn't found. This applies when I attempt to build it directly via VS 2019 as well (with the C++, UWP, C++ plat tools packages auto-installed). It's hard to debug further (I'm not a native Windows developer), but it doesn't appear to be a git-related issue - the submodule sync is done. Previous issues related to this seem to be based on users overlooking submodules used here; which (as above) seem to be checked out. ``` Build FAILED. "C:\Users\Gamer\repos\terminal\OpenConsole.sln" (default target) (1) -> "C:\Users\Gamer\repos\terminal\src\host\exe\Host.EXE.vcxproj.metaproj" (default target) (2) -> "C:\Users\Gamer\repos\terminal\src\buffer\out\lib\bufferout.vcxproj" (default target) (3) -> (ClCompile target) -> C:\Users\Gamer\repos\terminal\src\inc\LibraryIncludes.h(48): fatal error C1083: Cannot open include file: 'wil/Common.h': No such file or d irectory [C:\Users\Gamer\repos\terminal\src\buffer\out\lib\bufferout.vcxproj] "C:\Users\Gamer\repos\terminal\OpenConsole.sln" (default target) (1) -> "C:\Users\Gamer\repos\terminal\src\cascadia\TerminalCore\lib\TerminalCore-lib.vcxproj.metaproj" (default target) (23) -> "C:\Users\Gamer\repos\terminal\src\cascadia\TerminalSettings\TerminalSettings.vcxproj" (default target) (24) -> (CppWinRTMakeComponentProjection target) -> C:\Users\Gamer\repos\terminal\packages\Microsoft.Windows.CppWinRT.2.0.190417.3\build\native\Microsoft.Windows.CppWinRT.targets(448,9): erro r MSB3073: The command ""C:\Users\Gamer\repos\terminal\packages\Microsoft.Windows.CppWinRT.2.0.190417.3\build\native\..\..\bin\"cppwinrt @"x6 4\Debug\cppwinrt_comp.rsp"" exited with code 9009. [C:\Users\Gamer\repos\terminal\src\cascadia\TerminalSettings\TerminalSettings.vcxproj] 0 Warning(s) ```
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-30 22:34:07 +00:00
Author
Owner

@elithrar commented on GitHub (Jun 16, 2019):

(the file exists, although with a different case)

# this is the submodule commit that master is attached to 
/mnt/c/Users/Gamer/repos/terminal/dep/wil/include/wil (fbcd1d2) ✔ 
➜  ls com*
com.h  common.h
@elithrar commented on GitHub (Jun 16, 2019): (the file exists, although with a different case) ``` # this is the submodule commit that master is attached to /mnt/c/Users/Gamer/repos/terminal/dep/wil/include/wil (fbcd1d2) ✔ ➜ ls com* com.h common.h ```
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 16, 2019):

Cloning the repository through WSL will enable the “case sensitivity” bit on the working copy. Don’t do that. Use git for Windows.

@DHowett-MSFT commented on GitHub (Jun 16, 2019): Cloning the repository through WSL will enable the “case sensitivity” bit on the working copy. Don’t do that. Use git for Windows.
Author
Owner

@elithrar commented on GitHub (Jun 16, 2019):

Still fails - I'd tried that originally.

C:\Users\Gamer\repos
λ git --version
git version 2.15.1.windows.2

C:\Users\Gamer\repos
λ git clone https://github.com/microsoft/terminal.git
Cloning into 'terminal'...
remote: Enumerating objects: 36, done.
remote: Counting objects: 100% (36/36), done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 6343 (delta 12), reused 10 (delta 4), pack-reused 6307
Receiving objects: 100% (6343/6343), 103.10 MiB | 34.01 MiB/s, done.
Resolving deltas: 100% (4193/4193), done.

C:\Users\Gamer\repos
λ cd terminal\

C:\Users\Gamer\repos\terminal (master -> origin)
λ git submodule update --init --recursive
Submodule 'dep/gsl' (https://github.com/microsoft/gsl) registered for path 'dep/gsl'
Submodule 'dep/wil' (https://github.com/microsoft/wil) registered for path 'dep/wil'
Cloning into 'C:/Users/Gamer/repos/terminal/dep/gsl'...
Cloning into 'C:/Users/Gamer/repos/terminal/dep/wil'...
Submodule path 'dep/gsl': checked out 'b74b286d5e333561b0f1ef1abd18de2606624455'
Submodule path 'dep/wil': checked out 'fbcd1d2abb558da4564ce343b688f7a658f51318'

Then, in a fresh PowerShell session -

Import-Module .\tools\OpenConsole.psm1
Set-MsBuildDevEnvironment
Invoke-OpenConsoleBuild
<snip>
Build FAILED.

"C:\Users\Gamer\repos\terminal\OpenConsole.sln" (default target) (1) ->
"C:\Users\Gamer\repos\terminal\src\host\exe\Host.EXE.vcxproj.metaproj" (default target) (2) ->
"C:\Users\Gamer\repos\terminal\src\buffer\out\lib\bufferout.vcxproj" (default target) (3) ->
(ClCompile target) ->
  C:\Users\Gamer\repos\terminal\src\inc\LibraryIncludes.h(48): fatal error C1083: Cannot open include file: 'wil/Common.h': No such file or d irectory [C:\Users\Gamer\repos\terminal\src\buffer\out\lib\bufferout.vcxproj]

What can I provide to pinpoint this?

@elithrar commented on GitHub (Jun 16, 2019): Still fails - I'd tried that originally. ``` C:\Users\Gamer\repos λ git --version git version 2.15.1.windows.2 C:\Users\Gamer\repos λ git clone https://github.com/microsoft/terminal.git Cloning into 'terminal'... remote: Enumerating objects: 36, done. remote: Counting objects: 100% (36/36), done. remote: Compressing objects: 100% (32/32), done. remote: Total 6343 (delta 12), reused 10 (delta 4), pack-reused 6307 Receiving objects: 100% (6343/6343), 103.10 MiB | 34.01 MiB/s, done. Resolving deltas: 100% (4193/4193), done. C:\Users\Gamer\repos λ cd terminal\ C:\Users\Gamer\repos\terminal (master -> origin) λ git submodule update --init --recursive Submodule 'dep/gsl' (https://github.com/microsoft/gsl) registered for path 'dep/gsl' Submodule 'dep/wil' (https://github.com/microsoft/wil) registered for path 'dep/wil' Cloning into 'C:/Users/Gamer/repos/terminal/dep/gsl'... Cloning into 'C:/Users/Gamer/repos/terminal/dep/wil'... Submodule path 'dep/gsl': checked out 'b74b286d5e333561b0f1ef1abd18de2606624455' Submodule path 'dep/wil': checked out 'fbcd1d2abb558da4564ce343b688f7a658f51318' ``` Then, in a fresh PowerShell session - ``` Import-Module .\tools\OpenConsole.psm1 Set-MsBuildDevEnvironment Invoke-OpenConsoleBuild ``` ``` <snip> Build FAILED. "C:\Users\Gamer\repos\terminal\OpenConsole.sln" (default target) (1) -> "C:\Users\Gamer\repos\terminal\src\host\exe\Host.EXE.vcxproj.metaproj" (default target) (2) -> "C:\Users\Gamer\repos\terminal\src\buffer\out\lib\bufferout.vcxproj" (default target) (3) -> (ClCompile target) -> C:\Users\Gamer\repos\terminal\src\inc\LibraryIncludes.h(48): fatal error C1083: Cannot open include file: 'wil/Common.h': No such file or d irectory [C:\Users\Gamer\repos\terminal\src\buffer\out\lib\bufferout.vcxproj] ``` What can I provide to pinpoint this?
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 16, 2019):

Interesting! Could you run this?

fsutil file queryCaseSensitiveInfo C:\Users\Gamer\repos
fsutil file queryCaseSensitiveInfo C:\Users\Gamer\repos\terminal
@DHowett-MSFT commented on GitHub (Jun 16, 2019): Interesting! Could you run this? ``` fsutil file queryCaseSensitiveInfo C:\Users\Gamer\repos fsutil file queryCaseSensitiveInfo C:\Users\Gamer\repos\terminal ```
Author
Owner

@elithrar commented on GitHub (Jun 16, 2019):

Figured it out - the case-sensitive part was the hint. I was cloning into WSL_ itself, not git - e.g. where I keep most of my repos - which was setting the flag when Windows was trying to reach into the dir via /mnt/c/....

Re-cloned into the native Windows FS -> was able to build successfully.

(I should know better, but wasn't thinking about that - see the part about not being a native Windows dev!)

@elithrar commented on GitHub (Jun 16, 2019): Figured it out - the case-sensitive part was the hint. I was cloning _into_ WSL_ itself, not git - e.g. where I keep most of my repos - which was setting the flag when Windows was trying to reach into the dir via `/mnt/c/...`. Re-cloned into the native Windows FS -> was able to build successfully. (I should know better, but wasn't thinking about that - see the part about not being a native Windows dev!)
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 16, 2019):

Ah! You can reset the case sensitivity for any given directory (not its descendants, just for new things created inside it from Windows) with fsutil file setCaseSensitiveInfo enable|disable, if that helps!

@DHowett-MSFT commented on GitHub (Jun 16, 2019): Ah! You can reset the case sensitivity for any given directory (not its descendants, just for new things created inside it from Windows) with `fsutil file setCaseSensitiveInfo enable|disable`, if that helps!
Author
Owner

@elithrar commented on GitHub (Jun 16, 2019):

Perfect, thanks Dustin!

@elithrar commented on GitHub (Jun 16, 2019): Perfect, thanks Dustin!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1701