question

PavelKostromitinov-6207 avatar image
0 Votes"
PavelKostromitinov-6207 asked cooldadtx commented

MSBuild repeatedly re-links executable

I have a project (generated by cmake), without any other project dependencies.
And each time I run build from command line, executable is being relinked. However, when building the same project from VStudio, it only links once.
I have generated detailed MSBuild log, and immediately before link command there is such diagnostic:

Source compilation required: input is newer than output .

As if there is an empty file name somewhere in the inputs...
It actually happen with every executable in the solution. What could possibly cause this?

240685-output.log


vs-msbuild
output.log (326.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cooldadtx avatar image
0 Votes"
cooldadtx answered

Just taking a look at the log file, when it compiles rcedit it is looking for the C_1252.nls file. That file isn't being found so it triggers a build of the project with the assumption that the project is creating it. Because it recompiled the project the input to link is newer than what was there before so it relinks.

You should identify why the NLS file is not available and ensure it exists before compilation.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PavelKostromitinov-6207 avatar image
0 Votes"
PavelKostromitinov-6207 answered

This is by no means a dependency mentioned anywhere in the project file, looks more like something auto-added by MSBuild.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PavelKostromitinov-6207 avatar image
0 Votes"
PavelKostromitinov-6207 answered cooldadtx commented

After some experimenting, I surprisingly found out that only x86 MSBuild produces this behavior. x64 MSBuild doesn't have any problems, neither it mentions C_1252.NLS...

240742-output64.log



output64.log (321.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hard to say where it is coming from but that file is the Windows codepage and is used for locale string stuff in my experience. I would recommend you rebuild the solution with the diagnostics turned on. Then search for any references to .nls. That should hopefully identify the task that is identifying it as a dependency.

Note that you should have c_1252.nls on your machine as that is the Windows codepage file. I wonder if you have a localized version of Windows and that file is missing for some reason. I don't know if it is on non-US versions. The only references I can find to this file missing is when malware replaces it (because it is loaded by the OS in most processes) and AV removes it.

You might need to report this to the MSBuild team using the Report a Problem feature in Visual Studio along with a test project to see what they say. You could also try creating a blank C++ project and see if the problem replicates.

0 Votes 0 ·