[SERVER-48691] Fix Ninja builds on Windows Enterprise Server Created: 10/Jun/20 Updated: 29/Oct/23 Resolved: 20/Nov/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | 4.5 Required |
| Fix Version/s: | 4.9.0, 4.4.7 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ryan Egesdahl (Inactive) | Assignee: | Daniel Moody |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||
| Sprint: | Dev Platform 2020-11-16, Dev Platform 2020-11-30 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Windows builds of the Enterprise Server consistently fail to build with Ninja due to a rsp file with too many characters in it for the VC++ linker. This is the error produced:
This is the SCons command I used to generate the Ninja build file:
And this is the Ninja invocation I used:
I did not test this without the enterprise module in place, so it may not be a problem there. SCons builds work perfectly fine. |
| Comments |
| Comment by Githook User [ 28/Jun/21 ] |
|
Author: {'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}Message: (cherry picked from commit f4902aa0d320cfe1cc1d15d4e4623e4d24e32f39) |
| Comment by Githook User [ 20/Nov/20 ] |
|
Author: {'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}Message: |
| Comment by Ryan Egesdahl (Inactive) [ 23/Oct/20 ] |
|
This was specifically happening for me on the command line when I was building manually. I never saw a patch build fail due to this. |
| Comment by Daniel Moody [ 23/Oct/20 ] |
|
Seems that its working now with the latest patch build from |
| Comment by Ryan Egesdahl (Inactive) [ 26/Jun/20 ] |
|
Well, the attempted hack really didn't pan out. I think this is dependent on the length of the path you are building in and potentially the length of any paths to the pre-built libraries, so it may or may not work for you. The effort to actually fix this is going to involve lots of work to the ninja generator, but in the meantime it can be worked around by using shorter paths for your build directory and libraries. Note, this issue is related to the reason why we don't currently support building with Ninja when you have any spaces in your build or library directories. Fixing this problem correctly also fixes that problem as well. |
| Comment by Ryan Egesdahl (Inactive) [ 26/Jun/20 ] |
|
This is still broken, but it looks like actually fixing it in the way we want is going to take way more work than we can do in a single task. I'm going to do something considerably more hackish for the time being instead, and we can defer the larger effort for when we're ready to do something more major. |
| Comment by Ryan Egesdahl (Inactive) [ 16/Jun/20 ] |
|
According to the Ninja docs, this is exactly what $in_newline was created for: Unfortunately, we don't use $in when we generate the rspfile for Ninja. Instead, we generate the entire rspfile contents from the modules and dump it into a custom variable that we then tell SCons how to use to generate the rspfile. This isn't technically a bad way of going about doing this, but it does mean we're not getting the most out of SCons here. There's an easy-but-hackish way to fix this, and there's time-consuming-but-more-correct way. I am going to take the time to read and understand how we generate the rspfile content so I know whether the more correct way is a larger project than this one task can cover. |