Jump to content
TrinityCore

Compile or cmake problems


Joy
 Share

Recommended Posts

  • Replies 2.9k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

using PCH results in:

[ 11%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Vector3.cpp.o
[ 11%] Building CXX object dep/g3dlite/CMakeFiles/g3dlib.dir/source/Vector4.cpp.o
Linking CXX static library libg3dlib.a
[ 11%] Built target g3dlib
make: *** [all] Error 2

without PCH results in (at -j4):

[ 25%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/Commands/cs_server.cpp.o
/usr/local/src/.git/TrinityCore/src/server/scripts/Commands/cs_server.cpp: In static member function 'static bool server_commandscript::HandleServerInfoCommand(ChatHandler*, const char*)':
/usr/local/src/.git/TrinityCore/src/server/scripts/Commands/cs_server.cpp:118:33: error: expected ')' before '_BUILD_DIRECTIVE'
make[2]: *** [src/server/scripts/CMakeFiles/scripts.dir/Commands/cs_server.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 25%] Building CXX object src/server/game/CMakeFiles/game.dir/DungeonFinding/LFGQueue.cpp.o
make[1]: *** [src/server/scripts/CMakeFiles/scripts.dir/all] Error 2
...
[ 30%] Building CXX object src/server/game/CMakeFiles/game.dir/Handlers/VoiceChatHandler.cpp.o
/usr/local/src/.git/TrinityCore/src/server/game/Handlers/CharacterHandler.cpp: In member function 'void WorldSession::HandlePlayerLogin(LoginQueryHolder*)':
/usr/local/src/.git/TrinityCore/src/server/game/Handlers/CharacterHandler.cpp:851:33: error: expected ')' before '_BUILD_DIRECTIVE'
make[2]: *** [src/server/game/CMakeFiles/game.dir/Handlers/CharacterHandler.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/server/game/CMakeFiles/game.dir/all] Error 2
make: *** [all] Error 2

gentoo: gcc-4.6.3, openssl-1.0.1c. ACE-6.0.3 installed systemwide as per How-to:Linux guide.

I've tried using previous versions of  cmake/compiler/gcc/settings.cmake for this line

add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')

but I still get the BUILD_DIRECTIVE error.

 

cmake command and output:

# cmake /usr/local/src/.git/TrinityCore/ -DPREFIX=/usr/local/games/trinity -DCONF_DIR=/usr/local/etc/trinity -DLIBSDIR=/usr/local/lib64/trinity -DTOOLS=1 -DUSE_SCRIPTPCH=0 -DUSE_COREPCH=0 -DWITH_WARNINGS=1
-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detected 64-bit platform
-- UNIX: Using jemalloc
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- Found ACE library: /usr/local/lib64/libACE.so
-- Found ACE headers: /usr/local/include
-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so  
-- Using mysql-config: /usr/bin/mysql_config
-- Found MySQL library: /usr/lib64/mysql/libmysqlclient_r.so
-- Found MySQL headers: /usr/include/mysql
-- Found Readline library: /usr/lib64/libreadline.so
-- Include dir is: /usr/include
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7") 
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6") 
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so - found

* TrinityCore rev. hash  : cdf105f548b0+
* TrinityCore rev. date  : 2013-01-03 22:53:44 +0100
* TrinityCore buildtype  : Release

* Install core to        : /usr/local/games/trinity
* Install libraries to   : /usr/local/lib64/trinity
* Install configs to     : /usr/local/etc/trinity

* Build world/auth       : Yes (default)
* Build with scripts     : Yes (default)
* Build map/vmap tools   : Yes
* Build core w/PCH       : No
* Build scripts w/PCH    : No
* Show all warnings      : Yes
* Use coreside debug     : No  (default)

-- SCRIPT PREPARATIONS
  -> Prepared: Spells
  -> Prepared: Commands
  -> Prepared: Examples
  -> Prepared: Custom
  -> Prepared: World
  -> Prepared: Outdoor PVP Zones
  -> Prepared: Eastern Kingdoms
  -> Prepared: Kalimdor
  -> Prepared: Outland
  -> Prepared: Northrend
  -> Prepared: Events
-- SCRIPT PREPARATION COMPLETE

-- Configuring done
-- Generating done
-- Build files have been written to: /var/tmp/gtmp/trinity

 

Link to comment
Share on other sites

Hello,

 

I run CMake and the first time i "generate" the build files, it has loads of errors, but the second time it has only one:

 


 

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (message):
no suitable type found
Call Stack (most recent call first):
dep/mysqllite/configure.cmake:522 (TEST_BIG_ENDIAN)
dep/mysqllite/CMakeLists.txt:48 (include)

 

Also at the start of the cmake log there's:

 

The C compiler identification is unknown
The CXX compiler identification is unknown

 

Although I've selected VS 2010, and I have VS 2010 Ultimate on my machine.

 

Here's the full log:

 

 

 

 

The C compiler identification is unknown 

The CXX compiler identification is unknown 

Detected 32-bit platform 

Using supplied MySQL sources  

MSVC: Enabled large address awareness  

MSVC: Enabled SSE2 support  

MSVC: Overloaded standard names 

MSVC: Disabled NON-SECURE warnings  

MSVC: Disabled POSIX warnings
WARNING - Missing or outdated git - did you forget to install a recent version?
WARNING - Observe that for revision hash/date to work you need at least version 1.7
WARNING - Missing repository tags - you may need to pull tags with git fetch -t
WARNING - Continuing anyway - note that the versionstring will be set to 0000-00-00 00:00:00 (Archived)
 
* TrinityCore rev. hash : Archived
* TrinityCore rev. date : 0000-00-00 00:00:00 +0000
 
* Install core to : C:/Program Files (x86)/TrinityCore
 
* Build world/auth : Yes (default)
* Build with scripts : Yes (default)
* Build map/vmap tools : No (default)
* Build core w/PCH : Yes (default)
* Build scripts w/PCH : Yes (default)
* Show compile-warnings : No (default)
* Use coreside debug : No (default)
* Use MySQL sourcetree : Yes (default)
 
-- MySQL 5.5.9
Check if the system is big endian
Searching 16 bit integer
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/TestBigEndian.cmake:44 (message):
no suitable type found
Call Stack (most recent call first):
dep/mysqllite/configure.cmake:522 (TEST_BIG_ENDIAN)
dep/mysqllite/CMakeLists.txt:48 (include)
 
 
Configuring incomplete, errors occurred!

 


[spoiler]


Could anyone please help me?

 

EDIT: The bbcode is glitching out for me o.O. Sorry for the bad formatting.

 

Also it says that I'm on a 32bit platform, when in reality I'm on a 64bit one.

Edited by cmatija
Link to comment
Share on other sites

Solved the problem (Yaaay! :))

 

If anyone's interested in how I did it:

 

CMake didn't recognize my VS 2010 compiler path (o.O). So I specified it manually, in my case it was: "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/vcvarsall.bat". The same error still persisted but "The X compiler identification is unknown" error has been solved. I unchecked the use MySql Sources and it went through.

Link to comment
Share on other sites

I made the visual studio project files with cmake, but when I start to compile them i get an error: "Please define WIN32 in your project settings." in multiple files. How can I "define win32" in the project files?



Again, I've fixed a problem on my own, sorry for the inconvenience of posting useless threads.

 

The solution was to add the "-DWIN32" to the command line additional properties of every project that had that error.

Link to comment
Share on other sites

So it's about Cmake. When I want to compile my source in Cmake i have this error:
 

 

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

The C compiler "C:/Program Files (x86)/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: D:/Trinity Core v2/Core/Build/CMakeFiles/CMakeTmp

 

 

 

Run Build Command:C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe

cmTryCompileExec1555289586.vcxproj /p:Configuration=Debug

/p:VisualStudioVersion=10.0

 

Microsoft ® Build Engine version 4.0.30319.17929

 

[Microsoft .NET Framework, version 4.0.30319.17929]

 

Copyright © Microsoft Corporation. All rights reserved.

 

 

 

Build started 1/13/2013 11:52:58 PM.

 

Project "D:Trinity Core

v2CoreBuildCMakeFilesCMakeTmpcmTryCompileExec1555289586.vcxproj" on

node 1 (default targets).

 

PrepareForBuild:

 

Creating directory "cmTryCompileExec1555289586.dirDebug".

Creating directory "D:Trinity Core v2CoreBuildCMakeFilesCMakeTmpDebug".

 

InitializeBuildStatus:

 

Creating "cmTryCompileExec1555289586.dirDebugcmTryCompileExec1555289586.unsuccessfulbuild" because "AlwaysCreate" was specified.

 

ClCompile:

 

C:Program Files (x86)Microsoft Visual Studio 10.0VCbinCL.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"cmTryCompileExec1555289586.dirDebug" /Fd"D:/Trinity Core v2/Core/Build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1555289586.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c /Zm1000

Microsoft ® 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86

Copyright © 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"cmTryCompileExec1555289586.dirDebug" /Fd"D:/Trinity Core v2/Core/Build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1555289586.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c /Zm1000

 

testCCompiler.c

 

ManifestResourceCompile:

 

C:Program Files (x86)Microsoft SDKsWindowsv7.0Abinrc.exe /nologo /fo"cmTryCompileExec1555289586.dirDebugcmTryCompileExec1555289586.exe.embed.manifest.res" cmTryCompileExec1555289586.dirDebugcmTryCompileExec1555289586_manifest.rc

 

Link:

 

C:Program Files (x86)Microsoft Visual Studio 10.0VCbinlink.exe /ERRORREPORT:QUEUE /OUT:"D:Trinity Core v2CoreBuildCMakeFilesCMakeTmpDebugcmTryCompileExec1555289586.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:"cmTryCompileExec1555289586.dirDebugcmTryCompileExec1555289586.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:/Trinity Core v2/Core/Build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1555289586.pdb" /SUBSYSTEM:CONSOLE /STACK:"10000000" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/Trinity Core v2/Core/Build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1555289586.lib" /MACHINE:X86 cmTryCompileExec1555289586.dirDebugcmTryCompileExec1555289586.exe.embed.manifest.res

cmTryCompileExec1555289586.dirDebugtestCCompiler.obj /machine:X86 /debug

 

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid

or corrupt [D:Trinity Core

v2CoreBuildCMakeFilesCMakeTmpcmTryCompileExec1555289586.vcxproj]

 

Done Building Project "D:Trinity Core

v2CoreBuildCMakeFilesCMakeTmpcmTryCompileExec1555289586.vcxproj"

(default targets) -- FAILED.

 

 

 

Build FAILED.

 

 

 

"D:Trinity Core

v2CoreBuildCMakeFilesCMakeTmpcmTryCompileExec1555289586.vcxproj"

(default target) (1) ->

 

(Link target) ->

 

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [D:Trinity Core v2CoreBuildCMakeFilesCMakeTmpcmTryCompileExec1555289586.vcxproj]

 

 

 

0 Warning(s)

1 Error(s)

 

 

 

Time Elapsed 00:00:00.21

 

 

 

 

 

CMake will not be able to correctly generate this project.

Call Stack (most recent call first):

CMakeLists.txt:12 (project)

 

 

Configuring incomplete, errors occurred!

 

What can I do to fix it?

Link to comment
Share on other sites

  • 2 weeks later...

-- Detected 32-bit platform
-- UNIX: Using jemalloc
-- UNIX: Using default configuration directory
-- UNIX: Using default library directory
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- GCC: SFMT enabled, SSE2 flags forced
-- GCC: All warnings enabled
-- Found ACE library: /usr/local/lib/libACE.so
-- Found ACE headers: /usr/local/include
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
  Could NOT find OpenSSL (missing: OPENSSL_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
  cmake/macros/FindOpenSSL.cmake:175 (find_package_handle_standard_args)
  CMakeLists.txt:49 (find_package)

 

Can't find my OpenSSL libraries when building trinitycore (but it finds the includes :( ). Here's the command I input - 

 

cmake ../TrinityCore/ -DOPENSSL_LIBRARIES=/usr/lib64 -DOPENSSL_INCLUDE_DIR=/usr/include/openssl -DTOOLS=1 -DPREFIX=/home/lulz/server -DWITH_WARNINGS=1

 

I take it there must be some kind of syntax error here, because it's not looking in the location I tell it to. And I'm pretty sure those are the correct locations.

 

pics of the locations I was defining:  

http://puu.sh/1ReR5

http://puu.sh/1RePr

 

I'm on CentOS 6.3 runnin' cPanel

   (Correct righ?)

 

OpenSSL version:

http://puu.sh/1Rf66

 

 

So anyway, how do I make CMake look in lib64 for my OpenSSL files :(! (Proofs of library location below v)

 

root@srv001 [~]# pkg-config --libs openssl
-Wl,-z,relro -L/usr/lib6464 -lssl -lcrypto -ldl -lz
root@srv001 [~]#

EDIT: Just tried installing this (http://www.openssl.org/source/openssl-1.0.0j.tar.gz) system-wide, and after installation, it still couldn't find the libraries. It has no issue with the includes though. Sigh.

 

 

 

Thanks,

Charlie

Edited by Sovereign
Link to comment
Share on other sites

It should work... but did you try running cmake without the openssl switches at all? (The wiki says "do not use if you have OpenSSL installed systemwide")

 

 

Another thing, "-- Detected 32-bit platform" but you got x64 version of OpenSSL

  • Upvote 1
Link to comment
Share on other sites

That was the first thing I tried, then I thought the error stemmed from not telling it the correct location, so then I did that. But it just ignores it.

 

And I do have CentOS 64bit as shown here: 
 
root@srv001 [~]# uname -ar
Linux 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
root@srv001 [~]#

 

I have scoured the internet far and wide to try and solve this issue, so far I have found nothing that will work. Anymore insight from anyone would be fantastic; I will keep trying in the meantime.

 

EDIT: I believe my issue must be related to this - http://www.trinitycore.org/f/topic/4718-cmake-openssl-errror/ - However, since I'm on Linux... sigh FYI: I have cmake 2.8.8-4 x64, and all it's dependencies are the x64 version.

 

I could install 32bit version of OpenSSL, but I don't really want to fuck it up any further by mixing 32bit and 64bit.

 

EDIT I (*$("!"% FIXED IT WITHOUT THE INTERNETS HELP - SOLUTION TO ALL OTHERS THAT MAY FIND THIS THREAD - 

 

1. Delete build directory

2. Input command

3. Win

 

(Problem was with CMake cache... somewhere along the way I installed shit that fixed my issue, then deleting the cache and redoing it fixed it)

 

Suggest trying:

Installing OpenSSL systemwide

Checking CMake version

Ensure all developer libraries have been installed (yum grouplist | grep Devel  - to find all dem groups )

???

Staying calm

Edited by Sovereign
Link to comment
Share on other sites

Hey

 

Today I have been trying to get the 4.3.4 branch of Trinity compiled and working but have come up with an issue I can't solve myself.

 

Followed the Wiki windows guide on how to win

 

I have:

Windows 7 SP1

 

Git V2.43 [.Net 4] - With Mysysgit and kdiff

 

 

Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: VC Express
Microsoft Visual C++ 2008   91909-152-0000052-60701
 
MySQL V 5.5.20 (Wamp)
 
CMake 2.8.10.2
 
 
Now the problem is that the authserver just crashes with this:
Problem signature:
  Problem Event Name: APPCRASH
  Application Name: authserver.exe
  Application Version: 0.0.0.0
  Application Timestamp: 5100fee9
  Fault Module Name: ntdll.dll
  Fault Module Version: 6.1.7601.17725
  Fault Module Timestamp: 4ec49b8f
  Exception Code: c0000005
  Exception Offset: 00038dc9
  OS Version: 6.1.7601.2.1.0.256.1
  Locale ID: 3081
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
 
 
And the Worldserver crashes with this:
worldserver.exe - System Error
 
The program can't start because MSVCP90.dll is missing from your computer. Try reinstalling the program to fix this problem.
 
Now yes, I don't have this dll so i searched google and 
this popped up, and I found this post
 

Have you searched your hard disk for the file? You may find it in a directory such as:

C:Program FilesMicrosoft Visual Studio 9.0VCredistx86Microsoft.VC90.CRT

If it's there, copy it to your windowssystem32 directory.

Also copy msvcm90.dll and msvcr90.dll while you're at it.

 

So i did that and still even though its in my system 32 folder they can't be found!...

 

They also said that you should download and install Microsoft Visual C++ 2008 Redistributable Package.

 
But even this doesn't fix it...
 
I am really stuck any help is appreciated 
 
Edited by Tamezz
Link to comment
Share on other sites

The program can't start because MSVCP90.dll is missing from your computer. Try reinstalling the program to fix this problem.

Yes i know this, but i did what it said and installed the redist and i copied the neccessary files to the system32 folder and it still says that, i said this in the OP

 

wtf.jpg

 

wtf2.jpg

Edited by Tamezz
Link to comment
Share on other sites

after comit Core/DBLayer: Drop support for MySQL versions <5.1 my worldserver not starting

 

instaled on custom folder

 

ACE 5.7.8

openssl-0.9.8o

 

 

cmake used before

 

cmake ../TrinityCore/ -DPREFIX=/opt/trinity/compi_035 -DACE_LIBRARY=/opt/trinity/.sys/lib/libACE.so -DACE_INCLUDE_DIR=/opt/trinity/.sys/include/ -DSSLLIB=/opt/trinity/.sys/lib/libssl.so -DMYSQL_LIBRARIES_crypto=/opt/trinity/.sys/lib/libcrypto.so -DWITH_COREDEBUG=0

 

compile ok and starting 100% but after this comit on top my worldserver not starting
 

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