Giter Site home page Giter Site logo

build-couchdb's Introduction

Build CouchDB

Build CouchDB is a wrapper or master project which pulls in, from official sources, CouchDB plus all of its dependencies. It is the most straightforward and reliable procedure to build official CouchDB releases from source.

Build CouchDB builds an isolated, independent server. You do not need administrator access to run it. You can run several couches (for example, 0.10, 0.11, 1.0 releases) side-by-side.

Supported Platforms

Build CouchDB is developed and tested on the following operating systems:

  • Red Hat Enterprise Linux Server release 5.5 (Tikanga)
  • Debian GNU/Linux 5.0 (Lenny)
  • Ubuntu 10.04 LTS (Lucid Lynx)
  • Ubuntu 9.10 (Karmic Koala)
  • Fedora 13
  • Mac OS X
  • OpenSUSE 11.3
  • Scientific Linux 5.3
  • Solaris 10, OpenSolaris

The following systems are planned for support in the near future:

  • MS Windows Vista, Windows 7

Requirements

You need only a few packages provided by the operating system. Copy and paste the commands below.

On Fedora:

sudo yum install gcc gcc-c++ libtool libcurl-devel \
                 zlib-devel openssl-devel rubygem-rake

On Red Hat Enterprise Linux:

The procedure is the same as Fedora, with the following exceptions:

  • Also install the ruby-rdoc package.
  • Instead of libcurl-devel install curl-devel.
  • Install backported packages rubygems and rubygem-rake and from the Fedora EPEL 5 repository. Check the "EPEL 5" section, either i386 or x86_64; then "Jump to letter" R.
* Do not use yum to install rubygem-rake or libcurl-devel.
* Use [Ruby Version Manager][rvm] to install the latest release of Ruby v 1.8.7.  This installed a version of rake, too.
* Download and install the latest release of [cURL][curl] from source.

On Debian, first install sudo and add yourself to /etc/sudoers.

su -
apt-get install sudo
visudo

On Ubuntu and Debian:

sudo apt-get install make gcc zlib1g-dev libssl-dev libreadline5-dev rake

On OpenSUSE:

sudo zypper install flex lksctp-tools-devel zip \
			rubygem-rake gcc-c++ make m4 zlib-devel \
			libopenssl-devel libtool automake libcurl-devel

On Scientific Linux

sudo yum install --enablerepo=dag gcc gcc-c++ libtool zlib-devel openssl-devel \
			autoconf213

On Solaris

This build only supports the OpenCSW toolchain. If you do not use OpenCSW, I wish you the best. If you have success, let me know!

The SunStudio tools are required:

sudo pkg install ss-dev

Also, OpenCSW packages are needed.

pkgadd -d http://mirror.opencsw.org/opencsw/pkg_get.pkg # Answer all questions affirmatively

Add CSW to your path. This must always be in the PATH. Every time you log in, you must set the correct $PATH (or make it automatic in .profile).

PATH=/opt/csw/bin:$PATH

Change the package archive (ibiblio URL is down) by running vi /opt/csw/etc/pkg-get.conf and setting url=ftp://ftp.ibiblio.org/pub/mirrors/opencsw/current. Save and exit, then run:

pkg-get updatecatalog

Finally, install Rake from OpenCSW:

sudo pkg-get install ruby rake # Also perhaps "git"

On Mac OS X, install Xcode.

Getting the Code

You will need the Git tool. Check out the code and pull in the third-party submodules.

git clone git://github.com/couchone/build-couchdb
cd build-couchdb
git submodule init
git submodule update

How to Build CouchDB

Just run Rake.

rake

CouchDB and all its dependencies will install in the build/. To uninstall, simply delete that directory.

Usage

It's CouchDB! Just type couchdb. (But remember the path)

$ build/bin/couchdb
Apache CouchDB 0.12.0aa63efb6-git (LogLevel=info) is starting.
Apache CouchDB has started. Time to relax.
[info] [<0.33.0>] Apache CouchDB has started on http://127.0.0.1:5984/

You can of course call it by absolute path. If your username is amit and you checked out the code in your home directory, you would run:

/home/amit/build-couchdb/build/bin/couchdb

Conveniently Add CouchDB to the PATH

The build process creates a small shell script, build/env.sh. The script will add the buid to your shell's $PATH. This will only affect that shell session, other terminals or shell sessions will not change. (This is on purpose, to isolate CouchDB, so that it is easy to remove, or so multiple versions can be installed side-by-side.)

Simply source the script when you want to use CouchDB.

. build/env.sh

Your working directory needn't be anywhere special when sourcing the file. It can be processed from anywhere. The idea is, when you are working, you realize you need couchdb, just type . ~/my/stuff/code/build-couchdb/build/env.sh or whatever and it will work.

You can source the file as often as you like. Subsequent exection will not do anything.

. build/env.sh
. build/env.sh # Sourcing with wild abandon!

If the file is read from a script or in a pipeline, it will execute silently (by detecting whether it is connected to a TTY terminal).

Cheat Codes

Build CouchDB supports some fancy tricks by entering cheat codes to the Rake command.

Build any Git branch or tag of Erlang/OTP

Add a erl_checkout parameter with the commit id, branch name, or tag name.

For example, to build with Erlang R13B04 release:

rake erl_checkout="OTP_R13B04"

Build any Git branch or tag of CouchDB

Add a git parameter with the repository URL, then a space, then the branch, tag, or commit hash. (Remember to quote all of those so Rake sees the space.)

Want to build GeoCouch? No problem.

rake git="git://github.com/vmx/couchdb geocouch"

CouchDB Plugins

Any CouchDB plugin can be loaded remotely from Git, built, and installed into the final CouchDB system.

rake plugin="git://github.com/vmx/couchdb origin/gc-separate"

Multiple plugins can be processed together:

rake plugins="git://github.com/vmx/couchdb origin/gc-separate,git://github.com/somebody/whatever some_tag"

(Both plugin and plugins supports comma-separated lists; use whichever you remember better.)

Install CouchDB somewhere besides build/.

Add an install parameter to place the final couchdb binaries anywhere.

Build CouchDB makes it simple to install several couchdb versions side-by-side.

rake git="git://github.com/vmx/couchdb geocouch" install=geocouch
rake git="git://git.apache.org/couchdb.git trunk" install=trunk
for tag in 1.0.1 11.0 11.1; do
    rake git="git://git.apache.org/couchdb.git tags/$tag" install=$tag
done

Note that install needs to be an absolute path. Use:

`pwd`/geocouch

e.g. creates the directory geocouch in your current directory.

For side-by-side installs there is a small shortcut to avoid rebuilding Erlang: use the couchdb_build variable instead, which will install CouchDB separately from its dependencies. Just remember never to move or delete the dependencies!

rake install=/dependencies/go/here couchdb_build=/but/couch/goes/here

Get a manifest of all the components

To get a better idea of exactly what is going on, add a manifest parameter.

rake manifest=1

That will produce additional files in build/manifest which indicate which package (icu, erlang, spidermonkey, etc) owns which files within build. A trick I do a lot is cat build/manifest/couchdb | xargs rm to "uninstall" only couchdb so I can try a rebuild.

I have no idea how manifest interacts with install as I have never used them together.

Do not strip down Erlang/OTP

Build CouchDB strips many modules out of the Erlang platform to reduce disk usage. (You can see which ones at the top of tasks/erlang.rake.) To indicate that a package should be kept, set the otp_keep variable to space-separated library names.

rake otp_keep="compiler eunit"

Or, you can keep them all this way:

rake otp_keep="*"

How to build only Erlang, couchjs, and OTP so you can build your own CouchDB elsewhere

There is a special shortcut task to build everything CouchDB needs (i.e. its dependencies).

rake couchdb:deps otp_keep="*"

Be careful not to build the couchdb target because after it completes, it will delete Erlang components needed for building (but not running). Next, there is a simple task which outputs a sh script used to configure any CouchDB checkout.

rake --silent environment:configure

The output will look similar to this:

export PATH="/Users/jhs/src/build-couchdb/build/bin:$PATH"
LDFLAGS='-R/Users/jhs/src/build-couchdb/build/lib -L/Users/jhs/src/build-couchdb/build/lib' CFLAGS='-I/Users/jhs/src/build-couchdb/build/include/js -I/Users/jhs/src/build-couchdb/build/lib/erlang/usr/include' ./configure

In the CouchDB source, paste the above code after running ./bootstrap. Next, you can run make or make dev, or anything.

vim: tw=80

build-couchdb's People

Contributors

amedeo avatar janl avatar jhs avatar tcaddy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

couchtim

build-couchdb's Issues

rake hangs when installing libcap2-bin

System: Ubuntu 10.04 LTS

The rake process hangs on installing libcap2-bin if /etc/pam.d/common-* has been modified. The libcap installer launches an actual menu to select what to do, but rake doesn't switch to it, it just blocks.

Quick fix is to install libcap2-bin separately.

Rake mktmpdir issues means not compatbile with pre-1.8.7 Ruby

When trying to build Couch with an older version of Ruby (Mac OS X 10.5 Leopard ships with 1.8.6) the build fails due to a missing Dir mktmpdir method. If this dependency (hopefully no others are hiding after this one?) could be eliminated it would be much easier to build Couch on slightly older platforms/distros.

SpiderMonkey and os_process_error

Hi,

I'm trying to build CouchDB with help of build-couchdb. Everything seems to work, but when I query some view, CouchDB starts to throw out a lot of "reserved slot index out of range" and "{os_process_error, {exit_status,1}}".

Here's my procedure:

. build/env.sh
couchdb

I'm using IrisCouch's fork, the CouchDB version is 1.1.0, Erlang is R14B03 and Mac OS 10.6.7.

building ICU fails, when CC is set to "ccache gcc"

make[1]: Making `all' in `icuinfo'
generating dependency information for /Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/tools/icuinfo/icuinfo.cpp
i686-apple-darwin10-g++-4.2.1: gcc": No such file or directory
<command-line>: warning: missing terminating " character
g++   -I../../common  -I/Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/common -I/Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/tools/icuinfo/../toolutil -I/Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/tools/ctestfw  -I/Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/i18n -DU_PLATFORM=\"U_DARWIN\"  -DU_BUILD=\"i386-apple-darwin10.5.0\" -DU_HOST=\"i386-apple-darwin10.5.0\" -DU_CC=\"ccache gcc\" -DU_CXX=\"g++\" -g -O2 -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fno-common -c   -o icuinfo.o /Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/tools/icuinfo/icuinfo.cpp
i686-apple-darwin10-g++-4.2.1: gcc": No such file or directory
<command-line>: warning: missing terminating " character
/Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/tools/icuinfo/icuinfo.cpp:107: error: missing terminating " character
/Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/tools/icuinfo/icuinfo.cpp: In function ‘void cmd_version(UBool)’:
/Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/tools/icuinfo/icuinfo.cpp:107: error: expected primary-expression before ‘)’ token
/Users/jan/Work/build-couchdb/dependencies/icu4c-4_4/source/tools/icuinfo/icuinfo.cpp:84: warning: unused variable ‘status’
make[2]: *** [icuinfo.o] Error 1
make[1]: *** [all-recursive] Error 2
make: *** [all-recursive] Error 2
rake aborted!
Command failed with status (2): [make ...]

(See full trace by running task with --trace)

rake fails on Debian Lenny in Tracemonkey

I've followed the steps on couch.io for building without dependency hell on Debian Lenny 32-bit. However, this is a linux-vserver which runs on a 64-bit Ubuntu 10.04 host system. Maybe the configure script is making the wrong assumptions about the word size?

(07:29:17) frank [mika]:~/git/build-couchdb# file /bin/bash
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped

git clone git://github.com/couchone/build-couchdb
cd build-couchdb
git submodule init
git submodule update
rake

...

---------

Platform.

---------

hostname = frank
uname -m = x86_64
uname -r = 2.6.32-25-vserver
uname -s = Linux
uname -v = #44~ppa2-Ubuntu SMP Wed Oct 27 21:12:19 UTC 2010

...

c++ -o jsapi.o -c -I./dist/system_wrappers_js -include /root/git/build-couchdb/dependencies/js_src/config/gcc_hidden.h -DOSTYPE="Linux2.6" -DOSARCH=Linux -DEXPORT_JS_API -I/root/git/build-couchdb/dependencies/js_src -I. -I./dist/include -I./dist/include/nsprpub -I/root/git/build-couchdb/dependencies/js_src -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -pedantic -fno-strict-aliasing -pthread -pipe -DNDEBUG -DTRIMMED -O3 -fstrict-aliasing -DMOZILLA_CLIENT -include ./js-confdefs.h -Wp,-MD,.deps/jsapi.pp /root/git/build-couchdb/dependencies/js_src/jsapi.cpp
In file included from /root/git/build-couchdb/dependencies/js_src/nanojit/nanojit.h:277,
from /root/git/build-couchdb/dependencies/js_src/jsbuiltins.h:45,
from /root/git/build-couchdb/dependencies/js_src/jsapi.cpp:59:
/root/git/build-couchdb/dependencies/js_src/nanojit/Containers.h:164: error: integer constant is too large for 'long' type
make[1]: *** [jsapi.o] Error 1
make[1]: Leaving directory `/tmp/tracemonkey_build20101107-10375-oeuo6o'
make: *** [default] Error 2
git checkout HEAD configure.in
git clean -df .
Removing configure
rake aborted!
Command failed with status (2): [make ...]

(See full trace by running task with --trace)

rake problem on Mac OS 10.5.8

"rake aborted!
undefined method `mktmpdir' for Dir:Class
(See full trace by running task with --trace)"

This happened on Mac OS 10.5.8, withXcode 3.1.4 (but first with Xcode 3.1.2).

Full trace below. Any insights?

================================== eXO-coRTeXX:build-couchdb andrabr$ rake --trace
(in /Users/andrabr/Zero/RnD/Couch/build-couchdb) Invoke default (first_time) Invoke couchdb:clean_install (first_time) Invoke couchdb:build (first_time) Invoke erlang:build (first_time) Invoke known_distro (first_time) Invoke known_mac (first_time) Execute known_mac Invoke known_ubuntu (first_time) Execute known_ubuntu Invoke known_debian (first_time) Execute known_debian Invoke known_redhat (first_time) Execute known_redhat Invoke known_opensuse (first_time) Execute known_opensuse Invoke known_slf (first_time) Execute known_slf Invoke known_solaris (first_time) Execute known_solaris Execute known_distro Invoke build:os_dependencies (first_time) Invoke build:mac_dependencies (first_time) Invoke known_distro Execute build:mac_dependencies Invoke build:ubuntu_dependencies (first_time) Invoke known_distro Execute build:ubuntu_dependencies Invoke build:debian_dependencies (first_time) Invoke known_distro Execute build:debian_dependencies Invoke build:opensuse_dependencies (first_time) Invoke known_distro Execute build:opensuse_dependencies Invoke build:solaris_dependencies (first_time) Invoke known_distro Execute build:solaris_dependencies Execute build:os_dependencies Invoke environment:path (first_time) Invoke /Users/andrabr/Zero/RnD/Couch/build-couchdb/build/bin (first_time, not_needed) Invoke known_distro Execute environment:path Invoke /Users/andrabr/Zero/RnD/Couch/build-couchdb/build/bin/erl (first_time) Invoke /Users/andrabr/Zero/RnD/Couch/build-couchdb/build/bin/autoconf2.59 (first_time) Invoke /opt/csw/bin/gm4 (first_time) Invoke package:gm4 (first_time) Invoke known_distro Execute package:gm4 Execute /opt/csw/bin/gm4 Execute /Users/andrabr/Zero/RnD/Couch/build-couchdb/build/bin/autoconf2.59 Invoke environment:path rake aborted!
undefined method mktmpdir' for Dir:Class /Users/andrabr/Zero/RnD/Couch/build-couchdb/tasks/toolchain.rake:16 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:incall' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in execute' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in execute' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in send' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in send' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in send' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in send' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in send' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:instandard_exception_handling' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:inrun' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in standard_exception_handling' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:inrun' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 /usr/bin/rake:19:in `load' /usr/bin/rake:19

libcurl won't build on Mac OS X 10.5.8 (Intel)

Thanks for bundling libcurl.
However, now I'm having another possibly related issue on Mac OS X 10.5.8 (Intel).

docs/examples/Makefile.am: installing `./depcomp'
buildconf: libtool version 1.5.22 found.
i686-apple-darwin9.8.0 requires libtool 1.5.26 or newer installed.

I've just got a standard XCode installation. I'm not sure where this dependency is coming from.

Here's a full trace, just trying to build libcurl

$ rake --trace curl:build
(in /Users/cthaxton/prj/couchdb/build-couchdb)
** Invoke curl:build (first_time)
** Invoke known_distro (first_time)
** Execute known_distro
** Invoke environment:path (first_time)
** Invoke /Users/cthaxton/prj/couchdb/build-couchdb/build/bin (first_time, not_needed)
** Invoke known_distro
** Execute environment:path
** Invoke /Users/cthaxton/prj/couchdb/build-couchdb/build/bin/curl (first_time)
** Execute /Users/cthaxton/prj/couchdb/build-couchdb/build/bin/curl
./buildconf
buildconf: autoconf version 2.61 (ok)
buildconf: autom4te version 2.61 (ok)
buildconf: autoheader version 2.61 (ok)
buildconf: automake version 1.10 (ok)
buildconf: aclocal version 1.10 (ok)
buildconf: libtool version 1.5.22 (ok)
buildconf: libtoolize found
buildconf: GNU m4 version 1.4.6 (ok)
buildconf: running libtoolize
buildconf: running aclocal
buildconf: running aclocal hack to convert all mv to mv -f
buildconf: running autoheader
buildconf: cp lib/curl_config.h.in src/curl_config.h.in
buildconf: running autoconf
buildconf: running automake
docs/examples/Makefile.am: installing ./depcomp' buildconf: libtool version 1.5.22 found. i686-apple-darwin9.8.0 requires libtool 1.5.26 or newer installed. git ls-files --others --ignored --exclude-standard | xargs rm || true rake aborted! Command failed with status (1): [./buildconf...] /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:995:inblock in sh'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1010:in call' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1010:insh'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1094:in sh' /Users/cthaxton/prj/couchdb/build-couchdb/tasks/curl.rake:12:inblock (3 levels) in <top (required)>'
/Users/cthaxton/prj/couchdb/build-couchdb/tasks/curl.rake:11:in chdir' /Users/cthaxton/prj/couchdb/build-couchdb/tasks/curl.rake:11:inblock (2 levels) in <top (required)>'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:in call' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:inblock in execute'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:in each' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:inexecute'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:597:in block in invoke_with_call_chain' /Users/cthaxton/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:inmon_synchronize'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:607:inblock in invoke_prerequisites'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:604:in each' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:604:ininvoke_prerequisites'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:596:in block in invoke_with_call_chain' /Users/cthaxton/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:inmon_synchronize'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:583:ininvoke'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:inblock (2 levels) in top_level'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:in each' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:inblock in top_level'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2023:intop_level'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2001:in block in run' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1998:in run' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/bin/rake:31:in<top (required)>'
/Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in load' /Users/cthaxton/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in

'

rake couchdb_build=foo_dir causes configure failure

I cloned build-couchdb, did the basic setup and ran 'rake' successfully. Trying to build a different couchdb branch and putting the output in a different build directory caused a failure during configure.

The commands I ran are:

git clone [email protected]:couchone/build-couchdb.git
cd build-couchdb
git submodule init
git submodule update
rake
rake git="git://github.com/fdmanana/couchdb btree_cache_and_doc_cache" couchdb_build=cache_btree_and_doc

The output around the failure is:

...
Removing configure
git clone 'git://github.com/fdmanana/couchdb' '/home/tim/c/build-couchdb/git-build/git%3A%2F%2Fgithub.com%2Ffdmanana%2Fcouchdb'
Initialized empty Git repository in /home/tim/c/build-couchdb/git-build/git%3A%2F%2Fgithub.com%2Ffdmanana%2Fcouchdb/.git/
remote: Counting objects: 15658, done.
remote: Compressing objects: 100% (4188/4188), done.
remote: Total 15658 (delta 12192), reused 14592 (delta 11346)
Receiving objects: 100% (15658/15658), 3.28 MiB | 68 KiB/s, done.
Resolving deltas: 100% (12192/12192), done.
git checkout btree_cache_and_doc_cache
Branch btree_cache_and_doc_cache set up to track remote branch btree_cache_and_doc_cache from origin.
Switched to a new branch 'btree_cache_and_doc_cache'
git reset --hard
HEAD is now at b5972f3 Adding document cache (per DB) with parameters size (max number of documents) and policy (lru/mru) configurable in the .ini config.
git clean -f -d
git ls-files --others -i --exclude-standard | xargs rm -v || true
rm: missing operand
Try `rm --help' for more information.
./bootstrap
You have bootstrapped Apache CouchDB, time to relax.

Run `./configure' to configure the source before you install.
env LDFLAGS='-R/home/tim/c/build-couchdb/build/lib -L/home/tim/c/build-couchdb/build/lib' CFLAGS='-I/home/tim/c/build-couchdb/build/include/js' /home/tim/c/build-couchdb/git-build/git%3A%2F%2Fgithub.com%2Ffdmanana%2Fcouchdb/configure --prefix=cache_btree_and_doc --with-erlang=/home/tim/c/build-couchdb/build/lib/erlang/usr/include
configure: error: expected an absolute directory name for --prefix: cache_btree_and_doc
git ls-files --others --ignored --exclude-standard | xargs rm -vf
...

It should use "--prefix=/home/tim/c/build-couchdb/cache_btree_and_doc".

rake --silent environment:configure isn't silent

I get junk in my shell script when running:

$ rake --silent environment:configure > ../do-configure.sh

The file contains:

ubuntu does not need {"/opt/csw/bin/gm4"=>"gm4"}
ubuntu does not need {"/opt/csw/bin/gm4"=>"gm4"}
Package dependency for ubuntu: {"/usr/bin/python"=>"python"}
export PATH="/home/tim/c/build-couchdb-r14/build/bin:$PATH"
env LDFLAGS='-R/home/tim/c/build-couchdb-r14/build/lib -L/home/tim/c/build-couchdb-r14/build/lib' CFLAGS='-I/home/tim/c/build-couchdb-r14/build/include/js' ./configure --with-erlang=/home/tim/c/build-couchdb-r14/build/lib/erlang/usr/include

The first three lines shouldn't be there.

couch_icu_driver.so: mach-o, but wrong architecture

Just built couchdb on Mac OS 10.5.8, presumably successfully (no error message, although no glorious "All done, time to Relax" either ;-)

Attempt to launch it produces an error:

Apache CouchDB 1.0.1 (LogLevel=info) is starting.

=CRASH REPORT==== 8-Nov-2010::21:59:27 ===
crasher:
initial call: application_master:init/4
pid: <0.31.0>
registered_name: []
exception exit: {bad_return,
                    {{couch_app,start,
                         [normal,
                          ["/Users/andrabr/Zero/RnD/CouchOne/build-couchdb/build/etc/couchdb/default.ini",
                           "/Users/andrabr/Zero/RnD/CouchOne/build-couchdb/build/etc/couchdb/local.ini"]]},
                     {'EXIT',
                         "dlopen(/Users/andrabr/Zero/RnD/CouchOne/build-couchdb/build/lib/couchdb/erlang/lib/couch-1.0.1/priv/lib/couch_icu_driver.so, 2): no suitable image found.  Did find:\n\t/Users/andrabr/Zero/RnD/CouchOne/build-couchdb/build/lib/couchdb/erlang/lib/couch-1.0.1/priv/lib/couch_icu_driver.so: mach-o, but wrong architecture"}}}
  in function  application_master:init/4
ancestors: [<0.30.0>]
messages: [{'EXIT',<0.32.0>,normal}]
links: [<0.30.0>,<0.7.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 1597
stack_size: 24
reductions: 232

neighbours:

=INFO REPORT==== 8-Nov-2010::21:59:27 ===
application: couch
exited: {bad_return,{{couch_app,start,
                                [normal,
                                 ["/Users/andrabr/Zero/RnD/CouchOne/build-couchdb/build/etc/couchdb/default.ini",
                                  "/Users/andrabr/Zero/RnD/CouchOne/build-couchdb/build/etc/couchdb/local.ini"]]},
                     {'EXIT',"dlopen(/Users/andrabr/Zero/RnD/CouchOne/build-couchdb/build/lib/couchdb/erlang/lib/couch-1.0.1/priv/lib/couch_icu_driver.so, 2): no suitable image found.  Did find:\n\t/Users/andrabr/Zero/RnD/CouchOne/build-couchdb/build/lib/couchdb/erlang/lib/couch-1.0.1/priv/lib/couch_icu_driver.so: mach-o, but wrong architecture"}}}
type: temporary

I am open to suggestions...

Bundle libcurl dependency

The autoconf for CouchDB does not like the version of libcurl installed on Mac OS X 10.5 Leopard, and it is not obvious how to specify a custom path to a newer install in e.g. /usr/local. If this were bundled, CouchDB would be easier to build on older platforms.

Rake undefined method `[]' for nil:NilClass, on EC2 with Amazon default AMI

After getting dependencies:
sudo yum install git gcc gcc-c++ libtool libcurl-devel zlib-devel openssl-devel
wget http://rubyforge.org/frs/download.php/56872/rake-0.8.7.tgz # then installed...

I encountered the following error when using rake:
[ec2-user@ip-X-X-X-X build-couchdb]$ rake --trace
(in /home/ec2-user/build-couchdb)
/home/ec2-user/build-couchdb/tasks/distros.rb:53: warning: statement not reached
/home/ec2-user/build-couchdb/tasks/couchdb.rake:29: warning: (...) interpreted as grouped expression
rake aborted!
undefined method []' for nil:NilClass /home/ec2-user/build-couchdb/tasks/lib.rb:53:inpackage_dep'
/home/ec2-user/build-couchdb/tasks/toolchain.rake:14
/home/ec2-user/build-couchdb/tasks/toolchain.rake:10:in each' /home/ec2-user/build-couchdb/tasks/toolchain.rake:10 /usr/lib/ruby/site_ruby/1.8/rake.rb:1882:inin_namespace'
/usr/lib/ruby/site_ruby/1.8/rake.rb:910:in namespace' /home/ec2-user/build-couchdb/tasks/toolchain.rake:6 /usr/lib/ruby/site_ruby/1.8/rake.rb:1620:inload'
/usr/lib/ruby/site_ruby/1.8/rake.rb:1620:in load' /usr/lib/ruby/site_ruby/1.8/rake.rb:2451:inload_imports'
/usr/lib/ruby/site_ruby/1.8/rake.rb:2390:in raw_load_rakefile' /usr/lib/ruby/site_ruby/1.8/rake.rb:2017:inload_rakefile'
/usr/lib/ruby/site_ruby/1.8/rake.rb:2068:in standard_exception_handling' /usr/lib/ruby/site_ruby/1.8/rake.rb:2016:inload_rakefile'
/usr/lib/ruby/site_ruby/1.8/rake.rb:2000:in run' /usr/lib/ruby/site_ruby/1.8/rake.rb:2068:instandard_exception_handling'
/usr/lib/ruby/site_ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.