[cmake-developers] [CMake 0013074]: Parallel builds fail consistently when embedding manifest

Mantis Bug Tracker mantis at public.kitware.com
Thu Mar 29 12:54:13 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13074 
====================================================================== 
Reported By:                Cesar
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13074
Category:                   CMake
Reproducibility:            random
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2012-03-29 12:54 EDT
Last Modified:              2012-03-29 12:54 EDT
====================================================================== 
Summary:                    Parallel builds fail consistently when embedding
manifest
Description: 
This happens due to a race condition in Microsoft Visual Studio 2008 when
building things in parallel. Here's one example:

115>mt.exe : general error c101008d: Failed to write the updated manifest to the
resource of file ".\Release\myprogram.exe". Access is denied.

Of course, this happens more often when we're really trying to get a build for a
customer, or when it is the nightly build that triggers regression tests.

I know we can disable manifest generation with /MANIFEST:NO, but that's not an
option - our software does need the manifests or we get the dreaded
"side-by-side error"s. There doesn't seem to be a "proper solution" either.
Here's a suggestion: allow me to specify an arbitrary pause, in seconds, between
the linking and the mt.exe calls (I don't know if that is possible). A more
involved solution would be to execute mt.exe as a post-build step, but for that
I need CMake to pass /MANIFEST to the linker while not calling mt.exe after that
automatically. Any other suggestions welcome.

This, by the way, did not happen when using our old Makefile-based system, which
called mt.exe right after the linker with no pauses. Then again, that was being
executed from Cygwin and it was much slower.

Steps to Reproduce: 
Build a large project in parallel. For my project, it fails 1 out of 3 or 4
times.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-03-29 12:54 Cesar          New Issue                                    
======================================================================




More information about the cmake-developers mailing list