[Solved] Compilation freezes on Debian in Release Mode only

After setting up a fresh install of Debian Buster, I cannot compile my project in Release mode anymore. The project gets hung up on PluginProcessor.cpp with one core staying on 100% CPU indefinetely.

This only happens:

  • On my fresh Debian (Ubuntu 18.04 on Azure seems to work fine)
  • when compiling in Release mode make CONFIG=Release, Debug mode compiles without problems.

I tried setting up a blank JUCE PluginProject and it compiled fine. However, even when returning to the very first commit of my project (which already contains a lot of code which was carried over) the problem persists.

Is there any further information I can get what is happening? I tried to use make in verbose mode, but it didn’t output anything.

Have you tried disabling LTO? Sometimes compilers are choking with big projects with lot of translation units and not enough memory.

Also try with a different version of your compiler or switching to clang, to see if you have the same symptoms

Thanks for your reply!

LTO wasn’t enabled to begin with, however I noticed that it will compile with -O0 and -O1, but the problem appears with -O2 and -O3 (<- which I am using).

I also tried compiling with clang, which funnily enough will get a linker error with everything higher than -O1. I think these two problems are unrelated, since gcc hangs during compilation, clang during linkage.


Can it be related to gcc bug or memory error? If you talking about your project’s devel branch - it compiles fine on my system.

1 Like

Hi Kott,

Yeah, Odin devel. Are you compiling on Debian 10 and gcc?

I think I will write this off as an obscure occurence, since I can work around it.

I’m on openSUSE TW, g++ 10

do you use make -j<num-cores> ?

1 Like

YES! Thank you! This was precisely the problem.

I’m using alias make='make -j 12' in my bashrc, that’s why I forgot about it! I’m not entirely sure why this causes a freeze, since memory usage is around 20%, but I consider this the solution anyway.