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
[SR-14111] [Windows] Build swift from source fails with error C1128 and suggests param /bigobj #56497
Comments
cc @compnerd |
Its unclear to me actually; there was a point where I needed that as well. The reason that I hadn't "fixed" this was that I was intentionally waiting. I wanted the rebranch to complete as that had changes that would fix this. I don't seem to need the flags anymore (as it should be added). If you are hitting this stuff after syncing to the latest state of the tree, please let me know, and I can apply the fix for this that I have sitting around (I'll upload it as a draft just incase). Edit: #35971 is a patch, but if updating the checkout to the latest state resolves the issue, we should just close it. |
Comment by Yassine BENABBAS (JIRA) OK thanks 🙂. I'll try compiling again after pulling the latest commits and I'll let you know the results. |
Comment by Yassine BENABBAS (JIRA) Hello. I don't have the message anymore and I passed the file that generates the error. I will close the ticket. However, the RAM consumption become more and more big and it reaches a point where is uses about 60 GB of RAM. Do you have this problem also ? |
Comment by Yassine BENABBAS (JIRA) I don't have the issue with the newest commits |
Yes, that is expected - parallel builds are expensive in terms of RAM, especially if you are building with debug information. I tend to build without debug information and just read through the assembly which avoids excessive memory usage. |
Comment by Stefan Springer (JIRA) Get the error `compile with /bigobj` for different modules (CMAKE_BUILD_TYPE=Debug), so why not set an option globally? Or what is the solution besides starting the build process again and again? UPDATE: answer by Saleem Abdulrasool:
|
If |
Environment
Windows 10 Hyper-V VM (created with quick creator)
X64 command prompt for VS2019
Additional Detail from JIRA
md5: 1a4a895f44ba36cc7b14ff8b2250c7ee
Issue Description:
Hello,
I'm trying to build swift from source by following this documentation https://github.com/apple/swift/blob/main/docs/WindowsBuild.md .
The command that builds the toolchain "ninja -C S:\b\1" fails on "tools/swift/lib/AST/CMakeFiles/swiftAST.dir/Decl.cpp.obj" because of the error: fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj
Shall I add this parameter to be able to build or did I miss something ?
Here is the complete error log:
The text was updated successfully, but these errors were encountered: