GlPortal / glPortal

:video_game: Open Source teleportation based first person puzzle-platformer
http://glportal.de
Other
359 stars 109 forks source link

Compilation error ‘runtime_error’ is not a member of ‘std’ commit 50298e61f22503b8f74d4e44cdebc08d7532a4c #182

Closed koutoftimer closed 9 months ago

koutoftimer commented 3 years ago

Describe the bug Compilation error.

/tmp/glPortal/external/RadixEngine/source/data/screen/XmlScreenLoader.cpp:44:14: error: ‘runtime_error’ is not a member of ‘std’
   44 |   throw std::runtime_error("Failed to load " + path + ": " + errorName(error));
      |              ^~~~~~~~~~~~~

To Reproduce Steps to reproduce the behavior:

  1. Follow steps from COMPILE.md
  2. You will get an error during make

Desktop (please complete the following information):

user $ neofetch
         -/oyddmdhs+:.                ruslan@k53ta 
     -odNMMMMMMMMNNmhy+-`             ------------ 
   -yNMMMMMMMMMMMNNNmmdhy+-           OS: Gentoo/Linux x86_64 
 `omMMMMMMMMMMMMNmdmmmmddhhy/`        Host: GA-MA785GM-US2H 
 omMMMMMMMMMMMNhhyyyohmdddhhhdo`      Kernel: 5.10.61-gentoo-x86_64 
.ydMMMMMMMMMMdhs++so/smdddhhhhdm+`    Uptime: 2 days, 13 hours, 21 mins 
 oyhdmNMMMMMMMNdyooydmddddhhhhyhNd.   Packages: 1029 (emerge) 
  :oyhhdNNMMMMMMMNNNmmdddhhhhhyymMh   Shell: bash 5.1.8 
    .:+sydNMMMMMNNNmmmdddhhhhhhmMmy   Resolution: 1280x1024 
       /mMMMMMMNNNmmmdddhhhhhmMNhs:   WM: i3 
    `oNMMMMMMMNNNmmmddddhhdmMNhs+`    Theme: Adwaita [GTK2] 
  `sNMMMMMMMMNNNmmmdddddmNMmhs/.      Icons: Adwaita [GTK2] 
 /NMMMMMMMMNNNNmmmdddmNMNdso:`        Terminal: urxvt 
+MMMMMMMNNNNNmmmmdmNMNdso/-           Terminal Font: Liberation Mono 
yMMNNNNNNNmmmmmNNMmhs+/-`             CPU: AMD Athlon II X2 240 (2) @ 2.800GHz 
/hMMNNNNNNNNMNdhs++/-`                GPU: NVIDIA GeForce GT 220 
`/ohdmmddhys+++/:.`                   Memory: 4468MiB / 9961MiB 
  `-//////:--.

Additional context Add any other context about the problem here.

MuriloucoLouco commented 1 year ago

You can fix it by adding #include <stdexcept> in glPortal/external/RadixEngine/source/data/screen/XmlScreenLoader.cpp

hhirsch commented 1 year ago

@MuriloucoLouco Thank you, I will patch this. If I forget, just ping me here again.

koutoftimer commented 1 year ago

@MuriloucoLouco

[ 83%] Building CXX object external/RadixEngine/tests/CMakeFiles/XmlHelperTest.dir/XmlHelperTest.cpp.o
In file included from /usr/include/signal.h:328,
                 from /tmp/glPortal/external/RadixEngine/external/catch/single_include/catch.hpp:6262,
                 from /tmp/glPortal/external/RadixEngine/tests/XmlHelperTest.cpp:4:
/tmp/glPortal/external/RadixEngine/external/catch/single_include/catch.hpp:6285:33: error: size of array ‘altStackMem’ is not an integral constant-expression
 6285 |         static char altStackMem[SIGSTKSZ];
      |                                 ^~~~~~~~
/tmp/glPortal/external/RadixEngine/external/catch/single_include/catch.hpp:6336:45: error: size of array ‘altStackMem’ is not an integral constant-expression
 6336 |     char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
      |                                             ^~~~~~~~
In file included from /usr/include/signal.h:328,
                 from /tmp/glPortal/external/RadixEngine/external/catch/single_include/catch.hpp:6262,
                 from /tmp/glPortal/external/RadixEngine/tests/core/math/QuaternionTest.cpp:6:
/tmp/glPortal/external/RadixEngine/external/catch/single_include/catch.hpp:6285:33: error: size of array ‘altStackMem’ is not an integral constant-expression
 6285 |         static char altStackMem[SIGSTKSZ];
      |                                 ^~~~~~~~
/tmp/glPortal/external/RadixEngine/external/catch/single_include/catch.hpp:6336:45: error: size of array ‘altStackMem’ is not an integral constant-expression
 6336 |     char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
      |                                             ^~~~~~~~

Looks like all errors are about RadixEngine. Let me know if it is wrong place to report such issues.

/tmp/glPortal $ rg SIGSTKSZ
external/RadixEngine/external/catch/include/internal/catch_fatal_condition.hpp
140:        static char altStackMem[SIGSTKSZ];
160:            sigStack.ss_size = SIGSTKSZ;
192:    char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};

external/RadixEngine/external/catch/single_include/catch.hpp
6285:        static char altStackMem[SIGSTKSZ];
6305:            sigStack.ss_size = SIGSTKSZ;
6336:    char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};

Where it even comes from? There is no declaration in sources, only usage.

hhirsch commented 1 year ago

I was also unable to compile on a modern system. Been trying on and off when I had a bit of spare time.

hhirsch commented 9 months ago

Fixed in https://github.com/GlPortal/RadixEngine/commit/c9647067fbd1c65fe02db9e6012cc6f37420b854 let's discuss follow up errors in new tickets.