Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wavexx opened this issue Aug 23, 2021 · 1 comment
Open

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

wavexx opened this issue Aug 23, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@wavexx
Copy link
Collaborator

wavexx commented Aug 23, 2021

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.

@wavexx wavexx added the bug Something isn't working label Aug 23, 2021
@vintagepc
Copy link
Owner

FYI we've seen similar issues running Ninja directly on Mini404 as well; the auto-parallel builds there fail because a certain order of execution/build is required that it doesn't respect.

It'd be nice if we could fix it, sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants