Compile or cmake problems

Edit By Aokromes:

If you can't compile check that you meet requirements:

https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130068/Requirements

If you get SSE2 error use:

-DCMAKE_C_FLAGS="-msse -msse2 -msse3"
-DCMAKE_CXX_FLAGS="-msse -msse2 -msse3"

If you get mysql libs error you miss MySQL development files
These files are shipped with MySQL Server but to make it easier we packed the libs and include files for both 32 bits and 64 bits.
Extract the files to a known location, e.g, C:/mysql_libs

https://github.com/TrinityCore/TrinityCore/releases/download/TDB335.55/mysql_lib.zip

If you get error [COLOR=rgb(51,51,51)]0xc000007b at start is that you are mixing 32 and 64 bits libraries.

if you get TCE00011 check https://community.trinitycore.org/topic/13962-trouble-with-your-trinity-install-starting-login-readme-1st-faqs/?tab=comments#comment-47668

Hi, the file where it builds this information from is automated through CMake, and is as such something that is my responsibility (at least sorting out issues with the buildsystem itself).

Please try this, and report back to us regarding this - I dont’t have a possibility to test XCode myself, so your help will be appreciated.

diff --git a/cmake/compiler/xcode/settings.cmake b/cmake/compiler/xcode/settings.cmake
index cd33fc1..ad3c58e 100644
--- a/cmake/compiler/xcode/settings.cmake
+++ b/cmake/compiler/xcode/settings.cmake
@@ -1,2 +1,2 @@
 # Set build-directive (used in core to tell which buildtype we used)
-add_definitions(-D_BUILD_DIRECTIVE="$(CONFIGURATION)")
+add_definitions(-D_BUILD_DIRECTIVE=\\"$(CONFIGURATION)\\")

[/CODE]

Thanks for your immediate responsibility !

But more specifically, how should I apply this ?

Either copy and save as a patch/diff (example : fix.diff ) , and then do

git apply nameofthepatchfile

or, simply open cmake/compiler/xcode/settings.cmake and adjust the file according to the above (it’s just one line anyway)

I CMade it and opened the project (CMake had no errors) but the XCode popped: “Project “<Directory_of_the_project>” cannot be opened because the project file cannot be parsed”…

I changed the “TrinityCore/cmake/compiler/xcode/settings.cmake”

from


# Set build-directive (used in core to tell which buildtype we used)

add_definitions(-D_BUILD_DIRECTIVE="$(CONFIGURATION)")

to


# Set build-directive (used in core to tell which buildtype we used)

add_definitions(-D_BUILD_DIRECTIVE=\\"$(CONFIGURATION)\\")

Was that right?

*EDIT:

And when I used git it said: “Fatal: corrupt patch at line 8”

That was right, and I’ve already pushed the changeset to the main repo - had someone else test it, and it worked there. Feel free to re-test.

Sorry, but it still says “Project “<Directory_of_the_project>” cannot be opened because the project file cannot be parsed”…

What am I doing wrong ?

I pull the newest source, Terminal cd-in and mkdir build

then I cd build, and cmake …/ -GXcode with/without the additional lines from the guide.

Still generates that error…

I just want to confirm for version 10840:d1040972f9c0. I’ll update my source and see if it’s fixed.

Try to replace

add_definitions(-D_BUILD_DIRECTIVE=\\"$(CONFIGURATION)\\")

with

add_definitions(-D_BUILD_DIRECTIVE=$(CONFIGURATION))

It goes back to the same thing, no errors until I build the solution from XCode…

Screenshot Here

I wander how the other guys get it to work, different XCode preference setting or something else ?

If you are able to, please drop by on IRC:

irc.rizon.net #trinity

or go to http://www.rizon.net/index.php?do=chat to use a web-based IRC-client.

And also, erase and recreate the build-dir, then try again with the previous setting.

Hello the Trinity Core community, this is my first post, please excuse my lack of knowledge on things that I might be regardless of.

I’m trying to compile latest ver [code.google.com/p/trinitycore/downloads/detail?name=Trinitycore%20b10866%20for%20335a.rar&can=2&q=] [build 10866] i done everything like is said in : http://www.trinitycore.info/w/How-to:Linux

And when i get to point:

cmake …/trinitycore/ -DPREFIX=/home/username/server -DWITH_SQL=1

make

make install

compilation crashes on [make]

[CODE]Scanning dependencies of target game

[ 11%] Building CXX object src/server/game/CMakeFiles/game.dir/Accounts/AccountMgr.cpp.o

c++: Internal error: Segmentation fault (program cc1plus)

Please submit a full bug report.

See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions.

make[2]: *** [src/server/game/CMakeFiles/game.dir/Accounts/AccountMgr.cpp.o] Error 1

make[1]: *** [src/server/game/CMakeFiles/game.dir/all] Error 2

make: *** [all] Error 2[/CODE]

Not so long ago i used same instructions on same machine with older build of core and there where no problems :confused:

Any idea what i done wrong?

ACE is installed systemwide

ale apt-get install commads gaved no errors so it is ok…

Hey, ive been using trinitycore before and i love it, except that i now dont know how to compile it, it always fails,

I use windows 7 ultimate x64

the programs are also Win64 and i have tried following all guides ive found but, it doesnt work!

I formated my PC, did it all over again, restarted, retried, doesnt work, been searching everywhere, can someone help me?


Check for working C compiler using: Visual Studio 10 Win64

Check for working C compiler using: Visual Studio 10 Win64 – broken

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):

The C compiler “cl” is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/AH/Desktop/Build/CMakeFiles/CMakeTmp

Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30 319\MSBuild.exe

cmTryCompileExec.vcxproj /p:Configuration=Debug

Microsoft ® Build Engine Version 4.0.30319.1

[Microsoft .NET Framework, Version 4.0.30319.1]

Copyright © Microsoft Corporation 2007. All rights reserved.

Build started 2010-12-21 20:45:18.

Project

“C:\Users\AH\Desktop\Build\CMakeFiles\CMakeTmp \cmT ryCompileExec.vcxproj”

on node 1 (default targets).

C:\Program Files

(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.Inv alidPlatform.Targets(23,7):

error MSB8007: The Platform for project ‘cmTryCompileExec.vcxproj’ is

invalid. Platform=‘x64’. You may be seeing this message because you are

trying to build a project without a solution file, and have specified a

non-default Platform that doesn’t exist for this project.

[C:\Users\AH\Desktop\Build\CMakeFiles\CMakeTmp\cmTr yCompileExec.vcxproj]

Done Building Project

“C:\Users\AH\Desktop\Build\CMakeFiles\CMakeTmp \cmT ryCompileExec.vcxproj”

(default targets) – FAILED.

Build FAILED.

“C:\Users\AH\Desktop\Build\CMakeFiles\CMakeTmp \cmT ryCompileExec.vcxproj”

(default target) (1) →

(InvalidPlatformError target) →

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.Inv alidPlatform.Targets(23,7): error MSB8007: The Platform for project ‘cmTryCompileExec.vcxproj’ is invalid. Platform=‘x64’. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Platform that doesn’t exist for this project. [C:\Users\AH\Desktop\Build\CMakeFiles\CMakeTmp\cmTr yCompileExec.vcxproj]

0 Warning(s)

1 Error(s)

Time Elapsed 00:00:00.94

CMake will not be able to correctly generate this project.

Call Stack (most recent call first):

CMakeLists.txt:12 (project)

Configuring incomplete, errors occurred!

Try using Visual Stuio 2008 instead of 2010 ?

It failed at cmake which tried to use a C compile then failed…

Try:

change the file in <your_trinitycore_directory/cmake/compiler/xcode/settings.cmake>

from whatever it was to


# Set build-directive (used in core to tell which buildtype we used)

add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"')

And LMAO did you copy the first line from my post ?

I changed

the file <your_trinitycore_directory/cmake/compiler/xcode/settings.cmake>

from whatever it was to


# Set build-directive (used in core to tell which buildtype we used)

add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"')

Then it went perfectly well until the XCode links…

11 errors came up and do not show me the lines:

Screenshot

That is a G3D-library issue, and known - there are a few hints out on the net on fixing that part.

Sorry for my stupid question but… what LMAO means?

Still same error after that modification

Maybe i have some old ver? as said in 1 post i downloaded it from google code.

I just tryed to compile older ver and still it brakes in same moment :confused: so it looks problem is not in core but in compiler :confused: any idea?

Ok… i updated all packets on server and rebuild ACE and server core is compiling but now i have problem:

virtual memory exhausted: Cannot allocate memory

make[2]: *** [src/server/game/CMakeFiles/game.dir/Entities/Player/Player.cpp.o] Error 1

make[1]: *** [src/server/game/CMakeFiles/game.dir/all] Error 2

make: *** [all] Error 2

i tryed to limmit virtual memory using:

ulimit

command, but nothing change… any idea?

alright, Im gonna try it with visual studio 2008, coming with results soon