Skip to content

Windows Ninja build: cannot open file 'bin\*.ilk' #515

@sadguitarius

Description

@sadguitarius

Hi, I was just trying to build the library with examples on Windows using Ninja, and ran into these errors:

cannot open file 'bin\d_embed_external_ui.ilk' (and similar errors for other targets)

The errors show up for different, and not all, targets for each build, and eventually the build will succeed after a few tries.

I've traced it back to this discussion, specifically the part about projects configured to write to the same .ilk file.

Lo and behold, I changed the OUTPUT_NAME variables in DPFPlugin.cmake so the each target has its own unique name, and this did solve the problem.

I also don't have the problem when disabling parallel builds in Ninja, which seems to confirm that this is some kind of file access race condition. Obviously though, this defeats the purpose of using Ninja to speed up builds.

The only drawback I can see is that the binary names are changed. I'm not much of a CMake wiz, so beyond diagnosing this issue, I'm not sure of the best way to solve it and keep the resulting filenames the same.

Ninja really is way faster for Windows builds (and probably non-Windows too), so it would be nice to get this working properly!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions