Jump to content
  • 0

Internal Compiler Error -- How to Avoid It?


adrians

Question

I'm building mangos zero on Ubuntu 22.04 LTS, I'm encountering an "internal compiler error", in response to what I believe is valid code, how can I avoid this?

 

[ 64%] Building CXX object src/shared/CMakeFiles/shared.dir/Utilities/EventProcessor.cpp.o
[ 64%] Linking CXX static library libshared.a
[ 64%] Built target shared
[ 64%] Built target revision_data.h
[ 64%] Building CXX object src/game/CMakeFiles/vmap2.dir/vmap/BIH.cpp.o
[ 64%] Building CXX object src/game/CMakeFiles/vmap2.dir/vmap/VMapManager2.cpp.o
[ 64%] Building CXX object src/game/CMakeFiles/vmap2.dir/vmap/MapTree.cpp.o
[ 64%] Building CXX object src/game/CMakeFiles/vmap2.dir/vmap/TileAssembler.cpp.o
during GIMPLE pass: vrp
/home/mangos/mangos/zero/server/src/game/vmap/TileAssembler.cpp: In member function ‘void VMAP::TileAssembler::exportGameobjectModels(const char*)’:
/home/mangos/mangos/zero/server/src/game/vmap/TileAssembler.cpp:390:10: internal compiler error: in compute_live_loop_exits, at tree-ssa-loop-manip.c:247
  390 |     void TileAssembler::exportGameobjectModels(const char *RAW_VMAP_MAGIC)
      |          ^~~~~~~~~~~~~
0x7fc368f7bd8f __libc_start_call_main
	../sysdeps/nptl/libc_start_call_main.h:58
0x7fc368f7be3f __libc_start_main_impl
	../csu/libc-start.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make[2]: *** [src/game/CMakeFiles/vmap2.dir/build.make:118: src/game/CMakeFiles/vmap2.dir/vmap/TileAssembler.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:800: src/game/CMakeFiles/vmap2.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Edited by adrians
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Thank you. I've verified the memory is not saturated and repeated it twice. At the point of crashing, this is how much memory my system had free:

               total        used        free      shared  buff/cache   available
Mem:           3.8Gi       588Mi       2.1Gi       5.0Mi       1.1Gi       3.0Gi
Swap:          8.0Gi          0B       8.0Gi

Additionally, I watched it and logged the memory output with "while true ; do free -h >> memory.txt; sleep 2; done". Everything seemed ok.

I will attach the compiler output to this post. Inside it are two errors:

[ 64%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/include/sc_grid_searchers.cpp.o
during GIMPLE pass: vrp
/home/mangos/mangos/zero/server/src/game/vmap/TileAssembler.cpp: In member function ‘void VMAP::TileAssembler::exportGameobjectModels(const char*)’:
/home/mangos/mangos/zero/server/src/game/vmap/TileAssembler.cpp:390:10: internal compiler error: in compute_live_loop_exits, at tree-ssa-loop-manip.c:247
  390 |     void TileAssembler::exportGameobjectModels(const char *RAW_VMAP_MAGIC)
      |          ^~~~~~~~~~~~~
0x7f04b5765d8f __libc_start_call_main
	../sysdeps/nptl/libc_start_call_main.h:58
0x7f04b5765e3f __libc_start_main_impl
	../csu/libc-start.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
make[2]: *** [src/game/CMakeFiles/vmap2.dir/build.make:118: src/game/CMakeFiles/vmap2.dir/vmap/TileAssembler.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:800: src/game/CMakeFiles/vmap2.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

[ 74%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp.o
[ 74%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp.o
[ 74%] Building CXX object src/modules/SD3/CMakeFiles/mangosscript.dir/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp.o
[ 74%] Linking CXX static library libmangosscript.a
[ 74%] Built target mangosscript
make: *** [Makefile:156: all] Error 2

output.txt

Link to comment
Share on other sites

  • 0

Furthermore, the mentioned code seems fine:

https://github.com/mangoszero/server/blob/master/src/game/vmap/TileAssembler.cpp#L390

I'll continue working on this. I'll update the thread when I find a solution. Since the code is fine, there's not much the project can do about this, it seems to be a gcc bug, not mangos. I'll start by comparing the build logs on github with the package versions I'm using.

Edited by adrians
Link to comment
Share on other sites

  • 0

Thanks to @Avelde on the Discord for this solution. Thought I'd share it here:
 

Quote

 

There's a known issue with this in gcc11 that's distributed with Ubuntu 22.04 LTS

sudo apt install gcc-12 g++-12

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12

 

That's the process for upgrading to gcc-12.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use