Hi,
I met the same problem when I was trying to compile some c++ libraries on Raspberry. You can try to compile on Respeaker core after creating a swap file to increase the memory.
Here is the link with the instructions.
<LINK_TEXT text=“https://www.cyberciti.biz/faq/linux-add … ile-howto/”>https://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/</LINK_TEXT>
I never tried on the Respeaker Core but maybe it can work.