BtbN / FFmpeg-Builds

MIT License
6.99k stars 958 forks source link

[ERROR] g++: fatal error: Killed signal terminated program cc1plus #301

Closed mrtajniak closed 9 months ago

mrtajniak commented 9 months ago
1583.5 [ERROR]    g++: fatal error: Killed signal terminated program cc1plus
1583.5 [ALL  ]    compilation terminated.
1583.6 [ERROR]    make[2]: *** [Makefile:1157: insn-emit.o] Error 1
1583.6 [ERROR]    make[2]: *** Waiting for unfinished jobs....
1638.7 [ALL  ]    rm gcc.pod
1638.7 [ALL  ]    make[2]: Leaving directory '/ct-ng/build/x86_64-w64-mingw32/build/build-cc-gcc-core/gcc'
1638.7 [ERROR]    make[1]: *** [Makefile:4601: all-gcc] Error 2
1638.8 [ALL  ]    make[1]: Leaving directory '/ct-ng/build/x86_64-w64-mingw32/build/build-cc-gcc-core'
1638.9 [ERROR]
1638.9 [ERROR]  >>
1638.9 [ERROR]  >>  Build failed in step 'Installing core C gcc compiler'
1638.9 [ERROR]  >>        called in step '(top-level)'
1638.9 [ERROR]  >>
1638.9 [ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@377]
1638.9 [ERROR]  >>        called from: do_gcc_core_backend[scripts/build/cc/gcc.sh@711]
1638.9 [ERROR]  >>        called from: do_cc_core[scripts/build/cc/gcc.sh@212]
1638.9 [ERROR]  >>        called from: main[scripts/crosstool-NG.sh@707]
1639.0 [ERROR]  >>
1639.0 [ERROR]  >>  There is a list of known issues, some with workarounds, in:
1639.0 [ERROR]  >>      https://crosstool-ng.github.io/docs/known-issues/
1639.0 [ERROR]  >>
1639.0 [ERROR]  >> NOTE: Your configuration includes features marked EXPERIMENTAL.
1639.0 [ERROR]  >> Before submitting a bug report, try to reproduce it without enabling
1639.0 [ERROR]  >> any experimental features. Otherwise, you'll need to debug it
1639.0 [ERROR]  >> and present an explanation why it is a bug in crosstool-NG - or
1639.0 [ERROR]  >> preferably, a fix.
1639.0 [ERROR]  >>
1639.0 [ERROR]  >>  If you feel this is a bug in crosstool-NG, report it at:
1639.0 [ERROR]  >>      https://github.com/crosstool-ng/crosstool-ng/issues/
1639.0 [ERROR]  >>
1639.0 [ERROR]  >>  Make sure your report includes all the information pertinent to this issue.
1639.0 [ERROR]  >>  Read the bug reporting guidelines here:
1639.0 [ERROR]  >>      http://crosstool-ng.github.io/support/
1639.0 [ERROR]
1639.2 [ERROR]  (elapsed: 25:33.27)
1639.2 gmake: *** [ct-ng:261: build] Error 2
------
WARNING: local cache import at .cache/ghcr.io/btbn/ffmpeg-builds/base-win64_latest not found due to err: could not read .cache/ghcr.io/btbn/ffmpeg-builds/base-win64_latest/index.json: open .cache/ghcr.io/btbn/ffmpeg-builds/base-win64_latest/index.json: no such file or directory
Dockerfile:4
--------------------
   3 |
   4 | >>> RUN --mount=src=ct-ng-config,dst=/.config \
   5 | >>>     git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng && \
   6 | >>>     ./bootstrap && \
   7 | >>>     ./configure --enable-local && \
   8 | >>>     make -j$(nproc) && \
   9 | >>>     cp /.config .config && \
  10 | >>>     ./ct-ng build && \
  11 | >>>     cd / && \
  12 | >>>     rm -rf ct-ng
  13 |
--------------------
ERROR: failed to solve: process "/bin/sh -c git clone --filter=blob:none https://github.com/crosstool-ng/crosstool-ng.git /ct-ng && cd /ct-ng &&     ./bootstrap &&     ./configure --enable-local &&     make -j$(nproc) &&     cp /.config .config &&     ./ct-ng build &&     cd / &&     rm -rf ct-ng" did not complete successfully: exit code: 2
+ rm -f /tmp/tmp.YXH2ovoA50.toml
BtbN commented 9 months ago

Please include the actual error. Like this, all I can do is guess that you ran out of RAM.

mrtajniak commented 9 months ago

Wdm? This is an actual error Zrzut ekranu (10)

BtbN commented 9 months ago

No, the actual error is somewhere before that. All this is saying is "some error happened". Also check dmesg for potential OOM messages.

mrtajniak commented 9 months ago

Before that? Zrzut ekranu (12)

BtbN commented 9 months ago

With the parallel build, it can be quite some ways before that, yes. If that's really all there is, that would strongly hint at the system running out of RAM and killing g++. dmesg will tell you if that's the case.

mrtajniak commented 9 months ago

image

WSL2 has 4GB of RAM allocated, I can spin up VM with 8GB of RAM on my ESXi Server

mrtajniak commented 9 months ago

What's the minimum amount of RAM required?

BtbN commented 9 months ago

The WSL VM by default gets 50% of the systems RAM. You can increase that via %USERPROFILE%/.wslconfig. The maximum amount of RAM depends on the number of cores, due to parallel builds. I'd say around 4GB per core is a safe minimum.

mrtajniak commented 9 months ago

My PC has 16GB of ram and 8 core CPU

My server has 72GB of RAM and 2 x 6 core CPUs

mrtajniak commented 9 months ago

I have removed additional setting from the config file and now I have something like that image