ZooKeeperBuild

HomePage | RecentChanges | Preferences

Building ZooKeeper on Mac OS X

http://zookeeper.apache.org links to https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute with minimal info on how to build it.

First try:

$ ant -Djavac.args="-Xlint -Xmaxwarns 1000" clean test tar

... and some 40 minutes later, during which time it was difficult to work on anything else because the tests kept stealing focus, Failure. Which one?

imbrium:logs wsmoak$ grep -r "Failures: 1" .
./TEST-org.apache.zookeeper.test.ClientPortBindTest.txt:Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 30.69 sec
imbrium:logs wsmoak$ cat ./TEST-org.apache.zookeeper.test.ClientPortBindTest.txt 

So I left out the tests:

$ ant -Djavac.args="-Xlint -Xmaxwarns 1000" clean  tar
[...]
check-cppunit-configure:

create-cppunit-configure:
     [exec] aclocal: couldn't open directory `/usr/share/aclocal': No such file or directory
     [exec] autoreconf: aclocal failed with exit status: 1

BUILD FAILED
/Users/wsmoak/projects/zookeeper/build.xml:1360: exec returned: 1

Total time: 1 minute 1 second

Possibly related to: http://jsdelfino.blogspot.com/2012/08/autoconf-and-automake-on-mac-os-x.html

$ brew install autoconf
Warning: autoconf-2.69 already installed, it's just not linked

$ brew link autoconf
Linking /usr/local/Cellar/autoconf/2.69... 
Error: Could not symlink share/emacs/site-lisp/autoconf-mode.el
/usr/local/share/emacs/site-lisp is not writable.

What? I don't even use emacs... FINE

$ sudo chown -R wsmoak emacs
$ brew link autoconf
Linking /usr/local/Cellar/autoconf/2.69... 21 symlinks created

and then

$ brew install automake

build still fails. Maybe this?

$ brew install libtool
(Something about prepending 'g' to glibtool and glibtoolize) Nope, still getting:
aclocal: couldn't open directory `/usr/share/aclocal': No such file
I do have
$ find /usr -name aclocal
...
/usr/local/share/aclocal
...
Maybe link it?
$ sudo ln -s /usr/local/share/aclocal /usr/share/aclocal 

Well, that got farther...

create-cppunit-configure:
     [exec] configure.ac:37: warning: macro `AM_PATH_CPPUNIT' not found in library
     [exec] glibtoolize: putting auxiliary files in `.'.
     [exec] glibtoolize: copying file `./ltmain.sh'
     [exec] glibtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
     [exec] glibtoolize: rerunning glibtoolize, to keep the correct libtool macros in-tree.
     [exec] glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
     [exec] configure.ac:37: warning: macro `AM_PATH_CPPUNIT' not found in library
     [exec] configure.ac:37: error: possibly undefined macro: AM_PATH_CPPUNIT
     [exec]       If this token and others are legitimate, please use m4_pattern_allow.
     [exec]       See the Autoconf documentation.
     [exec] autoreconf: /opt/local/bin/autoconf failed with exit status: 1

BUILD FAILED
/Users/wsmoak/projects/zookeeper/build.xml:1360: exec returned: 1

Total time: 58 seconds
imbrium:zookeeper wsmoak$ 

This has happened before: https://issues.apache.org/jira/browse/ZOOKEEPER-1454

And...

$ export ACLOCAL_PATH=/opt/local/bin/aclocal

$ ant -Djavac.args="-Xlint -Xmaxwarns 1000" clean  tar
...
      [tar] Building tar: /Users/wsmoak/projects/zookeeper/build/zookeeper-3.6.0-SNAPSHOT.tar.gz

BUILD SUCCESSFUL

Finally!

You might also run into problems with the docs if you don't have Forrest installed. See: ZooKeeperDocs


HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited October 31, 2014 5:33 pm by WendySmoak (diff)
Search: