[vtk-developers] Python Wrapping fails in master build.

Brad King brad.king at kitware.com
Wed Sep 26 07:29:36 EDT 2018

On 09/26/2018 12:22 AM, David Gobbi wrote:
> Brad, have there been any new discoveries about why compiler tests
> and custom-command outputs fail to open their output files on Windows
> as described in [cmake issue 12957]?

That failure was due to not being able to remove or replace the
`.exe` files used for the checks, and it was almost always due to
an antivirus tool locking the files.  That's why the fix was to
just use a different `.exe` name each time.  Even without an AV
tool, NTFS does not have synchronous delete operations.  We could
work around that by renaming a file out of the way before deleting
it, but so far the existing workaround has been sufficient (and the
renaming could also race with AV locks).

Using a different name isn't an option here, but also this one looks
a bit different because it is about reading a file just after it is
written.  Likely the antivirus tool is monitoring all filesystem
operations and opens the file just after creation in order to scan
it.  Since the purpose of the check is to avoid letting viruses run
the AV tool likely opens the file without any sharing permissions.

This kind of AV operation is mostly invisible for humans creating
and reading files, but causes headaches for build systems and other
use cases that do rapid creation and use of files.  I think the best
solution is to just exclude one's development directories from the
AV configuration.


More information about the vtk-developers mailing list