Jump to content
  • 0

[Three] Extracting content on linux


LordJim

Question

Hey everyone,

I recently started my first attempts to setup mangos three on my debian wheezy server. I am following the guide in the wiki (https://github.com/mangoswiki/Wiki/wiki/DebianInstall), and except for a few minor things I can correct myself the compile instructions work. But at the point where it tells me to extract game assets I am lost. The extraction tools do not seem to compile on a linux system - first missing header files in loadlib.cpp:

mangos@server:~/git/server/contrib/extractor$ make
[ 20%] Building CXX object loadlib/CMakeFiles/loadlib.dir/loadlib.cpp.o
In file included from /home/mangos/git/server/contrib/extractor/loadlib/loadlib.cpp:3:0:
/home/mangos/git/server/contrib/extractor/loadlib/loadlib.h:26:22: fatal error: StormLib.h: No such file or directory
compilation terminated.
make[2]: *** [loadlib/CMakeFiles/loadlib.dir/loadlib.cpp.o] Error 1
make[1]: *** [loadlib/CMakeFiles/loadlib.dir/all] Error 2
make: *** [all] Error 2
mangos@server:~/git/server/contrib/extractor$

Now I symlink the needed headers into the directory and get:

mangos@server:~/git/server/contrib/extractor$ make
[ 20%] Building CXX object loadlib/CMakeFiles/loadlib.dir/loadlib.cpp.o
/home/mangos/git/server/contrib/extractor/loadlib/loadlib.cpp:136:25: warning: multi-character character constant [-Wmultichar]
In file included from /home/mangos/git/server/contrib/extractor/loadlib/loadlib.cpp:3:0:
/home/mangos/git/server/contrib/extractor/loadlib/loadlib.h:61:45: error: ‘std::string’ has not been declared
/home/mangos/git/server/contrib/extractor/loadlib/loadlib.cpp:40:45: error: ‘std::string’ has not been declared
/home/mangos/git/server/contrib/extractor/loadlib/loadlib.cpp: In function ‘bool ExtractFile(const char*, const int&)’:
/home/mangos/git/server/contrib/extractor/loadlib/loadlib.cpp:56:54: error: request for member ‘c_str’ in ‘filename’, which is of non-class type ‘const int’
/home/mangos/git/server/contrib/extractor/loadlib/loadlib.cpp:65:56: error: request for member ‘c_str’ in ‘filename’, which is of non-class type ‘const int’
make[2]: *** [loadlib/CMakeFiles/loadlib.dir/loadlib.cpp.o] Error 1
make[1]: *** [loadlib/CMakeFiles/loadlib.dir/all] Error 2
make: *** [all] Error 2
mangos@server:~/git/server/contrib/extractor$

Seems somewhere is missing #include <string>, so I add it to loadlib.h:

mangos@server:~/git/server/contrib/extractor$ make
[ 20%] Building CXX object loadlib/CMakeFiles/loadlib.dir/loadlib.cpp.o
/home/mangos/git/server/contrib/extractor/loadlib/loadlib.cpp:136:25: warning: multi-character character constant [-Wmultichar]
[ 40%] Building CXX object loadlib/CMakeFiles/loadlib.dir/adt.cpp.o
/home/mangos/git/server/contrib/extractor/loadlib/adt.cpp:59:23: warning: multi-character character constant [-Wmultichar]
/home/mangos/git/server/contrib/extractor/loadlib/adt.cpp:77:16: warning: multi-character character constant [-Wmultichar]
/home/mangos/git/server/contrib/extractor/loadlib/adt.cpp:96:16: warning: multi-character character constant [-Wmultichar]
/home/mangos/git/server/contrib/extractor/loadlib/adt.cpp:110:16: warning: multi-character character constant [-Wmultichar]
/home/mangos/git/server/contrib/extractor/loadlib/adt.cpp:122:16: warning: multi-character character constant [-Wmultichar]
/home/mangos/git/server/contrib/extractor/loadlib/adt.cpp:137:16: warning: multi-character character constant [-Wmultichar]
/home/mangos/git/server/contrib/extractor/loadlib/adt.cpp:148:16: warning: multi-character character constant [-Wmultichar]
[ 60%] Building CXX object loadlib/CMakeFiles/loadlib.dir/wdt.cpp.o
/home/mangos/git/server/contrib/extractor/loadlib/wdt.cpp:7:16: warning: multi-character character constant [-Wmultichar]
/home/mangos/git/server/contrib/extractor/loadlib/wdt.cpp:14:16: warning: multi-character character constant [-Wmultichar]
/home/mangos/git/server/contrib/extractor/loadlib/wdt.cpp:21:16: warning: multi-character character constant [-Wmultichar]
Linking CXX static library libloadlib.a
[ 60%] Built target loadlib
Scanning dependencies of target ad
[ 80%] Building CXX object CMakeFiles/ad.dir/dbcfile.cpp.o
[100%] Building CXX object CMakeFiles/ad.dir/System.cpp.o
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/mangos/git/server/contrib/extractor/System.cpp:98:126: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
Linking CXX executable ad
/usr/bin/ld: cannot find -llibStormLib
collect2: error: ld returned 1 exit status
make[2]: *** [ad] Error 1
make[1]: *** [CMakeFiles/ad.dir/all] Error 2
make: *** [all] Error 2
mangos@server:~/git/server/contrib/extractor$

This time the loadlib compiles fine, but linking ad does not work.

I could try to find a build target for StormLib that produces the lib, but I figured I ask first. Did somebody else ran into this already or do you know how to work around it? Is it even supposed to compile on linux?

Thanks in advance,

Chris

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Just to give an update, I used the last couple of days to look further into the issue myself and came up with a working build chain for Linux. I would be happy to contribute this to the official repository, if someone wants to take a look at it you can find my fork at https://github.com/LordJimBeam/server.

I will mark this as solved for now, the changes I made work for me on Debian Wheezy. If anyone has trouble with it just send me a message :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use