-
Notifications
You must be signed in to change notification settings - Fork 224
Description
When updating CMake 3.30.1 to 3.31.9 in the vcpkg repository (microsoft/vcpkg#48250), a compilation error occurred with this library here. The reason for the compile error is that vcpkg uses Ninja for compiling, which is highly parallelized. This can cause issues if two targets have the same name, as additional files, such as PDBs, are often created.
Here a library named qjs will be created
Line 256 in 6a9fe9a
| add_library(qjs ${qjs_sources}) |
And here the executable will be renamed to the same name
Lines 305 to 307 in 6a9fe9a
| set_target_properties(qjs_exe PROPERTIES | |
| OUTPUT_NAME "qjs" | |
| ) |
As qjs_exe doesn't link against qjs, assumes that it can be compiled in parallel - because of the same name, the compiler wants to create a PDB with the same name at the same time, which leads to the following issue:
LINK : fatal error LNK1201: error writing to program database 'D:\b\quickjs-ng\x64-windows-static-dbg\qjs.pdb'; check for insufficient disk space, invalid path, or insufficient privilege
The best solution would be to avoid renaming targets so that conflicts do not arise. In the vcpkg repository, we will rename the PDB file as a temporary patch, but this does not prevent possible issues arising from identical file names in other compilers.