PDA

View Full Version : CMake


KLS
12-30-2012, 04:04 PM
In a some weeks (at least a month) we will be moving the project over to the CMake build system.

There's a few reasons for that but the difficulty of building and maintaining the project being a big one. It's been a bit of a hassle to update all the solution files and makefiles every time we add or change a file and frankly most people (myself included) haven't bothered to do it. This leads to things that don't compile out of the box even with dependencies installed. A good example was the recent RoF patch files that weren't initially added to some solution files.

Okay, that said I would recommend that if you want to continue developing after this waiting period is up that you start looking into getting CMake to work because the current makefiles wont be preserved and the current solution files wont be preserved. It's really not that hard even on the command line and there are preliminary instructions at the following:

http://www.eqemulator.net/wiki/wikka.php?wakka=CMake

sorvani
12-30-2012, 08:57 PM
Will we need to actually install Perl now on our build machine? I usually build on a different machine than the server is running on. The linked libraries as they are in the current solution make it really easy to switch between building 32 or 64 bit from the same machine.

KLS
12-30-2012, 10:13 PM
No but you will need to use advanced options to manually set libs and directories.

Noport
12-30-2012, 11:08 PM
i'm getting an error on the the secound url link folder and files not found

Vexyl
12-30-2012, 11:23 PM
Compiled flawlessy for me on Linux, thanks.


[user@host EQEmuServer]$ time make -j4
...
real 1m17.113s
user 4m29.649s
sys 0m14.159s



Linux HOST 3.6.10-1-ARCH ... x86_64 GNU/Linux
cmake version 2.8.10.2
GNU Make 3.82
g++ (GCC) 4.7.2

Noport
12-30-2012, 11:50 PM
Compiled flawlessy for me on Win7 x86 on a 64 bit system

KLS
01-14-2013, 02:39 AM
Probably going to bump up when I reintegrate this to "soon" provided there are no problems. Also added azone + cleanipc as optional compiles. Though cleanipc's time is limited as we're going to change how shared memory works on EQEmu shortly too.

Also wrote a C Library for loginserver encryption which should be easier to distribute on ELF systems (and windows I guess). During the CMake branch it became readily apparent that we needed a better system to handle this. This wont be going in for a while though as I want to get a bcrypt password hashing backend also setup.

wolfwalkereci
01-14-2013, 09:54 AM
Win 7 64bit build VS2010 express release x64 - Only error failed to build zone.exe
Need to figure out how to suppress the warnings that I do not care about.
Looks like this system will be a good step forward for everyone involved.

KLS
01-19-2013, 04:10 AM
Just a note: this went live today and we noticed due to a trick in the opcode management code combined with the fact that we now compile all that into a static lib: UCS broke. I hope it will be fixed soon but if it takes too long I may have to sleep before it is fixed.

KLS
01-19-2013, 04:50 AM
Actually I have to touch more of the common code than I thought so this will take a while. If UCS is absolutely vital to you for whatever reason I suggest you avoid upgrading for now.

prickle
01-21-2013, 01:35 PM
I gotta give kudos to you guys for setting up the CMake configs. It's made building on Linux systems that need custom flags 1000x easier. I'd go as far as to say that it's even better than the old "./configure && make clean && make" way of building source.

Disorder
01-21-2013, 01:59 PM
Hey guys,

New at this, sorry for the troubles. I'm getting an error using Cmake right at the start of the compile. I downloaded cmake, and I downloaded the source via command prompt. It put the EQEmuCmake folder in my user files. Are these supposed to go in the trunk folder as well? I tried that, same error.

Thanks in advance.

I get the following Error:

The C compiler identification is MSVC 16.0.30319.1
The CXX compiler identification is MSVC 16.0.30319.1
Check for working C compiler using: Visual Studio 10
Check for working C compiler using: Visual Studio 10 -- broken
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files/Microsoft Visual Studio
10.0/VC/bin/cl.exe" is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/source/trunk/EQEmuServer/build/CMakeFiles/CMakeTmp



Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30 319\MSBuild.exe
cmTryCompileExec15988979.vcxproj /p:Configuration=Debug
/p:VisualStudioVersion=10.0

Microsoft (R) Build Engine version 4.0.30319.17929

[Microsoft .NET Framework, version 4.0.30319.17929]

Copyright (C) Microsoft Corporation. All rights reserved.



Build started 1/21/2013 11:50:36 AM.

Project
"C:\source\trunk\EQEmuServer\build\CMakeFiles\CMake Tmp\cmTryCompileExec15988979.vcxproj"
on node 1 (default targets).

PrepareForBuild:

Creating directory "cmTryCompileExec15988979.dir\Debug\".
Creating directory "C:\source\trunk\EQEmuServer\build\CMakeFiles\CMake Tmp\Debug\".

InitializeBuildStatus:

Creating "cmTryCompileExec15988979.dir\Debug\cmTryCompileExe c15988979.unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec15988979.dir\Debug\\" /Fd"C:/source/trunk/EQEmuServer/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec15988979.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c /Zm1000
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec15988979.dir\Debug\\" /Fd"C:/source/trunk/EQEmuServer/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec15988979.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c /Zm1000

testCCompiler.c

ManifestResourceCompile:

C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec15988979.dir\Debug\cmTryCompileExe c15988979.exe.embed.manifest.res" cmTryCompileExec15988979.dir\Debug\cmTryCompileExe c15988979_manifest.rc

Link:

C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\source\trunk\EQEmuServer\build\CMakeFiles\CMake Tmp\Debug\cmTryCompileExec15988979.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTryCompileExec15988979.dir\Debug\cmTryCompileExe c15988979.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:/source/trunk/EQEmuServer/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec15988979.pdb" /SUBSYSTEM:CONSOLE /STACK:"10000000" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/source/trunk/EQEmuServer/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec15988979.lib" /MACHINE:X86 cmTryCompileExec15988979.dir\Debug\cmTryCompileExe c15988979.exe.embed.manifest.res
cmTryCompileExec15988979.dir\Debug\testCCompiler.o bj /machine:X86 /debug

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid
or corrupt
[C:\source\trunk\EQEmuServer\build\CMakeFiles\CMake Tmp\cmTryCompileExec15988979.vcxproj]


Done Building Project
"C:\source\trunk\EQEmuServer\build\CMakeFiles\CMake Tmp\cmTryCompileExec15988979.vcxproj"
(default targets) -- FAILED.



Build FAILED.




"C:\source\trunk\EQEmuServer\build\CMakeFiles\CMake Tmp\cmTryCompileExec15988979.vcxproj"
(default target) (1) ->

(Link target) ->

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:\source\trunk\EQEmuServer\build\CMakeFiles\CMake Tmp\cmTryCompileExec15988979.vcxproj]



0 Warning(s)
1 Error(s)



Time Elapsed 00:00:00.40





CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (PROJECT)


Configuring incomplete, errors occurred!

Thanks,
Disorder

c0ncrete
01-21-2013, 02:06 PM
from the looks of things, CMake isn't able to find or use the installation of Visual Studio you specified.

Disorder
01-21-2013, 02:12 PM
That is odd. I installed Microsoft Visual C++ 2010 Express.

Any idea why Cmake would not find it?


Thanks,
Disorder

c0ncrete
01-21-2013, 02:20 PM
what version of windows? 32 bit or 64 bit?

Disorder
01-21-2013, 02:33 PM
Windows 7, 32 bit

lerxst2112
01-21-2013, 04:24 PM
Make sure you have installed the service pack for Visual Studio. Windows Update should show it, but if not: http://www.microsoft.com/en-us/download/details.aspx?id=23691

Disorder
01-21-2013, 04:47 PM
Thanks! This got me one step closer. I think it finished just fine then a box came up with settings I could change. I'll keep plugging away.

Disorder

KLS
01-21-2013, 05:52 PM
Doh there's a page two!

Once you get to the settings box as long as there was no error you can hit generate to create your EQEmu.sln file in your build folder.