Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 7 #16

Open
Centoff opened this issue May 31, 2021 · 2 comments
Open

CentOS 7 #16

Centoff opened this issue May 31, 2021 · 2 comments

Comments

@Centoff
Copy link

Centoff commented May 31, 2021

Компиляция не проходит. Пробовал на всех версиях gcc. Лучше всего идет на 9. (доходит до 43%)

Scanning dependencies of target gameap-daemon
[  4%] Building CXX object src/CMakeFiles/gameap-daemon.dir/config.cpp.o
[  8%] Building CXX object src/CMakeFiles/gameap-daemon.dir/state.cpp.o
[ 13%] Building CXX object src/CMakeFiles/gameap-daemon.dir/daemon.cpp.o
In file included from /home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon.cp                                                                                                                     p:11:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_server.h: In constructor                                                                                                                      ‘DaemonServer::DaemonServer(boost::asio::io_service&, boost::asio::ip::tcp::end                                                                                                                     point)’:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_server.h:119:36: warning                                                                                                                     : ‘DaemonServer::acceptor_’ will be initialized after [-Wreorder]
  119 |     boost::asio::ip::tcp::acceptor acceptor_;
      |                                    ^~~~~~~~~
/home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_server.h:118:30: warning                                                                                                                     :   ‘boost::asio::io_service& DaemonServer::io_service_’ [-Wreorder]
  118 |     boost::asio::io_service& io_service_;
      |                              ^~~~~~~~~~~
In file included from /home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon.cp                                                                                                                     p:11:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_server.h:80:1: warning:                                                                                                                        when initialized here [-Wreorder]
   80 | DaemonServer(boost::asio::io_service& io_service, boost::asio::ip::tcp::                                                                                                                     endpoint endpoint)
      | ^~~~~~~~~~~~
[ 17%] Building CXX object src/CMakeFiles/gameap-daemon.dir/daemon_server.cpp.o
In file included from /home/GameServ/server_gp/GDaemon2_new/daemon/src/component                                                                                                                     s/server/files_component.h:26,
                 from /home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_se                                                                                                                     rver.cpp:7:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_server.h: In constructor                                                                                                                      ‘DaemonServer::DaemonServer(boost::asio::io_service&, boost::asio::ip::tcp::end                                                                                                                     point)’:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_server.h:119:36: warning                                                                                                                     : ‘DaemonServer::acceptor_’ will be initialized after [-Wreorder]
  119 |     boost::asio::ip::tcp::acceptor acceptor_;
      |                                    ^~~~~~~~~
/home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_server.h:118:30: warning                                                                                                                     :   ‘boost::asio::io_service& DaemonServer::io_service_’ [-Wreorder]
  118 |     boost::asio::io_service& io_service_;
      |                              ^~~~~~~~~~~
In file included from /home/GameServ/server_gp/GDaemon2_new/daemon/src/component                                                                                                                     s/server/files_component.h:26,
                 from /home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_se                                                                                                                     rver.cpp:7:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/daemon_server.h:80:1: warning:                                                                                                                        when initialized here [-Wreorder]
   80 | DaemonServer(boost::asio::io_service& io_service, boost::asio::ip::tcp::                                                                                                                     endpoint endpoint)
      | ^~~~~~~~~~~~
[ 21%] Building CXX object src/CMakeFiles/gameap-daemon.dir/functions/gstring.cp                                                                                                                     p.o
[ 26%] Building CXX object src/CMakeFiles/gameap-daemon.dir/functions/gsystem.cp                                                                                                                     p.o
/home/GameServ/server_gp/GDaemon2_new/daemon/src/functions/gsystem.cpp: In funct                                                                                                                     ion ‘boost::process::child GameAP::exec(std::string, boost::process::pipe&)’:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/functions/gsystem.cpp:137:5: wa                                                                                                                     rning: control reaches end of non-void function [-Wreturn-type]
  137 |     }
      |     ^
[ 30%] Building CXX object src/CMakeFiles/gameap-daemon.dir/classes/dedicated_se                                                                                                                     rver.cpp.o
/home/GameServ/server_gp/GDaemon2_new/daemon/src/classes/dedicated_server.cpp: I                                                                                                                     n member function ‘bool GameAP::DedicatedServer::init()’:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/classes/dedicated_server.cpp:83                                                                                                                     :26: warning: ‘sysi.sysinfo::totalram’ may be used uninitialized in this functio                                                                                                                     n [-Wmaybe-uninitialized]
   83 |         ram_total = sysi.totalram/1024; // kB
      |                     ~~~~~^~~~~~~~
[ 34%] Building CXX object src/CMakeFiles/gameap-daemon.dir/classes/game_servers                                                                                                                     _list.cpp.o
[ 39%] Building CXX object src/CMakeFiles/gameap-daemon.dir/commands/game_server                                                                                                                     _installer.cpp.o
[ 43%] Building CXX object src/CMakeFiles/gameap-daemon.dir/commands/game_server                                                                                                                     _cmd.cpp.o
In file included from /home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/                                                                                                                     game_server_cmd.h:8,
                 from /home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/                                                                                                                     game_server_cmd.cpp:1:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/cmd.h:72:18: error: ‘m                                                                                                                     ap’ in namespace ‘std’ does not name a template type
   72 |             std::map<char, std::string>m_options;
      |                  ^~~
/home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/cmd.h:10:1: note: ‘std                                                                                                                     ::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
    9 | #include "log.h"
  +++ |+#include <map>
   10 |
/home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/cmd.h: In member funct                                                                                                                     ion ‘void GameAP::Cmd::set_option(char, const string&)’:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/cmd.h:58:23: error: ‘c                                                                                                                     lass GameAP::Cmd’ has no member named ‘m_options’
   58 |                 this->m_options.insert(std::pair<char, std::string>(name                                                                                                                     , value));
      |                       ^~~~~~~~~
/home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/cmd.h: In member funct                                                                                                                     ion ‘std::string GameAP::Cmd::get_option(char)’:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/cmd.h:119:27: error:                                                                                                                       class GameAP::Cmd’ has no member named ‘m_options’
  119 |                 if (this->m_options.find(option) == this->m_options.end(                                                                                                                     )) {
      |                           ^~~~~~~~~
/home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/cmd.h:119:59: error:                                                                                                                       class GameAP::Cmd’ has no member named ‘m_options’
  119 |                 if (this->m_options.find(option) == this->m_options.end(                                                                                                                     )) {
      |                                                           ^~~~~~~~~
/home/GameServ/server_gp/GDaemon2_new/daemon/src/commands/cmd.h:123:30: error:                                                                                                                       class GameAP::Cmd’ has no member named ‘m_options’
  123 |                 return this->m_options[option];
      |                              ^~~~~~~~~
make[2]: *** [src/CMakeFiles/gameap-daemon.dir/build.make:180: src/CMakeFiles/ga                                                                                                                     meap-daemon.dir/commands/game_server_cmd.cpp.o] Ошибка 1
make[1]: *** [CMakeFiles/Makefile2:91: src/CMakeFiles/gameap-daemon.dir/all] Оши                                                                                                                     бка 2
make: *** [Makefile:84: all] Ошибка 2
@et-nik
Copy link
Member

et-nik commented Jun 1, 2021

А какую ветку пытаетесь скомпилить? master, develop?

Попробуйте добавить в файл src/commands/cmd.h строчку

#include <map>

Где-нибудь над

#include <boost/filesystem.hpp>
#include <boost/format.hpp>

Скомпилится?

@Centoff
Copy link
Author

Centoff commented Jun 1, 2021

Да, помогло, но теперь на 65% ругается на ld:

[ 65%] Building CXX object src/CMakeFiles/gameap-daemon.dir/control_linux.cpp.o
/home/GameServ/server_gp/GDaemon2_new/daemon/src/control_linux.cpp: In function ‘void signal_error(int, siginfo_t*, void*)’:
/home/GameServ/server_gp/GDaemon2_new/daemon/src/control_linux.cpp:39:46: warning: unused parameter ‘si’ [-Wunused-parameter]
   39 | static void signal_error(int sig, siginfo_t *si, void *ptr)
      |                                   ~~~~~~~~~~~^~
[ 69%] Linking CXX executable ../build/bin/gameap-daemon
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: cannot find -ldl
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: cannot find -lpthread
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: cannot find -lm
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make[2]: *** [build/bin/gameap-daemon] Ошибка 1
make[1]: *** [src/CMakeFiles/gameap-daemon.dir/all] Ошибка 2
make: *** [all] Ошибка 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants