Today I tried to build Apache Mesos on my Macbook Pro, although it’s fairly simple there are just a few gotchas.
So decided to put the steps here:
1, Clone the code (git clone http://github.com/apache/mesos.git)
2, Install homebrew (http://brew.sh/)
3, Add homebrew taps:
% brew tap homebrew/versions
% brew tap homebrew/science
% brew tap homebrew/apache
4, Install libtool, svn and apr libraries
% brew install libtool svn apr
5, Install automake112 (which installs autoconf as well)
% brew install automake112
6, Symlink automake112 to automake, and aclocal112 to aclocal
% ln -sf automake112 /usr/local/bin/automake
% ln -sf aclocal112 /usr/local/bin/aclocal
7, And finally build (creating a seperate folder to not generate files in the main dir)!
% ./bootstrap && mkdir build && cd build && ../configure && make install
That’s all that you need to do!
If you see error messages related to aclocal when running ./bootstrap, like this:
It might be that the brew installation of automake didn’t work. Following these instructions to install these build packages from source worked for me: https://gist.github.com/jellybeansoup/4192307
Another, more simple approach, is to use the homebrew formula created by Tobi Knaup here: https://github.com/guenter/homebrew/blob/mesos/Library/Formula/mesos.rb
Simply do:
brew install https://raw.githubusercontent.com/guenter/homebrew/mesos/Library/Formula/mesos.rb
I am getting an error while running ../configure. Can some one help. Error is:
configure: error: cannot find libsvn_subr-1 headers
——————————————————————-
libsubversion-1 is required for mesos to build.
Hi knoxxs, this post is outdated as the latest 0.21.0 release adds two more dependencies. You need to do few more steps now:
1. Add brew taps versions and apache
2. brew install subversion
3. brew install apr
4. When running configure, pass one more flag to it: –with-svn=/usr/local
These steps should make mesos build when you run make
If you can tell me how to “add brew taps versions and apache”, that would give me a good start!
Just run brew tap,
ie: brew tap homebrew/versions
brew tap homebrew/apache
After following your updated instructions, I got these error messages :
configure: error: cannot find libapr-1 headers
libapr-1 is required for mess to build.
I already install subversion and apr… Can some one help?
Hi Jikang,
Not sure if you have already resolved this problem or not.
I found this thread while having the same problem as you mentioned. The trick was to use the –with-apr flag and point it to the “brew” installed location.
For example, the following worked for me :-
../configure –with-svn=/usr/local/Cellar/subversion/1.8.13/ –with-apr=/usr/local/Cellar/apr/1.5.2/libexec/
Let me know otherwise.
Thanks!
Vivek
We made some improvements in the autoconf configuration, and should actually automatically figure out where the libraries are if you’re on latest version.