Skip to content

[BUG] PCH + Ninja: random parallel build failure #327

Description

@wavexx

Describe the bug
Probably not a bug in itself, but I'm logging this here: I just tried to rebuild using ninja & gcc 11. With the default being PCH=On, I sometimes see:

cc1plus: error: /MK404/build/CMakeFiles/MK404.dir/cmake_pch.hxx.gch: created and used with differing settings of '-mrtm' [-Werror=invalid-pch]

This is misleading though. I guess that -mrtm is actually toggled by a different optimization level somewhere. Or maybe it's actually a bug in gcc 11. And since ninja tends to run things more parallel-ly than make, you get this.

ninja -j1 will clear this, as well as disabling pch, as well as just using make ;)

To Reproduce
Use cmake -G Ninja, gcc 11 and ninja -j>5 when building.

Expected behavior
No build failure even when PCH is enabled.

Desktop (please complete the following information):

  • OS: debian unstable

Additional context
I might debug this later myself, just logging this for reference.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions