Jump to content
TrinityCore

[HowTo] Compile TrinityCore on Mac OS X using Homebrew


Shin
 Share

Recommended Posts

  • 1 month later...
  • 2 weeks later...
  • Shin pinned this topic

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
Link to comment
Share on other sites

  • 2 weeks later...

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)

  • Like 1
Link to comment
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.

Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...

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?

Link to comment
Share on other sites

  • 3 months later...

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!

 

Link to comment
Share on other sites

  • 5 months later...
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

Link to comment
Share on other sites

  • 1 year later...

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
Link to comment
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)

Link to comment
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"

Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

  • 2 weeks later...
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
Link to comment
Share on other sites

  • 4 weeks later...
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
Link to comment
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
Link to comment
Share on other sites

  • 4 years later...

I'm success build on Mac OS 12.6 Monterey and old Mojave

after install all brew packages 

one more thing to do with Monterey is I need copy ssl config

cp /usr/local/opt/openssl/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/

when I run this command 

brew link zlib --force

It shows these message , but seems no effect anything 

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"


this is what I use for build settings , works for both OS  

cmake ../ -GXcode \
-DMYSQL_ADD_INCLUDE_PATH=/usr/local/include \
-DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib \
-DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include \
-DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib \
-DBOOST_INCLUDEDIR=/usr/local/include \
-DBOOST_LIBRARYDIR=/usr/local/lib \
-DOPENSSL_INCLUDE_DIR=/usr/local/opt/[email protected]/include \
-DOPENSSL_SSL_LIBRARIES=/usr/local/opt/[email protected]/lib/libssl.dylib \
-DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/[email protected]/lib/libcrypto.dylib \
-DZMQ_LIBRARY=/usr/local/opt/zeromq/lib/libzmq.dylib \
-DZMQ_INCLUDE_DIR=/usr/local/opt/zeromq/include \
-DZLIB_ROOT=/usr/local/Cellar/zlib/1.2.13 \
-DACE_INCLUDE_DIR=/usr/local/opt/ace/include \
-DACE_LIBRARY=/usr/local/opt/ace/lib/libACE.dylib \
-DCMAKE_INSTALL_PREFIX=/Applications/Trinity \
-DWITH_WARNINGS=1

the key is change oepnssl to [email protected]

and Mojave require Xcode 11 , don't use Xcode 10

 

Edited by WebberLai
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...