Fork me on GitHub
Classic Building on Mac OS X with homebrew
Post: #1
I could not make the build work on Mac OS X without altering src/realmd/CMakeLists.txt like this:

Code:
--- a/src/realmd/CMakeLists.txt
+++ b/src/realmd/CMakeLists.txt
@@ -38,6 +38,7 @@ include_directories(
   ${CMAKE_BINARY_DIR}
   ${CMAKE_BINARY_DIR}/src/shared
   ${MYSQL_INCLUDE_DIR}
+  ${OPENSSL_INCLUDE_DIR}
 )


I installed openssl and boost using Homebrew. The procedure I used went something like this:
Code:
brew tap homebrew/versions
brew install --without-fortran --without-multilib gcc49
brew install openssl
brew install boost --cc=gcc-4.9
...
cmake ../mangos-classic -DCMAKE_INSTALL_PREFIX=\../run -DCMAKE_C_COMPILER=/usr/local/bin/gcc-4.9 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-4.9 \
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib
make
Reply
Post: #2
Just tested it on macOS sierra and yea... I can confirm this!
Reply
Post: #3
PCH does not appear to work on Mac. I get this:

Code:
/Users/me/mangos-classic-proj/mangos-classic/src/game/CharacterDatabaseCleaner.cpp: In function 'void CharacterDatabaseCleaner::CheckUnique(const char*, const char*, bool (*)(uint32))':
/Users/me/mangos-classic-proj/mangos-classic/src/game/CharacterDatabaseCleaner.cpp:69:23: error: expected primary-expression before ')' token
        if (!check(id))
                      ^
make[2]: *** [src/game/CMakeFiles/game.dir/CharacterDatabaseCleaner.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/game/CMakeFiles/game.dir/all] Error 2
make: *** [all] Error 2
Reply
Post: #4
Is there a guide of how to make mangos work with homebrew?  Homebrew was suggested to me in my own thread here, but what do I do...?  The guide I'm trying to work with outside of Homebrew doesn't work.
Reply
Post: #5
(01-02-2017, 07:50 PM)skeptix Wrote: Is there a guide of how to make mangos work with homebrew?  Homebrew was suggested to me in my own thread here, but what do I do...?  The guide I'm trying to work with outside of Homebrew doesn't work.

The master branch doesn't build on mac at the moment. You'll need the macpch branch on my fork. I haven't built on a fresh system for a while now, and I don't remember what all you have to install using homebrew. You'll need this at the very least:

Code:
brew install boost
brew install openssl
brew install mysql++
brew install cmake

Once you have those installed, create a project directory and clone the source into it:
Code:
mkdir cmangos_proj
cd cmangos_proj
git clone https://github.com/Jose123456/mangos-classic.git
cd mangos-classic
git checkout -t origin/macpch
cd ..

Now create directories to build in and run from:
Code:
mkdir build run

Change into your build directory run cmake and build:
Code:
cd build
cmake ../mangos-classic -DCMAKE_INSTALL_PREFIX=\../run -DBUILD_VMAP_EXTRACTOR=ON -DBUILD_MMAP_EXTRACTOR=ON -DBUILD_EXTRACTOR=ON -DPCH=ON
make -j8

I used "make -j8" because my mac has 8 cores, 4 physical x 2 hyperthreads each. You can find out how many cores your mac has by running "sysctl -n hw.ncpu".
[-] The following 1 user says Thank You to JoseQ for this post:
  • LilleCarl
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

Continued MaNGOS | Return to Top | | Lite (Archive) Mode | RSS Syndication