The following intermittent error occurs:
Synthesis [Designutils 20-411] Could not clean up previous tmp directory './.Xil/Vivado-####-/realtime'
This error does not seem to be project specific. A project may get this error after completing the same process several times previously.
Why do I get this error? How can I get around it?
Try to manually delete (i.e., rm -rf) the ./.Xil/Vivado-####- directory. Typically, when this happens, it means some process is holding on to a file handle in the specified directory.
If you are able to successfully delete the directory every time when you see this message, that could mean a temporary file lock is being placed on the directory and then released by the time you are able to get to it. In this case, you can try using a post synthesis Tcl script to try and delete the directory as soon as possible after synthesis ends.
This error has been seen intermittently on Windows platforms, and has been linked to the use of McAfee "On Access Virus Scanning." The virus scan software is running actively and locking files and directories for reading while Vivado is trying to remove the same files or directory. Turning off McAfee "On Access Virus Scanning" may resolve the issue if that is an option (e.g., company IT policy).
With McAfee on-access scanning on, as soon as a file is accessed by a program it will scan the file.
The scan of the file starts after the program opened the file and still takes time after the program closed the file.
McAfee only reads the file (simultaneously with the accessing program) and keeps reading after the accessing program completes.
So, the file is accessed and in use (by McAfee) while the original program thinks it is closed.