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

trying to build Cmake error #2

Open
Daigtas opened this issue Jan 4, 2019 · 2 comments
Open

trying to build Cmake error #2

Daigtas opened this issue Jan 4, 2019 · 2 comments

Comments

@Daigtas
Copy link

Daigtas commented Jan 4, 2019

this is what i get when i try to compile GDaemon2:
`-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
src/CMakeLists.txt:33 (find_package)

CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
src/CMakeLists.txt:33 (find_package)

CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
src/CMakeLists.txt:33 (find_package)

CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
Imported targets not available for Boost version 106501
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
src/CMakeLists.txt:33 (find_package)

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- filesystem
-- iostreams
-- thread
-- Found boost: /usr/local/lib/libboost_system.so;/usr/local/lib/libboost_filesystem.so;/usr/local/lib/libboost_iostreams.so;/usr/local/lib/libboost_thread.so;/usr/lib/x86_64-linux-gnu/libpthread.so
-- Found jsoncpp: /usr/lib/x86_64-linux-gnu/libjsoncpp.so
-- Found binn: /usr/lib/libbinn.a
-- Found restclient-cpp: /usr/lib/librestclient-cpp.a
-- Found crypt: /usr/lib/x86_64-linux-gnu/libcrypt.so
-- Found OpenSSL: /usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so (found version "1.1.1a")
-- Found CURL: /usr/local/lib/libcurl.so (found version "7.63.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /root/GDaemon2
root@zero-lan:~/GDaemon2# make gameap-daemon
Scanning dependencies of target gameap-daemon
[ 6%] Building CXX object src/CMakeFiles/gameap-daemon.dir/config.cpp.o
[ 13%] Building CXX object src/CMakeFiles/gameap-daemon.dir/daemon.cpp.o
[ 20%] Building CXX object src/CMakeFiles/gameap-daemon.dir/daemon_server.cpp.o
[ 26%] Building CXX object src/CMakeFiles/gameap-daemon.dir/functions/gstring.cpp.o
[ 33%] Building CXX object src/CMakeFiles/gameap-daemon.dir/functions/gsystem.cpp.o
[ 40%] Building CXX object src/CMakeFiles/gameap-daemon.dir/classes/dedicated_server.cpp.o
[ 46%] Building CXX object src/CMakeFiles/gameap-daemon.dir/classes/game_server.cpp.o
[ 53%] Building CXX object src/CMakeFiles/gameap-daemon.dir/classes/tasks.cpp.o
[ 60%] Building CXX object src/CMakeFiles/gameap-daemon.dir/functions/restapi.cpp.o
[ 66%] Building CXX object src/CMakeFiles/gameap-daemon.dir/functions/auth.cpp.o
[ 73%] Building CXX object src/CMakeFiles/gameap-daemon.dir/status.cpp.o
[ 80%] Building CXX object src/CMakeFiles/gameap-daemon.dir/components/server/commands_component.cpp.o
[ 86%] Building CXX object src/CMakeFiles/gameap-daemon.dir/components/server/files_component.cpp.o
[ 93%] Building CXX object src/CMakeFiles/gameap-daemon.dir/control_linux.cpp.o
[100%] Linking CXX executable ../build/bin/gameap-daemon
CMakeFiles/gameap-daemon.dir/functions/restapi.cpp.o: In function Gameap::Rest::get_token()': /root/GDaemon2/src/functions/restapi.cpp:31: undefined reference to RestClient::Connection::Connection(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/root/GDaemon2/src/functions/restapi.cpp:34: undefined reference to RestClient::Connection::AppendHeader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /root/GDaemon2/src/functions/restapi.cpp:35: undefined reference to RestClient::Connection::AppendHeader(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/root/GDaemon2/src/functions/restapi.cpp:36: undefined reference to RestClient::Connection::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' CMakeFiles/gameap-daemon.dir/functions/restapi.cpp.o: In function Gameap::Rest::get(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)':
/root/GDaemon2/src/functions/restapi.cpp:77: undefined reference to RestClient::Connection::Connection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /root/GDaemon2/src/functions/restapi.cpp:79: undefined reference to RestClient::Connection::AppendHeader(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/root/GDaemon2/src/functions/restapi.cpp:80: undefined reference to RestClient::Connection::AppendHeader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /root/GDaemon2/src/functions/restapi.cpp:81: undefined reference to RestClient::Connection::get(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
CMakeFiles/gameap-daemon.dir/functions/restapi.cpp.o: In function Gameap::Rest::post(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value)': /root/GDaemon2/src/functions/restapi.cpp:111: undefined reference to RestClient::Connection::Connection(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/root/GDaemon2/src/functions/restapi.cpp:113: undefined reference to RestClient::Connection::AppendHeader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /root/GDaemon2/src/functions/restapi.cpp:114: undefined reference to RestClient::Connection::AppendHeader(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/root/GDaemon2/src/functions/restapi.cpp:118: undefined reference to RestClient::Connection::post(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' CMakeFiles/gameap-daemon.dir/functions/restapi.cpp.o: In function Gameap::Rest::put(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, Json::Value)':
/root/GDaemon2/src/functions/restapi.cpp:154: undefined reference to RestClient::Connection::Connection(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /root/GDaemon2/src/functions/restapi.cpp:156: undefined reference to RestClient::Connection::AppendHeader(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/root/GDaemon2/src/functions/restapi.cpp:157: undefined reference to RestClient::Connection::AppendHeader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /root/GDaemon2/src/functions/restapi.cpp:159: undefined reference to RestClient::Connection::put(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
collect2: error: ld returned 1 exit status
src/CMakeFiles/gameap-daemon.dir/build.make:444: recipe for target 'build/bin/gameap-daemon' failed
make[3]: *** [build/bin/gameap-daemon] Error 1
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/gameap-daemon.dir/all' failed
make[2]: *** [src/CMakeFiles/gameap-daemon.dir/all] Error 2
CMakeFiles/Makefile2:97: recipe for target 'src/CMakeFiles/gameap-daemon.dir/rule' failed
make[1]: *** [src/CMakeFiles/gameap-daemon.dir/rule] Error 2
Makefile:118: recipe for target 'gameap-daemon' failed
make: *** [gameap-daemon] Error 2`
Also there is no manual about the gameap-daemon configuration after installing the web part and how to add the server with the daemon in it installed and running, what parrams goes where and stuff like that.
With alot of poking blind with the panel and trying to make it run, after all got success but there was more than 6 hours of pure work on it by studying the code debuging and configuration variations. I could try to make auto installer but i do it my way with an Apache2, mysql and php7.1. By default laravel uses the redis server but i will try to remove this dependency as it is only a caching server similar as the memchached and similar. I think it is not essential and is not needed. I will make an clean install on debian and try to document all the steps what i did to make an auto install script or manual installation guide for for everyone else. I will need this myself in future i think becouse i see a lot of good in this system compared with other similar game panels that gone comercial and stuck with development. That is not the way that good software is made.
Anyways, keep on working and if you need some help with translating it or testing and debuging then i think i will be able to find time for that. Btw daemon can be made in other way like python without all the compilation stuff. C++ is a good language but same stuff can be made with simple /bin/sh

@et-nik
Copy link
Member

et-nik commented Jan 11, 2019

@Daigtas What distribution are you using?

You should install restclient

Complile restclient libs from sources:
https://github.com/mrtazz/restclient-cpp

Or install from gameap repositories. For Debian stretch:

curl -fsSL http://packages.gameap.ru/gameap-rep.gpg.key | apt-key add -
echo "deb http://packages.gameap.ru/debian stretch main" >> /etc/apt/sources.list

apt-get update
apt-get install librestclientcpp-dev

@Daigtas
Copy link
Author

Daigtas commented Jan 12, 2019

Debian 9 Strech, and the libs are actualy installed

apt-get install librestclientcpp-dev Reading package lists... Done Building dependency tree Reading state information... Done librestclientcpp-dev is already the newest version (0.5.0-13wheezy). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Why are you using curl for everything instead of wget? i do often get errors with curl command you post so i am changing it to an wget to get rid of any errors.
for example this command:
curl -fsSL http://packages.gameap.ru/gameap-rep.gpg.key | apt-key add - curl: (48) An unknown option was passed in to libcurl
are you sure it suppose to go with these switches? -fsSL ? Anyways, with good old wget it goes smooth as a butter.

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