Big Data/Analytics Zone is brought to you in partnership with:

Brian has 10+ years of experience as a technology leader and architect in a wide variety of settings from early startups to Fortune 500 companies. With experience delivering SaaS solutions in business intelligence, artificial intelligence and VoIP, his current focus is big data and analytics. Brian leads the Virgil project on Apache Extras, which is a services layer built on Cassandra that provides REST, Map/Reduce, Search and Distributed Processing capabilities. Brian is a DZone MVB and is not an employee of DZone and has posted 66 posts at DZone. You can read more from them at their website. View Full User Profile

Compiling Storm (and jzmq) on Mac OSX

12.27.2012
| 3150 views |
  • submit to reddit

I recently setup a new machine, went to compile Storm, and forgot what a PITA it is.  Here is a blog post so future-me knows how to do it.

The biggest hurdle is jzmq.   To get that installed, your going to need some make mojo, and some libraries.  I use Brew.  If you are still using macports, consider a switch. 

Anyway, here is the recipe to get jzmq installed assuming you have Brew.

$ git clone https://github.com/nathanmarz/jzmq.git
$ brew install automake
$ brew install libtool
$ brew install zmq
$ cd jzmq
$ ./configure

That resulted in a cryptic message: 
cannot find jni.h in /Library/Java/Home/include 

To fix that, I found a suggested fix and created a symbolic link.
$ sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/ /Library/Java/Home/include

Then, you hit this:
No rule to make target `classdist_noinst.stamp'

I had to dig through Google cache archives to find a solution for that one:
$ touch src/classdist_noinst.stamp

Then, you hit:
error: cannot access org.zeromq.ZMQ
That's because you haven't compiled zeromq yet!  So:
$ cd src
$ javac -d . org/zeromq/*.java
Wasn't that easy? =)  All that's left is to build and install:
$ cd ..
$ make
$ sudo make install
Now you have jzmq installed.  So we can get on with Storm.  Storm needs lein to build.  Don't go grabbing the latest version of lein either.   You'll need < 2.  There is an explicit check that was added to Storm that will refuse to build with lein >= 2.  You can grab older versions here. (we use 1.7.1)Unzip that and copy $LEIN_HOME/bin/lein to your bin directory.  Make it executable and put it in your path.  Once you've done that, building Storm isn't so bad.  From the root of the storm source tree:
$ lein deps
$ lein jar 
$ lein install

Happy Storming.

Published at DZone with permission of Brian O' Neill, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)