Cc1plus.exe: out of memory allocating 65536 bytes

Hello,

I’m currently running into cc1plus.exe: out of memory allocating 65536 bytes error on AWS EC2 Windows instances.

They have 32 cores, 128 GB of RAM, 25 GB of SWAP and the software on them is mirroring the current build machines we have, still I ran into that error.
I have tried the following with no success yet https://stackoverflow.com/questions/12231266/qt-compiling-error-out-of-memory-allocating-134-mb-cc1plus-exe-not-found

Note: on the on-site build machines we have, this isn’t happening.

Did anyone ran into this error and managed to fix it ?

I would guess that it is generating debug symbols. If so, you can prevent that by adding -g0 to the compilation flags.

Note that on the on-site build machines we have, this isn’t happening.