Aloshi / EmulationStation

A flexible emulator front-end supporting keyboardless navigation and custom system themes.
MIT License
2.08k stars 905 forks source link

Compiling on Debian sid fails #893

Open jonorthwash opened 1 year ago

jonorthwash commented 1 year ago

Attempting to compile EmulationStation on Debian sid for x86_64 failed.

I have checked out the code at commit 9cc42adff67946175d2b7e25c6ae69cc374e98a0.

I have installed the libraries needed for compilation.

This is the tail of the backtrace:

[ 88%] Building CXX object es-app/CMakeFiles/emulationstation.dir/src/guis/GuiMenu.cpp.o
[ 89%] Building CXX object es-app/CMakeFiles/emulationstation.dir/src/guis/GuiSettings.cpp.o
[ 89%] Building CXX object es-app/CMakeFiles/emulationstation.dir/src/guis/GuiScraperMulti.cpp.o
[ 90%] Building CXX object es-app/CMakeFiles/emulationstation.dir/src/guis/GuiScraperStart.cpp.o
[ 91%] Building CXX object es-app/CMakeFiles/emulationstation.dir/src/scrapers/Scraper.cpp.o
[ 92%] Building CXX object es-app/CMakeFiles/emulationstation.dir/src/scrapers/GamesDBScraper.cpp.o
[ 93%] Building CXX object es-app/CMakeFiles/emulationstation.dir/src/scrapers/TheArchiveScraper.cpp.o
[ 94%] Building CXX object es-app/CMakeFiles/emulationstation.dir/src/views/gamelist/BasicGameListView.cpp.o
In file included from /home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.h:3,
                 from /home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:1:
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/ISimpleGameListView.h:37:14: error: ‘stack’ in namespace ‘std’ does not name a template type
   37 |         std::stack<FileData*> mCursorStack;
      |              ^~~~~
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/ISimpleGameListView.h:7:1: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’?
    6 | #include "components/ImageComponent.h"
  +++ |+#include <stack>
    7 | 
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp: In member function ‘virtual void BasicGameListView::setCursor(FileData*)’:
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:63:20: error: ‘mCursorStack’ was not declared in this scope; did you mean ‘CursorState’?
   63 |                 if(mCursorStack.empty() || mCursorStack.top() != cursor->getParent())
      |                    ^~~~~~~~~~~~
      |                    CursorState
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:65:30: error: ‘stack’ is not a member of ‘std’
   65 |                         std::stack<FileData*> tmp;
      |                              ^~~~~
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:8:1: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’?
    7 | #include "Settings.h"
  +++ |+#include <stack>
    8 | 
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:65:44: error: expected primary-expression before ‘*’ token
   65 |                         std::stack<FileData*> tmp;
      |                                            ^
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:65:45: error: expected primary-expression before ‘>’ token
   65 |                         std::stack<FileData*> tmp;
      |                                             ^
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:65:47: error: ‘tmp’ was not declared in this scope; did you mean ‘tm’?
   65 |                         std::stack<FileData*> tmp;
      |                                               ^~~
      |                                               tm
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:74:45: error: ‘stack’ is not a member of ‘std’
   74 |                         mCursorStack = std::stack<FileData*>();
      |                                             ^~~~~
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:74:45: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’?
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:74:59: error: expected primary-expression before ‘*’ token
   74 |                         mCursorStack = std::stack<FileData*>();
      |                                                           ^
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:74:60: error: expected primary-expression before ‘>’ token
   74 |                         mCursorStack = std::stack<FileData*>();
      |                                                            ^
/home/jonathan/Downloads/EmulationStation/es-app/src/views/gamelist/BasicGameListView.cpp:74:62: error: expected primary-expression before ‘)’ token
   74 |                         mCursorStack = std::stack<FileData*>();
      |                                                              ^
make[2]: *** [es-app/CMakeFiles/emulationstation.dir/build.make:412: es-app/CMakeFiles/emulationstation.dir/src/views/gamelist/BasicGameListView.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:248: es-app/CMakeFiles/emulationstation.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Currently I'm stuck. Any debugging steps or suggestions for things to try are welcome.

matiasw commented 11 months ago

I had the same problem. I added #include <stack> to ISimpleGameListView.h and got it to compile.