Jump to content

How to compile MaNGOS on Linux ( Using GIT )


Recommended Posts

  • 1 month later...
  • Replies 288
  • Created
  • Last Reply

Top Posters In This Topic

Whelp, first time trying to install Mangos on a Linux box. (The others have been Windows)

I get this error during the configure step.

Configuration of MaNGOS 0.16.0 is now complete.

=== configuring in dep/ACE_wrappers (/home/lex/mangos/objdir/dep/ACE_wrappers)
configure.new: running /bin/sh ../../../dep/ACE_wrappers/configure '--prefix=/mangos'  '--sysconfdir=/mangos/etc' '--enable-cli' '--enable-ra' '--datadir=/mangos/data' --cache-file=/dev/null --srcdir=../../../dep/ACE_wrappers
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether #! works in shell scripts... yes
checking for g++... g++
checking for C++ compiler default output file name...
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
configure.new: error: ../../../dep/ACE_wrappers/configure failed for dep/ACE_wrappers

I compile C++ on this box all the time. Ideas?

Ohy, tracked down the error more, it's caused by the ACE_wrappers configuration script not properly removing the end lines from the version, therefore causing a fuckedup confdefs.h header, causing compilations to fail.

dnl particularly with M4, do not modify this macro definition.
define([ACE_VERSION], patsubst(esyscmd(grep ACE_VERSION ace/Version.h | sed 's/.*\\" *\\(.*\\)\\".*/\\1/'), [
]))dnl remove newline ending every `esyscmd' answer

Thats from the latest pull.

*should* be working fine. I don't know why it isn't

but it results in '5.6.6\\r\\n' so it's not doing it's job properly.

Link to comment
Share on other sites

  • 1 month later...
I have errors:

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

This is a reply for and old post, but i have the same error in my server... i found the solution

In some files, in my case src/shared/Database/DatabaseMysql.cpp, are codes like this "#ifdef MANGOS_DEBUG" and "#endif"

This is NOT COMPATIBLE with CentOs Linux... i think # y for comment, isnt ?? well is better to use //

In CentOs the # character for comments is not compatible (im not a c++ programmer)

Read the error, see what file and in what line is the error, go to the line and search something like this :)

I hope this help some CentOs user in the world :)

Link to comment
Share on other sites

This is a reply for and old post, but i have the same error in my server... i found the solution

In some files, in my case src/shared/Database/DatabaseMysql.cpp, are codes like this "#ifdef MANGOS_DEBUG" and "#endif"

This is NOT COMPATIBLE with CentOs Linux... i think # y for comment, isnt ?? well is better to use //

In CentOs the # character for comments is not compatible (im not a c++ programmer)

Read the error, see what file and in what line is the error, go to the line and search something like this :)

I hope this help some CentOs user in the world :)

The # is not a comment character, it indicates it's a preprocessor directive.

This means during the initial compilation phase, the preprocessor checks in this case if MANGOS_DEBUG is set and if not it will ignore all code until the #endif

This is very common as it allows optional extra code to be compiled into a "debug" build versus a more streamlined production build, or Linux versus Windows code can be conditionally compiled in.

Link to comment
Share on other sites

  • 2 weeks later...

Problems with compiling on Mandriva Linux 2010.0 starts month ago.

Compiling go normal

make install in /var/lib/games/mangos3.3.0

everyting OK

but after starting mangos-realmd or wordd

they writing

Could not find configuration file /var/lib/games/mangos3.3.0/etc/realmd.conf

but configuration files are there

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
  • 1 month later...

mandriva 2009.0, gcc 4.3.2

errors:

../shared/libmangosshared.a(Threading.o): In function `ACE_Atomic_Op_GCC<long>::operator--()':
/usr/servers/mangos/compile/objdir/src/shared/../../../dep/ACE_wrappers/ace/Atomic_Op_GCC_T.inl:49: undefined reference to `__sync_sub_and_fetch_4'
/usr/servers/mangos/compile/objdir/src/shared/../../../dep/ACE_wrappers/ace/Atomic_Op_GCC_T.inl:49: undefined reference to `__sync_sub_and_fetch_4'
/usr/servers/mangos/compile/objdir/src/shared/../../../dep/ACE_wrappers/ace/Atomic_Op_GCC_T.inl:49: undefined reference to `__sync_sub_and_fetch_4'
/usr/servers/mangos/compile/objdir/src/shared/../../../dep/ACE_wrappers/ace/Atomic_Op_GCC_T.inl:49: undefined reference to `__sync_sub_and_fetch_4'
../../dep/ACE_wrappers/ace/.libs/libACE.so: undefined reference to `__sync_add_and_fetch_4'
../../dep/ACE_wrappers/ace/.libs/libACE.so: undefined reference to `__sync_fetch_and_sub_4'
collect2: ld returned 1 exit status

trying

../configure CFLAGS="-march=i686" ACE_CFLAGS="-march=i686"

but dont work

make simple test:

# cat test.c
int main()
{
   int i = 3;
   int j = __sync_add_and_fetch(&i, 1);
   return 0;
}

# gcc test.c
/tmp/cccOSsgM.o: In function `main':
test.c:(.text+0x27): undefined reference to `__sync_add_and_fetch_4'
collect2: выполнение ld завершилось с кодом возврата 1
#

# gcc -march=i686 test.c
#

as you see with -march=i686 should works. how get it in mangos configure?

Link to comment
Share on other sites

  • 2 weeks later...

ACE is written in C++, so don't forget CXXFLAGS.

ACE_CFLAGS only seems to have an effect when not using ACE that comes with mangos sources

That would be worth a try too btw, use ACE that comes with Fedora...will compile faster anyway.

Just configure with --enable-builtin-ace=no

Link to comment
Share on other sites

Tried to install ACE_wrappers but when in make i get this :

/root/ACE_wrappers/build/ace/.libs/libACE.so: undefined reference to `__sync_add_and_fetch_4'

/root/ACE_wrappers/build/ace/.libs/libACE.so: undefined reference to `__sync_fetch_and_sub_4'

/root/ACE_wrappers/build/ace/.libs/libACE.so: undefined reference to `__sync_sub_and_fetch_4'

collect2: ld returned 1 exit status

make[3]: *** [sAXPrint] Error 1

make[3]: Leaving directory `/root/ACE_wrappers/build/ACEXML/examples/SAXPrint'

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

make[2]: Leaving directory `/root/ACE_wrappers/build/ACEXML/examples'

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

make[1]: Leaving directory `/root/ACE_wrappers/build/ACEXML'

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

Looks familiar to me... same error as the mangos compile...

Link to comment
Share on other sites

i had this problem at openSuSe 11.1, gcc 4.3.2

try intsall local version gcc 4.5.1 and build ACE with him, but got another error

/home/emuwow/source/ACE_wrappers/build/ace/.libs/libACE.so: undefined reference to `std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)'
/home/emuwow/source/ACE_wrappers/build/ace/.libs/libACE.so: undefined reference to `std::basic_filebuf<char, std::char_traits<char> >::basic_filebuf()'
/home/emuwow/source/ACE_wrappers/build/ace/.libs/libACE.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >::operator<<(int)'
/home/emuwow/source/ACE_wrappers/build/ACEXML/common/.libs/libACEXML.so: undefined reference to `operator new(unsigned int)'
collect2: ld returned 1 exit status

may need to set some options when compiling gcc ?

Link to comment
Share on other sites

  • 4 weeks later...

Well, if you get a "file not found" error, you should check if the file exist and is allowed to use by your user. Maybe its because the actual SD2 patch name is "MaNGOS-10790-ScriptDev2.patch", not longer the 9519 one. You can use "git apply src/bindings/ScriptDev2/patches/MaNGOS-*" instead for avoiding problems with the changing file name.

Link to comment
Share on other sites

  • 2 weeks later...

I've been following this wonderful guide and i keep getting errored out here.

I'm using the latest revision from git as my source. Ubuntu 10.04 lts. Anyone else seening this error, searching the boards yeilded no results.

In file included from ../../../src/game/SkillDiscovery.cpp:26:
../../../src/game/SpellMgr.h:446: error: 'ShapeshiftForm' has not been declared
make[3]: *** [skillDiscovery.o] Error 1

Link to comment
Share on other sites

  • 4 weeks later...

I got an error when I compile the mongos with "make" command:

  CXX    CreatureEventAIMgr.o
 CXX    Creature.o
../../../src/game/Creature.cpp: In member function 'virtual void Creature::DeleteFromDB()':
../../../src/game/Creature.cpp:1377: error: no matching function for call to 'MapPersistentStateManager::DoForAllStatesWithMapId(uint32, CreatureRespawnDeleteWorker)'
../../../src/game/MapPersistentStateMgr.h:336: note: candidates are: void MapPersistentStateManager::DoForAllStatesWithMapId(uint32, Do&) [with Do = CreatureRespawnDeleteWorker]
make[4]: *** [Creature.o] Error 1
make[4]:Leaving directory `/home/lostab/mangos/objdir/src/game'
make[3]: *** [all-recursive] Error 1
make[3]:Leaving directory `/home/lostab/mangos/objdir/src/game'
make[2]: *** [all-recursive] Error 1
make[2]:Leaving directory `/home/lostab/mangos/objdir/src'
make[1]: *** [all-recursive] Error 1
make[1]:Leaving directory `/home/lostab/mangos/objdir'
make: *** [all] Error 2

Can anyone help me, please?

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