GlPortal / glPortal

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

glPortal won't build with GCC 7.1.0 #90

Closed willysr closed 6 years ago

willysr commented 7 years ago

Hi,

i'm unable to build glPortal with GCC 7.1.0

here's the relevant build log :

[ 75%] Building CXX object source/CMakeFiles/glportal.dir/engine/core/gl/VBO.cpp.o
[ 76%] Building CXX object source/CMakeFiles/glportal.dir/engine/core/math/Math.cpp.o
[ 77%] Building CXX object source/CMakeFiles/glportal.dir/engine/core/math/Matrix3f.cpp.o
[ 77%] Building CXX object source/CMakeFiles/glportal.dir/engine/core/math/Matrix4f.cpp.o
[ 78%] Building CXX object source/CMakeFiles/glportal.dir/engine/core/math/Vector2f.cpp.o
[ 78%] Building CXX object source/CMakeFiles/glportal.dir/engine/core/math/Vector3f.cpp.o
[ 79%] Building CXX object source/CMakeFiles/glportal.dir/engine/core/math/Vector4f.cpp.o
[ 80%] Building CXX object source/CMakeFiles/glportal.dir/engine/core/state/GameState.cpp.o
In file included from /tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/World.hpp:12:0,
                 from /tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.hpp:4,
                 from /tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:1:
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/HandleGameFunction.hpp:7:14: error: ‘function’ in namespace ‘std’ does not name a template type
 typedef std::function<void (Game &game)> HandleGameFunction;
              ^~~~~~~~
In file included from /tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.hpp:4:0,
                 from /tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:1:
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/World.hpp:57:14: error: ‘HandleGameFunction’ was not declared in this scope
   std::stack<HandleGameFunction> stateFunctionStack;
              ^~~~~~~~~~~~~~~~~~
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/World.hpp:57:32: error: template argument 1 is invalid
   std::stack<HandleGameFunction> stateFunctionStack;
                                ^
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/World.hpp:57:32: error: template argument 2 is invalid
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp: In member function ‘void glPortal::GameState::handleInput(glPortal::Game&)’:
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:10:3: error: ‘HandleGameFunction’ was not declared in this scope
   HandleGameFunction stateFunction = game.getWorld()->stateFunctionStack.top();
   ^~~~~~~~~~~~~~~~~~
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:10:3: note: suggested alternative: ‘handleGameOverScreen’
   HandleGameFunction stateFunction = game.getWorld()->stateFunctionStack.top();
   ^~~~~~~~~~~~~~~~~~
   handleGameOverScreen
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:11:3: error: ‘stateFunction’ was not declared in this scope
   stateFunction(game);
   ^~~~~~~~~~~~~
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:11:3: note: suggested alternative: ‘Quaternion’
   stateFunction(game);
   ^~~~~~~~~~~~~
   Quaternion
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp: In static member function ‘static void glPortal::GameState::handleRunning(glPortal::Game&)’:
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:20:41: error: request for member ‘push’ in ‘(& game)->glPortal::Game::getWorld()->glPortal::World::stateFunctionStack’, which is of non-class type ‘int’
     game.getWorld()->stateFunctionStack.push(&GameState::handlePaused);
                                         ^~~~
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:26:41: error: request for member ‘push’ in ‘(& game)->glPortal::Game::getWorld()->glPortal::World::stateFunctionStack’, which is of non-class type ‘int’
     game.getWorld()->stateFunctionStack.push(&GameState::handleTerminal);
                                         ^~~~
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp: In static member function ‘static void glPortal::GameState::handlePaused(glPortal::Game&)’:
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:35:41: error: request for member ‘pop’ in ‘(& game)->glPortal::Game::getWorld()->glPortal::World::stateFunctionStack’, which is of non-class type ‘int’
     game.getWorld()->stateFunctionStack.pop();
                                         ^~~
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp: In static member function ‘static void glPortal::GameState::handleSplash(glPortal::Game&)’:
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:44:41: error: request for member ‘pop’ in ‘(& game)->glPortal::Game::getWorld()->glPortal::World::stateFunctionStack’, which is of non-class type ‘int’
     game.getWorld()->stateFunctionStack.pop();
                                         ^~~
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp: In static member function ‘static void glPortal::GameState::handleTerminal(glPortal::Game&)’:
/tmp/SBo/glPortal-c3d5e47c5151360c09d0d84f66d9c0e3c2051251/source/engine/core/state/GameState.cpp:56:41: error: request for member ‘pop’ in ‘(& game)->glPortal::Game::getWorld()->glPortal::World::stateFunctionStack’, which is of non-class type ‘int’
     game.getWorld()->stateFunctionStack.pop();
                                         ^~~
make[2]: *** [source/CMakeFiles/glportal.dir/build.make:927: source/CMakeFiles/glportal.dir/engine/core/state/GameState.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:342: source/CMakeFiles/glportal.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Tested on Slackware-Current with these components

thanks

hhirsch commented 7 years ago

@willysr Hi. I am still on 6.3.1

willysr commented 7 years ago

Sure, no problem. I can wait. that's a development snapshot for Slackware, which still long way before it reached stable state :)

hhirsch commented 7 years ago

@willysr Current branch noecs should build with 7.1.1

willysr commented 7 years ago

@hhirsch : Big thanks!! mind to share the schedule to release a new tarball for this? we normally used a released tarball for our scripts.

hhirsch commented 7 years ago

@willysr Do you need an http url with the source and data? This might still take us until the second quarter of 2018.

willysr commented 7 years ago

I can take a snapshot for this branch since it's supported by github. Are you planning to introduce more commits on this branch?

@hhirsch : Do you mind to leave this issue open until a new tarball is released?

Thanks

hhirsch commented 7 years ago

@willysr Yes. Work is not done there. Gameplay elements are missing.

gk7huki commented 7 years ago

The stable branch doesn't build with GCC 7.1.1. This breaks the glportal AUR package on Arch Linux. Some headers are missing #include <functional>, so gcc is unable to resolve std::function, and it fails with the same build log as OP. I'll see if I can supply a patch for this.

hhirsch commented 7 years ago

@gk7huki I am able to compile master and noecs branches with 7.1.1 so the release we are preparing will compile. 2 of our team are on arch. Myself included.

hhirsch commented 7 years ago

@gk7huki @willysr noecs is merged into master so you should be able to build now.

willysr commented 7 years ago

Big thanks!!!

hhirsch commented 7 years ago

Stay tuned for our next release. It will be a while but there will be quite some improvements.

hhirsch commented 6 years ago

Please re-open if you can still reproduce the problem with current master.