-
Notifications
You must be signed in to change notification settings - Fork 8.2k
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Build errors : Failed to create virtual memory for PCH / Compiler is out of heap space #4211
Comments
Thanks for the report! This is pretty common when running the build for the first time. The precompiled headers for C++/WinRT are pretty enormous, so it takes a good amount of free memory to build them initially. How much RAM do you have on the machine that's trying to build the Terminal? Usually when I hit this, I close a few old browser tabs and just try again. Almost always does the trick 😝 sidebar: "WindowsTerminalUniversal" isn't actually the package you want to run, you want "CascadiaPackage" |
Thanks! But it still doesn't work, even with all apps closed, same errors... My computer have 16GB of RAM but I don't know if enough is dedicated. How can I specify the amount ? |
I had the exact issue when I tried to compile the project for the first time. Initially I had 16GB of physical memory and I increased the virtual memory to about 20GB and it worked. Later I upgraded my PC to 32GB of physical memory. Then the virtual memory does not matter any longer. |
By the all my hard drives are SSD so the virtual memory is I guess fast enough. And I highly suggest you to put all the source code on SSD if you have not done it. It is so much faster than HDD in terms of basically everything. |
Thank you for the informations! But that's a shame to require so much RAM to compile a simple program :/ |
@valentinbreiz Yea it's not something that we're happy about. It's an unfortunate limitation of C++WinRT at the moment. We've had a bunch of discussions with them about this exact concern. The hope is that with modules in C++20, we won't have to worry about this anymore, but unfortunately there's not much we can do until then that we haven't already done. |
Unfortunately, I've gotta close this one- Terminal requires a bunch of RAM to compile right now, and that's something we'll be trying to tackle as time goes on. With apologies, d. |
Something that might be worth mentioning is that adding "/Zm1000" to the build options of some projects helps resolve issues C1076 and C3859, which are related to memory limitations. Here the link for the documentation of "/Zmfactor": |
problem fixed here : https://youtu.be/Oh6dga-Oy10 |
Also ran into this issue, even with 16 GB RAM. What worked for me was to simply restart the build repeatedly until it finally managed to build everything (make sure to use "Build", not "Rebuild"). The number of compiler errors should drop between each build. |
Environment
Steps to reproduce
Open OpenConsole.sln, restore packages, x64 CPU, WindowsTerminalUniversal Project, Release Mode, Start Debugging (F5)
Expected behavior
I'm trying to build the terminal for the first time.
Actual behavior
Multiple errors.
logs.txt
The text was updated successfully, but these errors were encountered: