Skip to content

Instantly share code, notes, and snippets.

@moderation
Last active February 16, 2016 06:08
Show Gist options
  • Save moderation/0b34f57aaabefeda15e9 to your computer and use it in GitHub Desktop.
Save moderation/0b34f57aaabefeda15e9 to your computer and use it in GitHub Desktop.
Compile Apache Mesos 0.21.0 on OS X

Apache 0.20.1 introduced some new build dependencies - mesos / docs / getting-started.md

# Install devel libapr1 (***Only required for Mesos 0.21.0 or newer***)
$ sudo apt-get install libapr1-dev

# Install devel libsvn (***Only required for Mesos 0.21.0 or newer***)
$ sudo apt-get install libsvn-dev

Prior to 0.21.0 I used Dimitris Kolovos's Building Apache Mesos on Mac OS X Mavericks to successfully build a Mesos Slave from source. Another how to guide is from Timothy Chen - How to build Apache Mesos on Mac

In order to build with the new dependencies I did the following:

Install subversion that includes the relevant serf and subversion libraries:

brew install subversion

Link the brewed library so the build process can find it:

sudo ln -s /usr/local/Cellar/subversion/1.8.10_1/include/subversion-1 /usr/include/subversion-1

This step may not be required but I didn't have Java prior to my prior builds and I had to make sure the build process knew where Java was:

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home"
export PATH=$JAVA_HOME/bin:$PATH

I was then able to build using Dimitri's steps.

@dscrash
Copy link

dscrash commented Feb 11, 2015

After following your instructions(including install svn and apr), I got these error messages:
...configure: error: cannot find libapr-1 headers
...libapr-1 is required for mesos to build.
I'm trying to build lessons on MAC OS X Yosemite. Any help..?

@vivekjuneja
Copy link

@dscrash,

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.

@moderation
Copy link
Author

Thanks for the update @vivekjuneja. With the steps above already done and an updated JDK version I was able to follow Dimitri's steps to build the just released Apache Mesos 0.23

@tobilg
Copy link

tobilg commented Dec 21, 2015

I'm trying

$ ../configure –-with-apr=/usr/local/Cellar/apr/1.5.2/libexec/
configure: error: invalid variable name: `–-with-apr'

Any idea? Thanks in advance!

@griznog
Copy link

griznog commented Dec 24, 2015

If you copy/paste vivekjuneja's configure line, the -- becomes something that configure doesn't recognize. Delete those and type in the -- and it works.

@xiaods
Copy link

xiaods commented Jan 26, 2016

thanks for share this tips. it works for my macos 10.11 latest version

@psekar
Copy link

psekar commented Feb 16, 2016

Thanks @griznog . that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment