Jump to content
TrinityCore
Shin

[HowTo] Compile TrinityCore on Mac OS X using Homebrew

Recommended Posts

just switch to 3.3.5 branch:

	git checkout 3.3.5

and build using:

xcodebuild -target install -config Release

Share this post


Link to post
Share on other sites
On 12/19/2015, 11:42:50, Shin said:

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

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites

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:

The C compiler identification could not be found in "/Volumes/Ext Storage/Trinity/TrinityCore/build/CMakeFiles/3.4.3/CompilerIdC/._CompilerIdC.build"

The CXX compiler identification could not be found in "/Volumes/Ext Storage/Trinity/TrinityCore/build/CMakeFiles/3.4.3/CompilerIdCXX/._CompilerIdCXX.build"

 

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

Edited by panther

Share this post


Link to post
Share on other sites

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:

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

(1 failure)

Share this post


Link to post
Share on other sites
13 hours ago, Dibby said:

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:

    Ld 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 libmysqlclient_r.dylib which evidently is not located under /usr/local/mysql/lib/ in your machine.

Share this post


Link to post
Share on other sites

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 \

 

 

Edited by Marethyu

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Hi, I could not find 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!

 

Share this post


Link to post
Share on other sites
On 30.6.2016 at 9:46 AM, cynthia said:

Hi, I could not find libmysqlclient_r.dylib in my mac.

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

 

** BUILD FAILED **

 

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

Share this post


Link to post
Share on other sites

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)

Edited by itsirc

Share this post


Link to post
Share on other sites
10 hours ago, Shauren said:

That looks like you are using mysql 8 which is not supported

Ok, installed mysql 5.7 and it went well until this:

Ld build/src/server/authserver/Release/authserver normal x86_64
    cd /Users/synapse/Downloads/Trinity/TrinityCore
    export MACOSX_DEPLOYMENT_TARGET=10.13
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/authserver/Release -F/Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/authserver/Release -filelist /Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/authserver/TrinityCore.build/Release/authserver.build/Objects-normal/x86_64/authserver.LinkFileList -mmacosx-version-min=10.13 -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/shared/Release/libshared.a /Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/database/Release/libdatabase.a /Users/synapse/Downloads/Trinity/TrinityCore/build/src/common/Release/libcommon.a /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_thread-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libboost_iostreams-mt.dylib /usr/local/lib/libboost_regex-mt.dylib /Users/synapse/Downloads/Trinity/TrinityCore/build/dep/fmt/Release/libfmt.a /Users/synapse/Downloads/Trinity/TrinityCore/build/dep/g3dlite/Release/libg3dlib.a /Users/synapse/Downloads/Trinity/TrinityCore/build/dep/recastnavigation/Detour/Release/libDetour.a /usr/lib/libz.dylib /usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib /usr/local/mysql/lib/libmysqlclient_r.dylib -Xlinker -dependency_info -Xlinker /Users/synapse/Downloads/Trinity/TrinityCore/build/src/server/authserver/TrinityCore.build/Release/authserver.build/Objects-normal/x86_64/authserver_dependency_info.dat -o /Users/synapse/Downloads/Trinity/TrinityCore/build/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:
    Ld build/src/server/authserver/Release/authserver normal x86_64
(1 failure)

Share this post


Link to post
Share on other sites

I don't have any knowledge about building on mac, just repeating that mysql 8 is not supported on any platform (not related to mac specifically)

Share this post


Link to post
Share on other sites

 

On 9/21/2018 at 8:55 AM, itsirc said:


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

 

it can't find libmysqlclient_r.dylib, so you need to check where it's located and change your -DMYSQL_LIBRARY param accordingly during step "5) Generate the XCode project files"

Share this post


Link to post
Share on other sites

cmake $TRINITY/repo -G Xcode \
    -DMYSQL_ADD_INCLUDE_PATH=/usr/local/include \
    -DMYSQL_LIBRARY=/usr/local/Cellar/[email protected]/5.7.24/lib/libmysqlclient.dylib \
    -DREADLINE_INCLUDE_DIR=$TRINITY/include \
    -DREADLINE_LIBRARY=$TRINITY/lib/libreadline.dylib \
    -DBOOST_INCLUDEDIR=/usr/local/include \
    -DBOOST_LIBRARYDIR=/usr/local/lib \
    -DOPENSSL_SSL_LIBRARIES=$TRINITY/lib/libssl.dylib \
    -DOPENSSL_CRYPTO_LIBRARIES=$TRINITY/lib/libcrypto.dylib \
    -DZMQ_LIBRARY=/usr/local/opt/zeromq/lib/libzmq.dylib \
    -DZMQ_INCLUDE_DIR=/usr/local/opt/zeromq/include \
    -DOPENSSL_INCLUDE_DIR=$TRINITY/include \
    -DCMAKE_INSTALL_PREFIX=$TRINITY \
    -DWITH_WARNINGS=1 \
    -DTOOLS=1 \
    -DUSE_COREPCH=1 \
    -DUSE_SCRIPTPCH=1 \
    -DCMAKE_INSTALL_PREFIX=/Users/nixholas/tc-server \

 

That worked best for me. Using zshell, so here goes.

export TRINITY=/Volumes/RedOne/TrinityCore
export PATH=$TRINITY/bin:/usr/local/Cellar/[email protected]/5.7.24/bin:$PATH

Edited by nixholas

Share this post


Link to post
Share on other sites
brew link zlib --force

give me  :

Warning: Refusing to link macOS-provided software: zlib

For compilers to find zlib you may need to set:

  export LDFLAGS="-L/usr/local/opt/zlib/lib"

  export CPPFLAGS="-I/usr/local/opt/zlib/include"

 

 how i can to solve?

Edited by kakashi10

Share this post


Link to post
Share on other sites
On 9/20/2018 at 5:50 PM, Shauren said:

That looks like you are using mysql 8 which is not supported

Hi all and thanks for this help thread.

I also get the same error as [itsirc] above, on September 20,  and you suggest mysql 8 is not supported.  But I did not install it mysql, Homebrew did.  I followed Homebrew commands, and this is the mysql Homebrew installed (I believe).

So how do I start over with a different mysql version from Homebrew, and what changes do I need to make in my commands? 

Thanks,

Aescleal

Update:  I figured out how to uninstall mysql 8 via Brew command, and then remove a few extra leftovers.  I don't know how 8 got on there really.  Anyway, afterward I installed mysql 5.7 with "Brew install [email protected]".  That worked a charm.  So things are improving...  except I can't find libmysqlclient_r.dylib anywhere on my Mac.

Edited by Aescleal

Share this post


Link to post
Share on other sites

Hi, update with more questions...

It seems I can now get things compiled.  However I had to use libmysqlclient.dylib, and not libmysqlclient_r.dylib.

It compiles!!!  Yay.  However, when I use the extractors on the WotLK client, it tells me map extractor is wrong version.

This was built with Homebrew and checked out the 3.3.5.  So I'm not sure what is different except libmysqlclient.dylib.

Is there something I'm missing?

Thanks

___________________________________________________________________________________________________________________

$ mapextractor

TrinityCore rev. e9bcae1fada6 2018-12-09 16:07:38 +0100 (master branch) (MacOSX, RelWithDebInfo, Static) (Map & DBC Extractor)

<Ctrl-C> to stop.

http://TrinityCore.org

MPQ files found in Data directory!

This tool works only with World of Warcraft: Legion

To extract maps for Wrath of the Lich King, rebuild tools using 3.3.5 branch!

Press ENTER to exit...

Edited by Aescleal

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×