Page 1 of 1
Linux Build make error
Posted: Wed Apr 01, 2015 4:24 am
by Khelendil
Hi Guys.
I put the "Compile the Server on Win XP with gcc" on hold and moved on to "Compile the Server on Linux".
Im Running gcc-4.8.4 (self compiled) on Debian 7.8.
Running the scripts n configure worked fine but make failes with the following error:
Code: Select all
src/map/message.cpp:44:17: Fehler: keine passende Funktion für Aufruf von »zmq::context_t::context_t()«
zmq::context_t zContext;
^
src/map/message.cpp:44:17: Anmerkung: Kandidaten sind:
In file included from src/map/message.h:27:0,
from src/map/message.cpp:27:
/usr/include/zmq.hpp:241:9: Anmerkung: zmq::context_t::context_t(const zmq::context_t&)
context_t (const context_t&);
^
/usr/include/zmq.hpp:241:9: Anmerkung: Kandidat erwartet 1 Argument, 0 angegeben
/usr/include/zmq.hpp:210:16: Anmerkung: zmq::context_t::context_t(zmq::context_t&&)
inline context_t(context_t&& rhs) : ptr(rhs.ptr)
^
/usr/include/zmq.hpp:210:16: Anmerkung: Kandidat erwartet 1 Argument, 0 angegeben
/usr/include/zmq.hpp:202:16: Anmerkung: zmq::context_t::context_t(int)
inline context_t (int io_threads_)
^
/usr/include/zmq.hpp:202:16: Anmerkung: Kandidat erwartet 1 Argument, 0 angegeben
src/map/message.cpp: In Funktion »void message::close()«:
src/map/message.cpp:460:18: Fehler: »class zmq::context_t« hat kein Element namens »close«
zContext.close();
i have libzmq-dev installed in /usr/include/ and then there is the local version.
Question is: Which one shall i use? The one in the Code Tree looks like it was modified a bit (diffed em and the src tree one had a few more lines)
Code Base was updated before i ran autogen.sh
Re: Linux Build make error
Posted: Wed Apr 01, 2015 8:46 am
by kjLotus
there's two(?) different libzmq dev packages, you got the wrong one, i think its libzmq3-dev or something
the local one is just for windows
Re: Linux Build make error
Posted: Wed Apr 01, 2015 11:03 am
by Khelendil
Well i had libzmq3-dev installed but got same error.
(Realized that it was alrdy there when i installed libzmq-dev as apt-get uninstalled the other one)
Will try with the other one again but it will proly fail again.
Edit a few hours later:
Tried and got expected result. Even ran configure as follows but seems like it ignored the switch:
Code: Select all
./configure --enable-debug ZMQ_CFLAGS=-I/usr/include --prefix /srv/darkstar/server/
Ive attached the config.log maybe there is somethin amiss i dont see.
libzmq3-dev is installed in default location /usr/include (and others but zmq.h .hpp and -utils.h are here)
N i still get that make cant find a suitable function to call zmq::context_t::context_t()
Also tried building Login Server but got same result. Whenever it tries to initlize zContext it says i cant do this cuz the call expects a parameter to be handed over. Ill try to just tell him that it is a nullptr like zSocket the line below it
Edit No3 on 9:15pm:
Seems like i fixed it. Copied n commented original definition. Copy was changed to the following and compiling works:
Will try to start it like this n see what happenz. Chances are that it will break but it might as well be working. Feedback comes tomorrow evening.
Re: Linux Build make error
Posted: Thu Apr 02, 2015 3:45 pm
by Khelendil
Ok i managed to compile the Servers with the above mentioned Fix/Workaround/Code-Change
The Login Server Works but the Game Server wont start as i seem to miss a library or somethin like that. Output is
Code: Select all
bin/dsgame: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by bin/dsgame)
I installed the Server to a different directory and copied the needed folders (scripts, conf, lib, lib64, log)
After that i configured the Servers as stated in the wiki.
Set ZoneIP to lokal network (How does one set this up for using vpn? wanna use this with my LAN and VPN simultanously. For that the VPN Subnet will be behind the LAN Subnet [192.168.2.0/23])
Login Server starts but Gameserver just failes to start.
Re: Linux Build make error
Posted: Thu Apr 02, 2015 4:01 pm
by demolish
paste your your game server log (log\map-server.log)
Re: Linux Build make error
Posted: Fri Apr 03, 2015 1:45 am
by Khelendil
demolish wrote:paste your your game server log (log\map-server.log)
There r no logfiles (for all servers) as my directory Structure in the install dir is not all other dirs behind the executables.
Thought it was possible to seperate them into multiple folders like
Code: Select all
/srv/darkstar/server/bin <-- executables
/srv/darkstar/server/conf <-- configs
/srv/darkstar/server/log <-- logfiles
/srv/darkstar/server/lib <-- libs (x64 is another dir besides it)
/srv/darkstar/server/scripts <-- lua scripts
But the error i mentioned is more like a system error then a server error. Seems like my libstdc++.so.6 file was not updated when i compiled gcc-4.8.4
The login-server has a few cli switches and a usage when u call it with --help. Did i miss that on the others or do they have it too? would be cool if one could tell em where they can find all the stuff like --server-root to be specefied as the common folder where the components reside and they then look for a conf | scripts | log dir in that path
Fixed the problem with missing glibcxx. Problem was that gcc-4.8.4 is installed in /usr/local/bin and the correct lib was installed in /usr/local/lib32 | lib64.
Created a symlink to the new folder n hope that this wont break other stuff
I also enabled the help menu on the mapserver (in my local repo) and will try to add the --server-root switch so the files will be found.
The function for the help output was implemented but the main function do_init() misses the strcmp line to call that (same with version)
Another thing i found while browsing the code is the placeholder function "parse_console". Would be cool if that could be used to correctly shutdown the servers instead of hittin strg + c to kill em (hit it twice actually as the first time only kills it half, Message Server keeps spamming)
Re: Linux Build make error
Posted: Fri Apr 03, 2015 4:02 pm
by whasf
If you didn't modify the source code pertaining to the log files, then it tries to open ./log/map-server.log. According to your post above, your log folder is in the wrong place, I bet it complains about it in the console.
That could be why you don't have any log files.
Re: Linux Build make error
Posted: Fri Apr 03, 2015 5:23 pm
by Khelendil
whasf wrote:If you didn't modify the source code pertaining to the log files, then it tries to open ./log/map-server.log. According to your post above, your log folder is in the wrong place, I bet it complains about it in the console.
That could be why you don't have any log files.
Yep it is the wrong folder but no it does not complain as im not running it from within the bin dir but the server-root dir above it.
So technically im in the right dir for it to work.
Anyways Servers are up and running (with my little mod).