[HowTo] Compile TrinityCore on Mac OS X using Homebrew

Got problems with zlib under 10.11

Finally i get TrinityCore 3.3.5 compiled under 10.11 but now i have this issue and world server didn’t start at all. Any ides?

Using configuration file /Applications/TrinityCore/etc/worldserver.conf.

Using SSL version: OpenSSL 1.0.2d 9 Jul 2015 (library: OpenSSL 1.0.2d 9 Jul 2015)

Using Boost version: 1.59.0

Updating Auth database…

Auth database is up-to-date! Containing 1 new and 7 archived updates.

Updating Character database…

Character database is up-to-date! Containing 0 new and 4 archived updates.

Updating World database…

World database is up-to-date! Containing 102 new and 639 archived updates.

In mysql_stmt_prepare() id: 63, sql: “SELECT spell, item, time, categoryId, categoryEnd FROM character_spell_cooldown WHERE guid = ? AND time > UNIX_TIMESTAMP()”

Unknown column ‘categoryId’ in ‘field list’

In mysql_stmt_prepare() id: 81, sql: “INSERT INTO auctionhouse (id, houseid, itemguid, itemowner, buyoutprice, time, buyguid, lastbid, startbid, deposit) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)”

Unknown column ‘houseid’ in ‘field list’

In mysql_stmt_prepare() id: 232, sql: “REPLACE INTO gm_ticket (id, type, playerGuid, name, description, createTime, mapId, posX, posY, posZ, lastModifiedTime, closedBy, assignedTo, comment, response, completed, escalated, viewed, needMoreHelp, resolvedBy) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)”

Unknown column ‘type’ in ‘field list’

In mysql_stmt_prepare() id: 236, sql: “UPDATE gm_ticket SET type = 2 WHERE playerGuid = ?”

Unknown column ‘type’ in ‘field list’

In mysql_stmt_prepare() id: 367, sql: “INSERT INTO character_spell_cooldown (guid, spell, item, time, categoryId, categoryEnd) VALUES (?, ?, ?, ?, ?, ?)”

Unknown column ‘categoryId’ in ‘field list’

In mysql_stmt_prepare() id: 426, sql: “INSERT INTO pet_spell_cooldown (guid, spell, time, categoryId, categoryEnd) VALUES (?, ?, ?, ?, ?)”

Unknown column ‘categoryId’ in ‘field list’

In mysql_stmt_prepare() id: 461, sql: “INSERT INTO pvpstats_players (battleground_id, character_guid, winner, score_killing_blows, score_deaths, score_honorable_kills, score_bonus_honor, score_damage_done, score_healing_done, attr_1, attr_2, attr_3, attr_4, attr_5) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)”

Unknown column ‘winner’ in ‘field list’

In mysql_stmt_prepare() id: 467, sql: “INSERT INTO battleground_deserters (guid, type, datetime) VALUES (?, ?, NOW())”

Table ‘characters.battleground_deserters’ doesn’t exist

Could not prepare statements of the Character database, see log for details.

Assertion failed: (ec == 0), function unlock, file /BuildRoot/LiAssertion failed: (ec == 0), funbrary/Caches/com.apple.xbs/Sourcction unlock, file /BuildRoot/Lies/libcxx/libcxx-120.1/src/mutexbrary/Caches/com.apple.xbs/Sourc.cpp, line 45.

es/libcxx/libcxx-120.1/src/mutex.cpp, line 45.

Abort trap: 6

@ikir

You have to update your database

Solved updating DB, BREW and all the tools

I have read the answer of Shin to this post, but I don' really understand it. You said:

xcodebuild -target install -config Release

So it is not possible to just build 3.3.5? Which one is built if I use this 'general' command?

I had a problem building it the first time, because mysql was in another path. I used -DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.20.dylib \ and the build succeeded. Was it the correct file? I mean it obviously succeeded, but there was another mysql file in the folder ‘libmysqlclient.dylib’ which might have been also ok; I just picked the 20 first and wanted to try the other if it fails again…

just switch to 3.3.5 branch:

git checkout 3.3.5

and build using:

xcodebuild -target install -config Release

I dont understand where you are saying to input the

git checkout 3.3.5

@vemigod

from the directory of your TrinityCore sources.

Example:

git clone https://github.com/TrinityCore/TrinityCore.git

cd TrinityCore

now if you want to compile 3.3.5, just type:

git checkout 3.3.5

Or simply:

git clone -b 3.3.5 https://github.com/TrinityCore/TrinityCore.git

thanks for the explanation i appreciate it, both of you

@Shin

I think it is

xcode-select --install

I’m really just trying this for the hell of it and without any experience or knowledge, so this is probably a very stupid error.

It fails on the cmake step and I’m left with this the .log file:

[FONT=‘courier new’]The C compiler identification could not be found in “/Volumes/Ext Storage/Trinity/TrinityCore/build/CMakeFiles/3.4.3/CompilerIdC/._CompilerIdC.build”[/FONT]

[FONT=‘courier new’]The CXX compiler identification could not be found in “/Volumes/Ext Storage/Trinity/TrinityCore/build/CMakeFiles/3.4.3/CompilerIdCXX/._CompilerIdCXX.build”[/FONT]

Edit: Derp, turns out doing ‘brew install’ and then all of the dependencies in one row only installed the last one. After installing each one individually, it now works. Sorry about that ^^

OK it is time to update MMAPS, but i can’t remember the correct way to extract maps, update MMAPS and VMAPS. Any hint?

can any one help me with this I’m getting

ild/src/server/authserver/Release/authserver

clang: error: no such file or directory: ‘/usr/local/mysql/lib/libmysqlclient_r.dylib’

** BUILD FAILED **

The following build commands failed:

[B]Ld[/B] build/src/server/authserver/Release/authserver normal x86_64

(1 failure)

you need to set the following cmake param:

-DMYSQL_LIBRARY=/usr/local/mysql/lib/libmysqlclient_r.dylib \

with the correct path of your [COLOR= rgb(39, 42, 52)][B]libmysqlclient_r.dylib[/B] which evidently is not located under [B]/usr/local/mysql/lib/[/B] in your machine.

It work but i can’t build binaries :

clang: error: no such file or directory: ‘/usr/local/opt/zeromq/lib/libzmq.dylib’

** BUILD FAILED **

but libzmq.dylib( i add it in this directory because zeromq don’t make file in opt but it still doesn’t work) is in this directory, can any one help me ?

[EDIT] It’s not a permission problem, i’ve tried with sudo

SOLVED, i have change that :

-DZMQ_LIBRARY=/usr/local/opt/zeromq/lib/libzmq.dylib
-DZMQ_INCLUDE_DIR=/usr/local/opt/zeromq/include \

To :

-DZMQ_LIBRARY=/usr/local/Cellar/zeromq/4.1.4/lib/libzmq.dylib
-DZMQ_INCLUDE_DIR=/usr/local/Cellar/zeromq/4.1.4/include \

I got this error when i try to run worlserver

DBUpdater: Given source directory /Users/ikirserver/Downloads/TrinityCore does not exist, skipped!

But it should not search there for sql updates since in worldconfig i have this:

#
# Updates.SourcePath
# Description: The path to your TrinityCore source directory.
# If the path is left empty, built-in CMAKE_SOURCE_DIR is used.
# Example: “…/TrinityCore”
# Default: “”

Updates.SourcePath = “/Applications/TrinityCore”

Any idea? Also have anyone tried to update to 6.x? How can we keep all the date when updating to 6.x version?

Hi, I could not find [COLOR=rgb(39,42,52)]libmysqlclient_r.dylib in my mac.

lang: error: no such file or directory: ‘/usr/local/mysql/lib/libmysqlclient_r.dylib’

** BUILD FAILED **

The following build commands failed:

Ld build/src/server/authserver/Release/authserver normal x86_64

(1 failure)

And I searched my computer, no that file.

Please help me with it!

libmysqlclient_r.dylib is old and not longer used. To compile without problems, create symlinks to the libmysqlclient:

sudo ln -s /usr/local/mysql/lib/libmysqlclient.a /usr/local/mysql/lib/libmysqlclient_r.a

sudo ln -s /usr/local/mysql/lib/libmysqlclient.la /usr/local/mysql/lib/libmysqlclient_r.la

sudo ln -s /usr/local/mysql/lib/libmysqlclient.dylib /usr/local/mysql/lib/libmysqlclient_r.dylib

I’m getting this error, any ideas?

In file included from /Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/database/Release/cotire/database_CXX_prefix.hxx:4:
In file included from /Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/database/Release/cotire/database_CXX_prefix.cxx:4:
In file included from /Users/synapse/Downloads/Trinity/TrinityCore/src/server/database/PrecompiledHeaders/databasePCH.h:13:
In file included from /usr/local/include/mysql/mysql.h:84:
/usr/local/include/mysql/mysql/client_plugin.h:108:8: fatal error: definition of
type ‘MYSQL’ conflicts with typedef of the same name
struct MYSQL;
^
In file included from /Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/database/Release/cotire/database_CXX_prefix.hxx:4:
In file included from /Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/database/Release/cotire/database_CXX_prefix.cxx:4:
In file included from /Users/synapse/Downloads/Trinity/TrinityCore/src/server/database/PrecompiledHeaders/databasePCH.h:3:
In file included from /Users/synapse/Downloads/Trinity/TrinityCore/src/server/database/Database/Field.h:22:
/Users/synapse/Downloads/Trinity/TrinityCore/src/server/database/Database/DatabaseEnvFwd.h:48:25: note:
‘MYSQL’ declared here
typedef struct st_mysql MYSQL;
^
1 error generated.

** BUILD FAILED **

The following build commands failed:
ProcessPCH++ build/src/server/database/SharedPrecompiledHeaders/database_CXX_prefix-eylekykkjawsbrgoavqykzkqciwq/database_CXX_prefix.hxx.pch build/src/server/database/Release/cotire/database_CXX_prefix.hxx normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)