Jump to content

New build system used by MaNGOS Master/One/Zero


Guest VladimirMangos

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

@Locario3: All you need to know and probably more http://getmangos.eu/wiki/Compile_MaNGOS_On_Linux

All glory to our Wiki!

Regards

Skirnir

Skimir, thanks for your response. I will try it in a virtual machine with Debian Lenny 5.08 32 bits.

If i have a problem, i will open a new post in the forum.

Thanks again.

PD: Skimir, how can i do this? :

Afterwards you need to download whatever database content (UDB, Trinity, etc.)

this install is for 3.3.2 client, if i have 3.3.5 ¿what changes are needed?

Thanks again Skimir.

Link to comment
Share on other sites

  • 1 month later...

actually i had no problems using cmake under windows without any adjustments. i was perfectly able to create files for VS. but i used the console and not the GUI.

but as long as we provide the VS files you don't have to use cmake under windows unless you want to use another GUI than VS.

i just looked at the line which is being reported on your screenshot and it doesn't give me this error because i'm using x64 and you're using x86. it tries to use ${WIN_DEBUGLIBS} which is never being set (at least neither in ./CMakeLists.txt nor in ./src/realmd/CMakeLists.txt)

Link to comment
Share on other sites

actually i had no problems using cmake under windows without any adjustments. i was perfectly able to create files for VS. but i used the console and not the GUI.

but as long as we provide the VS files you don't have to use cmake under windows unless you want to use another GUI than VS.

i just looked at the line which is being reported on your screenshot and it doesn't give me this error because i'm using x64 and you're using x86. it tries to use ${WIN_DEBUGLIBS} which is never being set (at least neither in ./CMakeLists.txt nor in ./src/realmd/CMakeLists.txt)

THX MAN

Link to comment
Share on other sites

help me i have error on scriptdev2

CMake Error at src/bindings/scriptdev2/CMakeLists.txt:62 (target_link_libraries):

The "debug" argument must be followed by a library.

if(WIN32)
 target_link_libraries(mangosscript
   mangosd # FIXME: could this be done for unix? because unix won't generate exe.libs
  ${ACE_LIBRARIES}
   debug ${WIN_DEBUGLIBS}
 )
endif()

Link to comment
Share on other sites

actually i had no problems using cmake under windows without any adjustments. i was perfectly able to create files for VS. but i used the console and not the GUI.

but as long as we provide the VS files you don't have to use cmake under windows unless you want to use another GUI than VS.

My reply just meaning

we know about existance some problems in cmake use at windows with mangos. It can affect your usage attempt or can not affect, or just not important. BUT please not report and not ask about this problem sollutions. Just use provided VS projects instead.

;)
Link to comment
Share on other sites

I'm sorry to be a pain but ever since the switch to cmake I can no longer successfully build. I've reviewed the Linux build Wiki's and search the forums and I can't find a solution.

I'm on CentOS 5.4 64bit. I've successfully, repeatedly built MaNGOS prior to the cmake switch.

This is a from-scratch build - no patches.

mkdir build

cd build

cmake -DPREFIX=/opt/mangos ..

make -j3

make install

With make install I get:

[wayne@wwwsrv build]$ make install

[ 7%] Built target genrev

[ 7%] Built target revision.h

[ 7%] Built target TBB_Project

[ 7%] Built target ACE_Project

[ 7%] Built target g3dlite

[ 7%] Built target gsoap

[ 7%] Building CXX object src/bindings/ScriptDev2/CMakeFiles/mangosscript.dir/system/system.cpp.o

In file included from /home/wayne/mangos/src/shared/Common.h:55,

from /home/wayne/mangos/src/bindings/ScriptDev2/include/../ScriptMgr.h:8,

from /home/wayne/mangos/src/bindings/ScriptDev2/include/precompiled.h:8,

from /home/wayne/mangos/src/bindings/ScriptDev2/system/system.cpp:5:

/home/wayne/mangos/src/framework/Platform/Define.h:24:29: error: ace/Basic_Types.h: No such file or directory

/home/wayne/mangos/src/framework/Platform/Define.h:25:35: error: ace/Default_Constants.h: No such file or directory

/home/wayne/mangos/src/framework/Platform/Define.h:26:29: error: ace/OS_NS_dlfcn.h: No such file or directory

/home/wayne/mangos/src/framework/Platform/Define.h:27:28: error: ace/ACE_export.h: No such file or directory

In file included from /home/wayne/mangos/src/shared/Common.h:88,

from /home/wayne/mangos/src/bindings/ScriptDev2/include/../ScriptMgr.h:8,

from /home/wayne/mangos/src/bindings/ScriptDev2/include/precompiled.h:8,

from /home/wayne/mangos/src/bindings/ScriptDev2/system/system.cpp:5:

/home/wayne/mangos/src/shared/LockedQueue.h:22:25: error: ace/Guard_T.h: No such file or directory

/home/wayne/mangos/src/shared/LockedQueue.h:23:30: error: ace/Thread_Mutex.h: No such file or directory

and it just goes on and on.

From my home directory "/home/wayne" I do a find for those files, like the ace/Basic_Types.h and it's under: ./mangos/dep/ACE_wrappers/ace/Basic_Types.h

Why is make install blowing up?

Any suggestions would be greatly appreciated

Xirad

Link to comment
Share on other sites

It does not find the included ACE version. If CentOS does have ACE rpms, you could try to install those with devel packages, and build against external ACE.

cmake ../ -DPREFIX=/opt/mangos -DDEBUG=0 -DPCH=0 -DTBB_USE_EXTERNAL=0 -DUSE_STD_MALLOC=0 -DACE_USE_EXTERNAL=1

Works fine for me on all MaNGOS branches.

Link to comment
Share on other sites

This time it worked!

I wiped my mangos dir and did a whole new svn of the source, etc.

This time though I used the sample cmake line you gave me except the ACE directive. I told it -DACE_USE_EXTERNAL=0

So maybe in some instances you need to explicitly tell it to use the internal ACE.

The cmake I'm using is 2.8.4 which I had to compile from source.

Curiously doing the builds this way doesn't move all the additional stuff into your target directory like the sql scripts, etc.

Thanks!

Wayne

Link to comment
Share on other sites

Curiously doing the builds this way doesn't move all the additional stuff into your target directory like the sql scripts, etc.

Installing data files has been disabled for the time being. If you look into the main directory's CMakeList you will see a few disabled functions.

There are a few which need a bit of research and love for proper work :)

Link to comment
Share on other sites

how do i specify the name of the compiler executable and compiler flags? (linux)

edit:

Found out the options for that: CMAKE_C_FLAGS, CMAKE_CXX_FLAGS, CMAKE_C_COMPILER, CMAKE_CXX_COMPILER

Also CMAKE_BUILD_TYPE sets extra flags, like "-DCMAKE_BUILD_TYPE=RelWithDebInfo" sets flags "-O2 -g"

Note that release mode sets "-O3", which is generally unsafe and can produce crashing binaries.

There are some other details, like cmake somewhats requires PREFIX directory to be writable, so if you run cmake as normal user and point to a global directory (like /usr/local or /opt) configuration will fail. Autoconf didn't have problems with this. This is what is normally done when you compile as regular user and install as root.

Another issue is that compile fails while running make with multiple jobs (make -j4), seems that attempts compiling things alongside configuring ACE library, which ends failing (dependency rules missing?). This leads to massive compiling time increase due to being forced to use 1 job at once.

Link to comment
Share on other sites

the question just came up, how to find your .exe/.dll files with visual studio after compiling. well, that's a bit tricky, but here's the solution for it:

You have to open up your VS solution. In there, you'll see a project called 'INSTALL'. you need to do a right click on that one and select 'compile'. it'll compile mangos and then install it to the predefined path.

that's the major drawback right now with cmake on windows. would be nice if someone could figure out how to include that target into the build sequence, so that it'd be enough to just do the normal compile.

Link to comment
Share on other sites

  • 2 weeks later...
i just looked at the line which is being reported on your screenshot and it doesn't give me this error because i'm using x64 and you're using x86. it tries to use ${WIN_DEBUGLIBS} which is never being set (at least neither in ./CMakeLists.txt nor in ./src/realmd/CMakeLists.txt)

Hehe. This problem is your fault :)

https://github.com/mangos/mangos/commit/d88b5eedb8ec9e7a1de2c3d4880489bf2894a5a0

Drop the lines " debug ${WIN_DEBUGLIBS}" in src/realmd/CMakeLists.txt and src/mangosd/CMakeLists.txt and the problem is fixed.

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