bitwiseworks / gcc-os2

Port of GCC compiler to OS/2
GNU General Public License v2.0
16 stars 2 forks source link

Out of memory of cc1plus.exe #36

Closed komh closed 1 year ago

komh commented 1 year ago

Hi/2.

I'm trying to build VLC with gcc 9.2.0. However, compilation fails due to out of memory.

make[4]: Entering directory 'F:/lang/work/vlc/vlc.git/modules'
  CXX      gui/qt/dialogs/libqt_plugin_la-dialogs_provider.lo

cc1plus.exe: out of memory allocating 65536 bytes after a total of 284622848 bytes
make[4]: *** [Makefile:31764: gui/qt/dialogs/libqt_plugin_la-dialogs_provider.lo] Error 1

Any ideas ?

StevenLevine commented 1 year ago

Hi/2 to you too. :-)

cc1plus.exe: out of memory allocating 65536 bytes after a total of 284622848 bytes make[4]: *** [Makefile:31764: gui/qt/dialogs/libqt_plugin_la-dialogs_provider.lo] Error 1 ```

This usually means that the assembler has defaulted to building a 16-bit object module. Paul ran into this with his qt5/qt6 builds. I don't recall exactly what assembler options needed to change.

dryeo commented 1 year ago

I had those errors when building Qt5, restarting the computer fixed it for a while. Had to restart a few times to succeed. Also VIRTUALADDRESSLIMIT=3072 and nothing much else running. We're at the limits of our address space and then memory gets fragmented I think.

komh commented 1 year ago

It was a high-memory problem, that is, some DLLs are not enabled to use high-memory. Therefore, gcc could not allocate memory in a high-memory heap.

I've fixed this by using DLLs provided by rpm.

However, it would be better to make gcc to use high-memory regardless of heap voting.