Jump to content

How to compile MaNGOS on Linux ( Using GIT )


Recommended Posts

To apply a patch you can use the patch command.

Thank you for this very helpful and ***** hint. :mad: THIS i do know. So nothing changed, we get the patch from another source and patch it as usual or how else now? This is what I wanted to know. We have now commits and branches with GIT and what else I even dare to imagine, but nobody said any word how GIT changes, if we want to add reviewed patches. Why is it so hard for some kind of people here, to give adeqate answers, that I could forget my good education.

Link to comment
Share on other sites

  • Replies 288
  • Created
  • Last Reply

Top Posters In This Topic

I only use these 3 commands to compile mangos on linux:

autoreconf -ifv
./configure --prefix=/server/mangos --sysconfdir=/server/mangos/etc --enable-cli --enable-ra --datadir=/server/mangos/data --enable-maintainer-mode
make -j4

use "make" if your server only has 1 cpu, use "make -j2" if your server has 2 cores, and to compile ultrafast on 4 cores use: "make -j4" etc..

no need to create a folder "objdir", you can compile straight from the mangos folder with just 3 commands

instead of using all these:

autoreconf --install --force
aclocal
autoheader
autoconf
automake --add-missing
automake src/bindings/ScriptDev2/Makefile
mkdir objdir
cd objdir
../configure --prefix=/opt/mangos --sysconfdir=/opt/mangos/etc --enable-cli --enable-ra --datadir=/opt/mangos
make
make install
make clean
cd ..
rm -r objdir

Link to comment
Share on other sites

Applying the impconfig_git diff (http://svn.assembla.com/svn/ImpConfig/impconfig_git.diff) results in an uncompilable build.

Here's a newly generated diff (based on rev 87 of impconfig):

http://www.withinwindows.com/files/mangos/impconfig_git_rev87_corrected.diff

(let me know if I generated that incorrectly, I don't mess with this stuff daily)

~$ cd ~/mangos/
~$ wget [url]http://www.withinwindows.com/files/mangos/impconfig_git_rev87_corrected.diff[/url]
~$ patch -p2 < impconfig_git_rev87_corrected.diff

Changes

AuthSocket.cpp:503

Changed if(ch->build >= MinBuild && ch->build <= MaxBuild) --to-- if(_build >= MinBuild && _build <= MaxBuild)

Link to comment
Share on other sites

Thank you for this very helpful and ***** hint. :mad: THIS i do know. So nothing changed, we get the patch from another source and patch it as usual or how else now? This is what I wanted to know. We have now commits and branches with GIT and what else I even dare to imagine, but nobody said any word how GIT changes, if we want to add reviewed patches. Why is it so hard for some kind of people here, to give adeqate answers, that I could forget my good education.

Learn to search it's not that hard...:mad:

Link to comment
Share on other sites

To begin, I m french and this is a translate from my tuto in french,

if you see, langage error, please pm me.

You must install :

To use git and not use gitfm, you must do this :

You must enter the digit which match with :

You must to download the files from the git repository, git create your mangos sources dir for you.

You must download and patch ScriptDev2.

Then, you must compile.

You can replace ../configure --prefix=/opt/mangos --sysconfdir=/opt/mangos/etc --enable-cli --enable-ra --datadir=/opt/mangos

by ../configure --prefix=[working path] --sysconfdir=[working path]/etc --enable-cli --enable-ra --datadir=[working path]

with your [working path]

Good Luck ;)

Ok, I must be doing something wrong.

when I try this section

mkdir src/bindings/ScriptDev2

svn co https://scriptdev2.svn.sourceforge.n...ot/scriptdev2/ src/bindings/ScriptDev2

patch -p0 < src/bindings/ScriptDev2/patches/MaNGOS-r6765-ScriptDev2.patch

I get an error about not finding the location

full error is

svn: PROPFIND request failed on '/scriptdev2'

svn: PROPFIND of '/scriptdev2': Could not resolve hostname `scriptdev2.svn.sourceforge.n...ot': No address associated with hostname (https://scriptdev2.svn.sourceforge.n...ot)

Link to comment
Share on other sites

tlimux,

the answer is in the posts above you. This is simply how the vBulletin forum shortens urls

Thank you that got it to compile.

(New to Linux (TestingLINUX) so I thought I'd go all out and try to turn my laptop into a Server for gaming, web, ect {who wants to start small})

Link to comment
Share on other sites

apt-get = yum install on fedora...Got that.

yum install <all those services/files> returns with the following errors on Fedora core 9:

No package g++ available

No package libmysql++-dev available

No package libssl-dev available

No package zlibc available

No package libc6 available

Any suggestions for those on Fedora?

Link to comment
Share on other sites

Thanks for the tutorial, my server is currently running in Windows but I want to try Linux for a comparison. do I need to keep execute all these commands? Or those are only needed for the first time build?

autoreconf --install --force
aclocal
autoheader
autoconf
automake --add-missing
automake src/bindings/ScriptDev2/Makefile
mkdir objdir
cd objdir
../configure --prefix=/opt/mangos --sysconfdir=/opt/mangos/etc --enable-cli --enable-ra --datadir=/opt/mangos
make
make install
make clean
cd ..
rm -r objdir                      

If I don't need all of the commands above after compiling at least 1 build, which commands that I do really need?

Thanks..

Link to comment
Share on other sites

I have an error after using this command

../configure --prefix=/home/mangos --sysconfdir=/home/mangos/etc --enable-cli --enable-ra --datadir=/home/mangos

Error

checking for ace/Reactor.h... yes
checking for main in -lACE... no
checking whether to build ACE... configure: error: looks like you have ACE headers, but you do not have ACE libs installed

Can anyone help me

Link to comment
Share on other sites

autoreconf --install --force
aclocal
autoheader
autoconf
automake --add-missing
automake src/bindings/ScriptDev2/Makefile
mkdir objdir
cd objdir
../configure --prefix=/opt/mangos --sysconfdir=/opt/mangos/etc --enable-cli --enable-ra --datadir=/opt/mangos
make
make install
make clean
cd ..
rm -r objdir

You need to use these commands each time you are compiling mangos.

@Athlon64 : try to update your sources.

@travis : I dont know Fedora, but when I start with Mangos on linux, I had the choice between fedora and opensuse, after 2days, I'm going on openSuse,

but it's hardly too, to find the good packets, I thinks the debians are the best OS for mangos.

Link to comment
Share on other sites

I feel like a script kiddie doing this walkthrough and hoping it works, but it's my first exposure to doing it the right way.

First time I installed Reaper-X and got yelled at. So, now I'm try to do it the right way.

After walking through these steps, I am wondering if there is something that has changed for the latest version that requires an adjustment to the steps. After going through all the steps and getting to the "make" portion, I find that I get similar errors to Nerus:

make[5]: *** [Database.o] Error 1

make[5]: Leaving directory `/root/mangos/objdir/src/shared/Database'

make[4]: *** [all-recursive] Error 1

make[4]: Leaving directory `/root/mangos/objdir/src/shared'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/root/mangos/objdir/src/shared'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory `/root/mangos/objdir/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/root/mangos/objdir'

make: *** [all] Error 2

I tried to do this using a sudo command (using Ubuntu) and they still showed up. I don't think this is a show stopper, though.

Next, the make install croaked early because of permissions, so I ran it with sudo and it seemed to complete without much of an issue. However, actually going to the "/opt/mangos" directory shows that I have almost no files in place. Here is the directory structure I have:

mangos/
mangos/lib:
mangos/mangos:
mangos/mangos/sql:
mangos/mangos/sql/tools:
mangos/mangos/sql/updates:

It doesn't make sense to me to have mangos stacked two deep... so I'm getting the impression that something is wrong... either with the build I'm pulling down, or just the fact that I'm running something I know very little about.

Any help would be nice. I'm going to keep plugging away and give any feedback if I can find what the problem is.

Link to comment
Share on other sites

I have an error after using this command

../configure --prefix=/home/mangos --sysconfdir=/home/mangos/etc --enable-cli --enable-ra --datadir=/home/mangos

Error

checking for ace/Reactor.h... yes
checking for main in -lACE... no
checking whether to build ACE... configure: error: looks like you have ACE headers, but you do not have ACE libs installed

Can anyone help me

if you have installed ACE with prefix /usr/local

maybe add /usr/local/lib in /etc/ld.so.conf

Link to comment
Share on other sites

Nevermind my above posts. My original build must have failed due to me not doing something right. I nuked all of the directories involved and restarted the process... It compiled without a problem.

I would add that when you do the make install on Ubuntu you may need to do a sudo make install if you want to use the /opt folder to install to.

And with that, Thanks for the guide!

Link to comment
Share on other sites

Nevermind my above posts. My original build must have failed due to me not doing something right. I nuked all of the directories involved and restarted the process... It compiled without a problem.

I would add that when you do the make install on Ubuntu you may need to do a sudo make install if you want to use the /opt folder to install to.

And with that, Thanks for the guide!

Well ... that's a common thing, isn't it? How many "make install"s have you run without root privs? :)

Link to comment
Share on other sites

please help, i compile linux,

and i have this error

checking dynamic linker characteristics... GNU/Linux ld.so

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... no

configure: creating libtool

appending configuration tag "CXX" to libtool

appending configuration tag "F77" to libtool

checking for a BSD-compatible install... /usr/bin/install -c

checking for pthread_create in -lpthread... yes

checking for compress in -lz... no

configure: error: Missing zlib

i have

sudo apt-get install zlibc

please help ;)

Link to comment
Share on other sites

thx for the guide, but how to do it when i am not in the actual path?

checking out is easy, but applying the sd2 patch not.

what i try is:

patch -d /opt/manngos/tmp/mangos/ -p0 < ...

but it cant find folder "a" and "b" o.O

EDIT: found out, when i use -p1 is works... why not always use -p1 ?

Link to comment
Share on other sites

×
×
  • 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