Skip to content

Instantly share code, notes, and snippets.

@philipbergen
Created June 23, 2011 05:36
Show Gist options
  • Save philipbergen/1041966 to your computer and use it in GitHub Desktop.
Save philipbergen/1041966 to your computer and use it in GitHub Desktop.
Installing CouchDB with brew fails
If you have installed MacGPG2 via the package installer, several other
checks in this script will turn up problems, such as stray .dylibs in
/usr/local and permissions issues with share and man in /usr/local/.
Some "config" scripts were found in your path, but not in system or Homebrew folders.
`./configure` scripts often look for *-config scripts to determine if software packages
are installed, and what additional flags to use when compiling and linking.
Having additional scripts in your path can confuse software installed via Homebrew if
the config script overrides a system or Homebrew provided script of the same name.
/Library/Frameworks/Python.framework/Versions/3.1/bin
python3-config python3.1-config
==> Downloading https://github.com/apache/couchdb/tarball/1.1.0
File already downloaded in /Users/philip/Library/Caches/Homebrew
/usr/bin/tar xf /Users/philip/Library/Caches/Homebrew/couchdb-1.1.0.0
==> ./bootstrap
./bootstrap
You have bootstrapped Apache CouchDB, time to relax.
Run `./configure' to configure the source before you install.
==> ./configure --prefix=/usr/local/Cellar/couchdb/1.1.0 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc --with-erlang=/usr/local/lib/erlang/usr/include --with-js-include=/usr/local/include --with-js-lib=/usr/local/lib
./configure --prefix=/usr/local/Cellar/couchdb/1.1.0 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc --with-erlang=/usr/local/lib/erlang/usr/include --with-js-include=/usr/local/include --with-js-lib=/usr/local/lib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/cc accepts -g... yes
checking for /usr/bin/cc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of /usr/bin/cc... gcc3
checking build system type... i386-apple-darwin10.7.4
checking host system type... i386-apple-darwin10.7.4
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /usr/bin/cc... /usr/bin/cc
checking if the linker (/usr/bin/cc) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/cc option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from /usr/bin/cc object... ok
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking how to run the C preprocessor... /usr/bin/cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /usr/bin/cc supports -fno-rtti -fno-exceptions... yes
checking for /usr/bin/cc option to produce PIC... -fno-common -DPIC
checking if /usr/bin/cc PIC flag -fno-common -DPIC works... yes
checking if /usr/bin/cc static flag -static works... no
checking if /usr/bin/cc supports -c -o file.o... yes
checking if /usr/bin/cc supports -c -o file.o... (cached) yes
checking whether the /usr/bin/cc linker (/usr/bin/cc) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.7.4 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether ln -s works... yes
checking for pthread_create in -lpthread... yes
checking for JS_NewContext in -lmozjs... yes
checking jsapi.h usability... no
checking jsapi.h presence... no
checking for jsapi.h... no
checking js/jsapi.h usability... yes
checking js/jsapi.h presence... yes
checking for js/jsapi.h... yes
checking for icu-config... /usr/local/Cellar/icu4c/4.4.1/bin/icu-config
checking for ICU >= 3.4.1... yes
checking ICU_CFLAGS... -O3 -w -pipe -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long
checking ICU_CXXFLAGS... -O3 -w -pipe -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long
checking ICU_LIBS... -headerpad_max_install_names -lpthread -lm -L/usr/local/Cellar/icu4c/4.4.1/lib -licui18n -licuuc -licudata -lpthread -lm
checking for curl-config... /usr/local/bin/curl-config
checking for curl >= 7.18.0... yes
checking CURL_CFLAGS... -I/usr/local/include
checking CURL_LIBS... -L/usr/local/lib -lcurl -lssl -lcrypto -lldap -lz
checking for erl... /usr/local/bin/erl
checking for erlc... /usr/local/bin/erlc
checking erl_driver.h usability... yes
checking erl_driver.h presence... yes
checking for erl_driver.h... yes
checking for help2man... no
configure: WARNING: You will be unable to regenerate any man pages.
checking location of init directory... not found
checking location of launchd directory... ${prefix}/Library/LaunchDaemons
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bin/couchjs.tpl
config.status: creating bin/couchdb.tpl
config.status: creating bin/couchdb.bat.tpl
config.status: creating bin/Makefile
config.status: creating etc/couchdb/Makefile
config.status: creating etc/couchdb/default.ini.tpl
config.status: creating etc/default/Makefile
config.status: creating etc/init/couchdb.tpl
config.status: creating etc/init/Makefile
config.status: creating etc/launchd/org.apache.couchdb.plist.tpl
config.status: creating etc/launchd/Makefile
config.status: creating etc/logrotate.d/couchdb.tpl
config.status: creating etc/logrotate.d/Makefile
config.status: creating etc/windows/Makefile
config.status: creating etc/Makefile
config.status: creating share/Makefile
config.status: creating src/Makefile
config.status: creating src/couchdb/couch.app.tpl
config.status: creating src/couchdb/Makefile
config.status: creating src/couchdb/priv/Makefile
config.status: creating src/erlang-oauth/Makefile
config.status: creating src/etap/Makefile
config.status: creating src/ibrowse/Makefile
config.status: creating src/mochiweb/Makefile
config.status: creating test/Makefile
config.status: creating test/bench/Makefile
config.status: creating test/etap/Makefile
config.status: creating test/etap/test_util.erl
config.status: creating test/javascript/Makefile
config.status: creating test/view_server/Makefile
config.status: creating utils/Makefile
config.status: creating var/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
You have configured Apache CouchDB, time to relax.
Run `make && sudo make install' to install.
==> make
make
make all-recursive
Making all in bin
sed -e "s|%ERL%|/usr/local/bin/erl|g" \
-e "s|%ICU_CONFIG%|/usr/local/Cellar/icu4c/4.4.1/bin/icu-config|g" \
-e "s|%bindir%|/usr/local/Cellar/couchdb/1.1.0/bin|g" \
-e "s|%localerlanglibdir%|/usr/local/Cellar/couchdb/1.1.0/lib/couchdb/erlang/lib|g" \
-e "s|%defaultini%|default.ini|g" \
-e "s|%localini%|local.ini|g" \
-e "s|%localconfdir%|/usr/local/etc/couchdb|g" \
-e "s|%localstatelogdir%|/usr/local/var/log/couchdb|g" \
-e "s|%localstatelibdir%|/usr/local/var/lib/couchdb|g" \
-e "s|%localstatedir%|/usr/local/var|g" \
-e "s|%bug_uri%|https://issues.apache.org/jira/browse/COUCHDB|g" \
-e "s|%package_author_address%|[email protected]|g" \
-e "s|%package_author_name%|The Apache Software Foundation|g" \
-e "s|%package_name%|Apache CouchDB|g" \
-e "s|%version%|1.1.0|g" \
-e "s|%couchdb_command_name%|`echo couchdb | sed 's,x,x,'`|g" > \
couchdb < couchdb.tpl
sed -e "s|%locallibbindir%|/usr/local/Cellar/couchdb/1.1.0/lib/couchdb/bin|g" \
-e "s|%bug_uri%|https://issues.apache.org/jira/browse/COUCHDB|g" \
-e "s|%package_author_address%|[email protected]|g" \
-e "s|%package_author_name%|The Apache Software Foundation|g" \
-e "s|%package_name%|Apache CouchDB|g" \
-e "s|%version%|1.1.0|g" \
-e "s|%couchjs_command_name%|`echo couchjs | sed 's,x,x,'`|g" > \
couchjs < couchjs.tpl
sed -e "s|%locallibbindir%|/private/tmp/homebrew-couchdb-1.1.0-FOQ4/apache-couchdb-91d04b4/src/couchdb/priv|g" \
-e "s|%bug_uri%|https://issues.apache.org/jira/browse/COUCHDB|g" \
-e "s|%package_author_address%|[email protected]|g" \
-e "s|%package_author_name%|The Apache Software Foundation|g" \
-e "s|%package_name%|Apache CouchDB|g" \
-e "s|%version%|1.1.0|g" \
-e "s|%couchjs_command_name%|`echo couchjs | sed 's,x,x,'`|g" > \
couchjs_dev < couchjs.tpl
chmod +x couchjs
chmod +x couchjs_dev
chmod +x couchdb
Making all in etc
Making all in couchdb
sed -e "s|%bindir%|/usr/local/Cellar/couchdb/1.1.0/bin|g" \
-e "s|%localconfdir%|/usr/local/etc/couchdb|g" \
-e "s|%localdatadir%|/usr/local/Cellar/couchdb/1.1.0/share/couchdb|g" \
-e "s|%localbuilddatadir%|/usr/local/Cellar/couchdb/1.1.0/share/couchdb|g" \
-e "s|%localstatelibdir%|/usr/local/var/lib/couchdb|g" \
-e "s|%localstatelogdir%|/usr/local/var/log/couchdb|g" \
-e "s|%localstaterundir%|/usr/local/var/run/couchdb|g" \
-e "s|%couchprivlibdir%|/usr/local/Cellar/couchdb/1.1.0/lib/couchdb/erlang/lib/couch-1.1.0/priv/lib|g" \
-e "s|%couchjs_command_name%|`echo couchjs | sed 's,x,x,'`|g" \
< default.ini.tpl > default.ini
sed -e "s|%bindir%|/private/tmp/homebrew-couchdb-1.1.0-FOQ4/apache-couchdb-91d04b4/bin|g" \
-e "s|%localconfdir%|/private/tmp/homebrew-couchdb-1.1.0-FOQ4/apache-couchdb-91d04b4/etc/couchdb|g" \
-e "s|%localdatadir%|/private/tmp/homebrew-couchdb-1.1.0-FOQ4/apache-couchdb-91d04b4/share|g" \
-e "s|%localbuilddatadir%|/private/tmp/homebrew-couchdb-1.1.0-FOQ4/apache-couchdb-91d04b4/share|g" \
-e "s|%localstatelibdir%|/private/tmp/homebrew-couchdb-1.1.0-FOQ4/apache-couchdb-91d04b4/tmp/lib|g" \
-e "s|%localstatelogdir%|/private/tmp/homebrew-couchdb-1.1.0-FOQ4/apache-couchdb-91d04b4/tmp/log|g" \
-e "s|%localstaterundir%|/private/tmp/homebrew-couchdb-1.1.0-FOQ4/apache-couchdb-91d04b4/tmp/run|g" \
-e "s|%couchprivlibdir%|/private/tmp/homebrew-couchdb-1.1.0-FOQ4/apache-couchdb-91d04b4/src/couchdb/priv/.libs|g" \
-e "s|%couchjs_command_name%|`echo couchjs_dev | sed 's,x,x,'`|g" \
< default.ini.tpl > default_dev.ini
if test ! -f "local_dev.ini"; then \
cp local.ini local_dev.ini; \
fi
Making all in default
make[3]: Nothing to be done for `all'.
Making all in init
make[3]: Nothing to be done for `all'.
Making all in launchd
make[3]: Nothing to be done for `all'.
Making all in logrotate.d
make[3]: Nothing to be done for `all'.
Making all in windows
make[3]: Nothing to be done for `all'.
if test "../build-aux/install-sh -c -d"; then \
../build-aux/install-sh -c -d launchd; \
else \
if test ! -d launchd; then \
mkdir launchd; \
fi \
fi
sed -e "s|%localstatelogdir%|/usr/local/var/log/couchdb|g" < logrotate.d/couchdb.tpl > logrotate.d/couchdb
sed -e "s|%configure_input%|launchd/org.apache.couchdb.plist. Generated from launchd/org.apache.couchdb.plist.tpl by configure.|" \
-e "s|%bindir%|/usr/local/Cellar/couchdb/1.1.0/bin|" \
-e "s|%couchdb_command_name%|`echo couchdb | sed 's,x,x,'`|" \
< launchd/org.apache.couchdb.plist.tpl > launchd/org.apache.couchdb.plist
Making all in src
Making all in couchdb
Making all in priv
/bin/sh ../../../libtool --tag=CC --mode=compile /usr/bin/cc -DHAVE_CONFIG_H -I. -I../../.. -L/usr/local/lib -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/local/include -DXP_UNIX -I/usr/local/Cellar/icu4c/4.4.1/include -I/usr/local/include/js -I/usr/local/Cellar/icu4c/4.4.1/include -L/usr/local/Cellar/icu4c/4.4.1/lib -O3 -w -pipe -MT couch_icu_driver_la-couch_icu_driver.lo -MD -MP -MF .deps/couch_icu_driver_la-couch_icu_driver.Tpo -c -o couch_icu_driver_la-couch_icu_driver.lo `test -f 'icu_driver/couch_icu_driver.c' || echo './'`icu_driver/couch_icu_driver.c
cp spawnkillable/couchspawnkillable.sh couchspawnkillable
/usr/bin/cc -DHAVE_CONFIG_H -I. -I../../.. -L/usr/local/lib -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/local/include -DXP_UNIX -I/usr/local/Cellar/icu4c/4.4.1/include -I/usr/local/include/js -D_BSD_SOURCE -I/usr/local/include -O3 -w -pipe -MT couchjs-http.o -MD -MP -MF .deps/couchjs-http.Tpo -c -o couchjs-http.o `test -f 'couch_js/http.c' || echo './'`couch_js/http.c
/usr/bin/cc -DHAVE_CONFIG_H -I. -I../../.. -L/usr/local/lib -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/local/include -DXP_UNIX -I/usr/local/Cellar/icu4c/4.4.1/include -I/usr/local/include/js -D_BSD_SOURCE -I/usr/local/include -O3 -w -pipe -MT couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o `test -f 'couch_js/main.c' || echo './'`couch_js/main.c
/usr/bin/cc -DHAVE_CONFIG_H -I. -I../../.. -L/usr/local/lib -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/local/include -DXP_UNIX -I/usr/local/Cellar/icu4c/4.4.1/include -I/usr/local/include/js -D_BSD_SOURCE -I/usr/local/include -O3 -w -pipe -MT couchjs-utf8.o -MD -MP -MF .deps/couchjs-utf8.Tpo -c -o couchjs-utf8.o `test -f 'couch_js/utf8.c' || echo './'`couch_js/utf8.c
chmod +x couchspawnkillable
cp stat_descriptions.cfg.in stat_descriptions.cfg
libtool: compile: /usr/bin/cc -DHAVE_CONFIG_H -I. -I../../.. -L/usr/local/lib -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/local/include -DXP_UNIX -I/usr/local/Cellar/icu4c/4.4.1/include -I/usr/local/include/js -I/usr/local/Cellar/icu4c/4.4.1/include -L/usr/local/Cellar/icu4c/4.4.1/lib -O3 -w -pipe -MT couch_icu_driver_la-couch_icu_driver.lo -MD -MP -MF .deps/couch_icu_driver_la-couch_icu_driver.Tpo -c icu_driver/couch_icu_driver.c -fno-common -DPIC -o .libs/couch_icu_driver_la-couch_icu_driver.o
In file included from /usr/local/include/curl/curl.h:36,
from couch_js/http.c:17:
/usr/local/include/curl/curlrules.h:134: error: size of array ‘__curl_rule_01__’ is negative
make[4]: *** [couchjs-http.o] Error 1
make[4]: *** Waiting for unfinished jobs....
mv -f .deps/couchjs-main.Tpo .deps/couchjs-main.Po
mv -f .deps/couch_icu_driver_la-couch_icu_driver.Tpo .deps/couch_icu_driver_la-couch_icu_driver.Plo
mv -f .deps/couchjs-utf8.Tpo .deps/couchjs-utf8.Po
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/couchdb.rb#L23
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: c95b133430e9b60cddd3fc383bce0449e8bce06e
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: 8-core 64-bit dunno
OS X: 10.6.7
Kernel Architecture: x86_64
Ruby: 1.8.7-174
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.2.6
GCC-4.0: build 5494
GCC-4.2: build 5666
LLVM: build 2335
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -w -pipe
CXXFLAGS: -O3 -w -pipe
CPPFLAGS: -I/usr/local/Cellar/icu4c/4.4.1/include
LDFLAGS: -L/usr/local/Cellar/icu4c/4.4.1/lib
MAKEFLAGS: -j8
PKG_CONFIG_PATH: /usr/local/Cellar/icu4c/4.4.1/lib/pkgconfig
Error: Failed executing: make
Please report this bug: https://github.com/mxcl/homebrew/wiki/Checklist-before-filing-a-new-issue
Also try:
`brew doctor` to check your setup for common problems.
`brew missing` to check installed packages for missing deps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment