Jump to content
TrinityCore

Compile or cmake problems


Joy
 Share

Recommended Posts

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

 

 

 

Link to comment
Share on other sites

  • Replies 2.9k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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]

Link to comment
Share on other sites

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)\\")

Thanks for your immediate responsibility !

But more specifically, how should I apply this ?

Link to comment
Share on other sites

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"

Edited by Joy
Link to comment
Share on other sites

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..

Link to comment
Share on other sites

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 [http://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]

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

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

Any idea what i done wrong?

ACE is installed systemwide

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

Edited by Luniak
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :/ so it looks problem is not in core but in compiler :/ any idea?

Edited by Luniak
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Hello,

If the area is wrong please move.

I had an error when compiling.

Here is the compile excerpt:

root@myserver:/home/trinitycore/build# make -j 4 && make install

Scanning dependencies of target jemalloc

Scanning dependencies of target g3dlib

Scanning dependencies of target gsoap

Scanning dependencies of target revision.h


-- WARNING - No revision-information found

[  0%] Built target revision.h

[  0%] Building CXX object dep/gsoap/CMakeFiles/gsoap.dir/soapC.cpp.o

Scanning dependencies of target shared_pch_dephelp

[  0%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/arena.c.o

[  0%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/AABox.cpp.o

[  1%] Building CXX object src/server/shared/CMakeFiles/shared_pch_dephelp.dir/shared_pch_dephelp.cxx.o

[  1%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Any.cpp.o

[  1%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/base.c.o

[  1%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/chunk.c.o

Linking CXX static library libshared_pch_dephelp.a

[  1%] Built target shared_pch_dephelp

[  1%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/BinaryFormat.cpp.o

[  1%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/chunk_dss.c.o

[  1%] Building CXX object dep/gsoap/CMakeFiles/gsoap.dir/soapServer.cpp.o

[  1%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/chunk_mmap.c.o

[  2%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/BinaryInput.cpp.o

[  2%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/chunk_swap.c.o

[  2%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/ckh.c.o

[  3%] Building CXX object dep/gsoap/CMakeFiles/gsoap.dir/stdsoap2.cpp.o

[  3%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/ctl.c.o

[  4%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/extent.c.o

[  4%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/hash.c.o

[  4%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/huge.c.o

/home/trinitycore/trinitycore/dep/jemalloc/src/huge.c: In function 'huge_ralloc':

/home/trinitycore/trinitycore/dep/jemalloc/src/huge.c:235: error: 'MREMAP_FIXED' undeclared (first use in this function)

/home/trinitycore/trinitycore/dep/jemalloc/src/huge.c:235: error: (Each undeclared identifier is reported only once

/home/trinitycore/trinitycore/dep/jemalloc/src/huge.c:235: error: for each function it appears in.)

/home/trinitycore/trinitycore/dep/jemalloc/src/huge.c:236: error: too many arguments to function 'mremap'

make[2]: *** [dep/jemalloc/CMakeFiles/jemalloc.dir/src/huge.c.o] Error 1

make[1]: *** [dep/jemalloc/CMakeFiles/jemalloc.dir/all] Error 2

make[1]: *** Waiting for unfinished jobs....

[  4%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/BinaryOutput.cpp.o

[  4%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Box.cpp.o

[  4%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Capsule.cpp.o

[  4%] [  4%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/CollisionDetection.cpp.o

Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/CoordinateFrame.cpp.o

[  4%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Crypto.cpp.o

[  4%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Cylinder.cpp.o

[  5%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/debugAssert.cpp.o

[  5%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/FileSystem.cpp.o

[  5%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/fileutils.cpp.o

[  5%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/format.cpp.o

[  5%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/g3dfnmatch.cpp.o

[  5%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/g3dmath.cpp.o

[  5%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Line.cpp.o

[  5%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/LineSegment.cpp.o

[  5%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Log.cpp.o

[  6%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Matrix3.cpp.o

[  6%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Matrix4.cpp.o

Linking CXX static library libgsoap.a

[  6%] Built target gsoap

[  6%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/MemoryManager.cpp.o

[  6%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/PhysicsFrame.cpp.o

[  6%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Plane.cpp.o

[  6%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/prompt.cpp.o

[  6%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Quat.cpp.o

[  6%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Random.cpp.o

[  7%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Ray.cpp.o

[  7%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/ReferenceCount.cpp.o

[  7%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/RegistryUtil.cpp.o

[  7%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Sphere.cpp.o

[  7%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/stringutils.cpp.o

[  7%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/System.cpp.o

[  7%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/TextInput.cpp.o

[  7%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/TextOutput.cpp.o

[  7%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Triangle.cpp.o

[  8%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/uint128.cpp.o

[  8%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/UprightFrame.cpp.o

[  8%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Vector2.cpp.o

[  8%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Vector3.cpp.o

[  8%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Vector4.cpp.o

Linking CXX static library libg3dlib.a

[  8%] Built target g3dlib

make: *** [all] Error 2

Please help me fast.

Greets,

BabylonHD

Link to comment
Share on other sites

  • Aokromes changed the title to Compile or cmake problems
  • Aokromes locked this topic
  • Carbenium unlocked this topic
  • Aokromes pinned and locked this topic
  • Aokromes featured and featured this topic
  • Aokromes pinned this topic
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...