eglaysher / rlvm

RealLive clone for Linux and OSX
http://rlvm.net
GNU General Public License v3.0
150 stars 25 forks source link

Can't compile #93

Closed ghost closed 2 years ago

ghost commented 2 years ago

Running scons --release gives me:

scons: Reading SConscript files ...
Checking for Boost version >= 1.40... (cached) yes
Checking for C library pthread... (cached) yes
Checking for C library ogg... (cached) yes
Checking for C library vorbis... (cached) yes
Checking for C library vorbisfile... (cached) yes
Checking for C library sndfile... (cached) yes
Checking for C library SDL... (cached) yes
Checking for C++ library zita-resampler... (cached) no
(Using included version of zita-resampler)
Checking for glewInit() in C++ library GLEW... (cached) no
(Using included version of GLEW)
Checking for TTF_Init() in C++ library SDL_ttf... (cached) no
(Using included version of SDL_ttf)
Checking for C++ library SDL_mixer... (cached) no
(Using included version of SDL_mixer)
Checking for C++ library SDL_image... (cached) no
(Using included version of SDL_image)
Checking for guichan 0.8 with OpenGL and SDL support...(cached) no
(Using included copy of guichan)
Checking for C++ library lua5.1... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/release
Compiling build/release/src/systems/base/system.o ...
Compiling build/release/src/systems/base/text_waku.o ...
Compiling build/release/src/utilities/find_font_file.o ...
Compiling build/libraries/guichan/src/widgets/button.o ...
Compiling build/libraries/guichan/src/widgets/radiobutton.o ...
Compiling build/libraries/guichan/src/widgets/imagebutton.o ...
Compiling build/libraries/guichan/src/widgets/container.o ...
Compiling build/libraries/guichan/src/widgets/scrollarea.o ...
Compiling build/libraries/guichan/src/widgets/dropdown.o ...
Compiling build/libraries/guichan/src/widgets/tabbedarea.o ...
Compiling build/libraries/guichan/src/widgets/textbox.o ...
Compiling build/libraries/guichan/src/widgets/listbox.o ...
Compiling build/libraries/guichan/src/widgets/tab.o ...
Compiling build/libraries/guichan/src/widgets/textfield.o ...
Compiling build/libraries/guichan/src/widgets/icon.o ...
Compiling build/libraries/guichan/src/basiccontainer.o ...
Compiling build/libraries/guichan/src/inputevent.o ...
Compiling build/libraries/guichan/src/widget.o ...
In file included from src/systems/base/text_waku.cc:29:
src/systems/base/system.h:148:8: error: 'shared_ptr' in namespace 'std' does not name a template type
  148 |   std::shared_ptr<Platform> platform() { return platform_; }
      |        ^~~~~~~~~~
src/systems/base/system.h:37:1: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
   36 | #include <sstream>
  +++ |+#include <memory>
   37 | #include <string>
src/systems/base/system.h:149:31: error: 'shared_ptr' in namespace 'std' does not name a template type
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |                               ^~~~~~~~~~
src/systems/base/system.h:149:26: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |                          ^~~
src/systems/base/system.h:149:41: error: expected ',' or '...' before '<' token
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |                                         ^
src/systems/base/system.h:279:8: error: 'shared_ptr' in namespace 'std' does not name a template type
  279 |   std::shared_ptr<Platform> platform_;
      |        ^~~~~~~~~~
src/systems/base/system.h:279:3: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
  279 |   std::shared_ptr<Platform> platform_;
      |   ^~~
src/systems/base/system.h:330:8: error: 'shared_ptr' in namespace 'std' does not name a template type
  330 |   std::shared_ptr<std::stringstream> previous_selection_;
      |        ^~~~~~~~~~
src/systems/base/system.h:330:3: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
  330 |   std::shared_ptr<std::stringstream> previous_selection_;
      |   ^~~
In file included from src/utilities/find_font_file.cc:32:
src/systems/base/system.h:148:8: error: 'shared_ptr' in namespace 'std' does not name a template type
  148 |   std::shared_ptr<Platform> platform() { return platform_; }
      |        ^~~~~~~~~~
src/systems/base/system.h:37:1: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
   36 | #include <sstream>
  +++ |+#include <memory>
   37 | #include <string>
src/systems/base/system.h:149:31: error: 'shared_ptr' in namespace 'std' does not name a template type
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |                               ^~~~~~~~~~
src/systems/base/system.h:149:26: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |                          ^~~
src/systems/base/system.h:149:41: error: expected ',' or '...' before '<' token
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |                                         ^
src/systems/base/system.h:279:8: error: 'shared_ptr' in namespace 'std' does not name a template type
  279 |   std::shared_ptr<Platform> platform_;
      |        ^~~~~~~~~~
src/systems/base/system.h:279:3: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
  279 |   std::shared_ptr<Platform> platform_;
      |   ^~~
src/systems/base/system.h:330:8: error: 'shared_ptr' in namespace 'std' does not name a template type
  330 |   std::shared_ptr<std::stringstream> previous_selection_;
      |        ^~~~~~~~~~
src/systems/base/system.h:330:3: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
  330 |   std::shared_ptr<std::stringstream> previous_selection_;
      |   ^~~
scons: *** [build/release/src/systems/base/text_waku.o] Error 1
scons: *** [build/release/src/utilities/find_font_file.o] Error 1
In file included from src/systems/base/system.cc:28:
src/systems/base/system.h:148:8: error: 'shared_ptr' in namespace 'std' does not name a template type
  148 |   std::shared_ptr<Platform> platform() { return platform_; }
      |        ^~~~~~~~~~
src/systems/base/system.h:37:1: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
   36 | #include <sstream>
  +++ |+#include <memory>
   37 | #include <string>
src/systems/base/system.h:149:31: error: 'shared_ptr' in namespace 'std' does not name a template type
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |                               ^~~~~~~~~~
src/systems/base/system.h:149:26: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |                          ^~~
src/systems/base/system.h:149:41: error: expected ',' or '...' before '<' token
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |                                         ^
src/systems/base/system.h:279:8: error: 'shared_ptr' in namespace 'std' does not name a template type
  279 |   std::shared_ptr<Platform> platform_;
      |        ^~~~~~~~~~
src/systems/base/system.h:279:3: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
  279 |   std::shared_ptr<Platform> platform_;
      |   ^~~
src/systems/base/system.h:330:8: error: 'shared_ptr' in namespace 'std' does not name a template type
  330 |   std::shared_ptr<std::stringstream> previous_selection_;
      |        ^~~~~~~~~~
src/systems/base/system.h:330:3: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
  330 |   std::shared_ptr<std::stringstream> previous_selection_;
      |   ^~~
src/systems/base/system.cc:135:6: error: no declaration matches 'void System::SetPlatform(const std::shared_ptr<Platform>&)'
  135 | void System::SetPlatform(const std::shared_ptr<Platform>& platform) {
      |      ^~~~~~
In file included from src/systems/base/system.cc:28:
src/systems/base/system.h:149:8: note: candidate is: 'void System::SetPlatform(int)'
  149 |   void SetPlatform(const std::shared_ptr<Platform>& platform);
      |        ^~~~~~~~~~~
src/systems/base/system.h:137:7: note: 'class System' defined here
  137 | class System {
      |       ^~~~~~
src/systems/base/system.cc: In member function 'void System::TakeSelectionSnapshot(RLMachine&)':
src/systems/base/system.cc:140:3: error: 'previous_selection_' was not declared in this scope
  140 |   previous_selection_.reset(new std::stringstream);
      |   ^~~~~~~~~~~~~~~~~~~
src/systems/base/system.cc: In member function 'void System::RestoreSelectionSnapshot(RLMachine&)':
src/systems/base/system.cc:148:42: error: 'previous_selection_' was not declared in this scope
  148 |   std::shared_ptr<std::stringstream> s = previous_selection_;
      |                                          ^~~~~~~~~~~~~~~~~~~
src/systems/base/system.cc: In member function 'int System::IsSyscomEnabled(int)':
src/systems/base/system.cc:167:14: error: 'previous_selection_' was not declared in this scope
  167 |       return previous_selection_.get() ? SYSCOM_VISIBLE : SYSCOM_GREYED_OUT;
      |              ^~~~~~~~~~~~~~~~~~~
src/systems/base/system.cc: In member function 'void System::ShowSyscomMenu(RLMachine&)':
src/systems/base/system.cc:223:14: error: 'platform_' was not declared in this scope; did you mean 'Platform'?
  223 |   } else if (platform_) {
      |              ^~~~~~~~~
      |              Platform
src/systems/base/system.cc: In member function 'void System::InvokeSyscom(RLMachine&, int)':
src/systems/base/system.cc:252:11: error: 'platform_' was not declared in this scope; did you mean 'Platform'?
  252 |       if (platform_)
      |           ^~~~~~~~~
      |           Platform
src/systems/base/system.cc: In member function 'void System::ShowSystemInfo(RLMachine&)':
src/systems/base/system.cc:307:7: error: 'platform_' was not declared in this scope; did you mean 'Platform'?
  307 |   if (platform_) {
      |       ^~~~~~~~~
      |       Platform
src/systems/base/system.cc: In member function 'void System::Reset()':
src/systems/base/system.cc:359:3: error: 'previous_selection_' was not declared in this scope
  359 |   previous_selection_.reset();
      |   ^~~~~~~~~~~~~~~~~~~
src/systems/base/system.cc: In member function 'void System::InvokeSaveOrLoad(RLMachine&, int, const string&, const string&)':
src/systems/base/system.cc:435:14: error: 'platform_' was not declared in this scope; did you mean 'Platform'?
  435 |   } else if (platform_) {
      |              ^~~~~~~~~
      |              Platform
scons: *** [build/release/src/systems/base/system.o] Error 1
scons: building terminated because of errors.

On Gentoo, with all dependencias installed as far as I know, of course.

minirop commented 2 years ago

As said in the error messages, add #include <memory> at the top of src/systems/base/system.h and you should be good. (hidden includes are the bane of cross compilation)

ghost commented 2 years ago

As said in the error messages, add #include <memory> at the top of src/systems/base/system.h and you should be good. (hidden includes are the bane of cross compilation)

I'll try this out when I have access to my computer again, thanks. :)

Closing for now.

ghost commented 2 years ago

@minirop sure enough, this fixed it, thank you!