Cmake installation error -- Mac OSX 10.6.8

I am trying to get couchbase up and running for python on Mac OSX 10.6.8. I’m following the instructions here:

http://docs.couchbase.com/couchbase-sdk-python-1.2/index.html#getting-started

But I’m stuck on step 2:

Download and install the C library.

According to the instructions for installing the C SDK here:

http://docs.couchbase.com/developer/c-2.4/download-install.html

I did this:

~$ brew update
....
....
~$ brew install libcouchbase 

But I’m getting an error when homebrew tries to install the dependency cmake:

==> Installing libcouchbase dependency: cmake
==> Downloading http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-3.1.0.tar.gz
==> Patching
==> Downloading https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--sphinx-1.2.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--markupsafe-0.23.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--docutils-0.12.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--pygments-2.0.1.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--jinja2-2.7.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> ./bootstrap --prefix=/Users/7stud/.homebrew/Cellar/cmake/3.1.0 --system-libs --parallel=2 --no-system-libarchiv
==> make
[ 34%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_write_set_options.c.o
[ 34%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/filter_fork_posix.c.o
Linking C static library libcmlibarchive.a
[ 34%] Built target cmlibarchive
make: *** [all] Error 2

READ THIS: http://git.io/brew-troubleshooting

These open issues may also help:
Fix LLVM CMake modules not being preprocessed (https://github.com/Homebrew/homebrew/pull/29976)
cmake builds fail on CLT-only with --env=std (https://github.com/Homebrew/homebrew/issues/29101)

More detail here:

~$ brew gist-logs --config --doctor cmake
https://gist.github.com/a37987f168d284128cfe

Anyone have any ideas on what I should do? Thanks.

Looking at this line:

/tmp/cmake-HcEaFf/cmake-3.1.0/Source/CursesDialog/form/form.h:46:31: error: ncurses/ncurses.h: No such file or directory

It would seem you need to install ncurses. You are running a fairly old platform (I’m guessing homebrew no longer supports snow leopard), and in later versions of OSX, ncurses is provided by the vendor as /usr/include/ncurses, etc.

Hi,

Thanks for taking a look. I do have ncurses.h in /usr/include:

/usr/include$ ls -al ncurses.h
lrwxr-xr-x  1 root  wheel  8 Aug 11  2012 ncurses.h -> curses.h

It’s a symbolic link to the curses.h file in the same directory. But based on the error message you posted:

error: ncurses/ncurses.h: No such file or directory

…it looks like homebrew is expecting ncurses.h to be inside an ncurses directory. So I tried this:

/usr/include$ sudo mkdir ncurses
Passsword:
/usr/include$ cd ncurses
/usr/include/ncurses$ sudo cp -a  ../ncurses.h  .    (-a => creates a new link rather than copying the file that the link points to)

Then I went ahead and installed libcouchbase:

~$ brew install libcouchbase 
==> Installing libcouchbase dependency: cmake
==> Downloading http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-3.1.0.tar.gz
==> Patching
==> Downloading https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--jinja2-2.7.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.ta
Already downloaded: /Library/Caches/Homebrew/cmake--markupsafe-0.23.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--docutils-0.12.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.g
Already downloaded: /Library/Caches/Homebrew/cmake--pygments-2.0.1.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--sphinx-1.2.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> ./bootstrap --prefix=/Users/7stud/.homebrew/Cellar/cmake/3.1.0 --system-libs --para
==> make
==> make install
/Users/7stud/.homebrew/Cellar/cmake/3.1.0: 1819 files, 33M, built in 18.5 minutes
==> Installing libcouchbase
==> Downloading http://packages.couchbase.com/clients/c/libcouchbase-2.4.5_1_gd7f6ecf.t
######################################################################## 100.0%
==> Patching
==> cmake .. -DCMAKE_INSTALL_PREFIX=/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_
==> make install
/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf: 53 files, 1.4M, built in 42 seconds

No errors! Thanks!