Hi I wondered if anybody had instructions on how to build couchdb 1.3.0? I'm failing miserably with:

make[3]: Entering directory `/home/surfaceg/src/apache-couchdb-1.3.0/src/couch_index' /home/surfaceg/bin/erlc -I../../src/couchdb -o ebin/ src/couch_index.erl; src/couch_index.erl:none: internal error in parse_module; crash reason: {undef,[{epp,read_encoding,["src/couch_index.erl"],[]}, {compile,parse_module,1, [{file,"compile.erl"},{line,782}]}, {compile,'-internal_comp/4-anonymous-1-',2, [{file,"compile.erl"},{line,276}]}, {compile,fold_comp,3,[{file,"compile.erl"},{line,294}]}, {compile,internal_comp,4, [{file,"compile.erl"},{line,278}]}, {compile,'-do_compile/2-anonymous-0-',2, [{file,"compile.erl"},{line,152}]}]}

I've looked at the v1.1 installation instructions and followed them (with newer versions of the dependancies) but I fail when attempting to make couchdb

I wondered if anybody could assist? Perhaps a WebFaction guru could build it ;-)

Thanks Kevin

asked 10 May '13, 13:12

khwp's gravatar image

accept rate: 0%

You can install using the same command as the previous guide except change the couchdb version.

export PATH="$HOME/bin:$PATH"
mkdir -p $HOME/src

# Erlang R15B - source: http://www.erlang.org/download/otp_src_R15B.tar.gz
cd $HOME/src
wget 'http://mirror.ryansanden.com/couchdb-1.1.1/otp_src_R15B.tar.gz'
tar -xzf otp_src_R15B.tar.gz
cd otp_src_R15B
./configure --prefix=$HOME
make install

# icu - source: http://download.icu-project.org/files/icu4c/
cd $HOME/src
wget 'http://mirror.ryansanden.com/couchdb-1.1.1/icu4c-4_8_1_1-src.tgz'
tar -xzf icu4c-4_8_1_1-src.tgz
cd icu/source
./configure --prefix=$HOME
make install

# spidermonkey 1.8.5 - source: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
cd $HOME/src
wget 'http://mirror.ryansanden.com/couchdb-1.1.1/js185-1.0.0.tar.gz'
tar -xzf js185-1.0.0.tar.gz
cd js-1.8.5/js/src
./configure --prefix=$HOME
make install

# curl 7.24.0 - source: http://curl.haxx.se/download/curl-7.24.0.tar.gz
cd $HOME/src
wget 'http://mirror.ryansanden.com/couchdb-1.1.1/curl-7.24.0.tar.gz'
tar -xzf curl-7.24.0.tar.gz
cd curl-7.24.0
./configure --prefix=$HOME
make install

# make sure we're using the binaries in $HOME/bin and not a cached path
hash -r

# couchdb 1.3 - source: http://mirror.symnds.com/software/Apache/couchdb/source/1.3.0/apache-couchdb-1.3.0.tar.gz
cd $HOME/src
wget http://mirror.symnds.com/software/Apache/couchdb/source/1.3.0/apache-couchdb-1.3.0.tar.gz
tar -xzf apache-couchdb-1.3.0.tar.gz
cd apache-couchdb-1.3.0
export CURL_CONFIG=$HOME/bin/curl-config
./configure --prefix=$HOME --with-js-lib=$HOME/lib --with-js-include=$HOME/include/js --with-erlang=$HOME/lib/erlang/usr/include
make install
permanent link

answered 10 May '13, 17:01

timg's gravatar image

timg ♦♦
accept rate: 30%

thanks timg - that's a answered how I would build version 1.3.0 but unfortunately I still get the same error. So I cut and pasted the v1.1 instructions just to see and ... I still get the same error! I wonder if the problem is something to do with my environment? Kevin

(11 May '13, 02:41) khwp khwp's gravatar image

Thanks to Timg for the answer to building version 1.3.0 of Couchdb. Unfortunately, I still got the same error. So out of curiosity I cut and pasted the version 1.1.1 instructions and guess what! I got the same error! So the problem doesn't appear to be with version 1.3.0 as such. Perhaps it is my environment? Any help would be greatly appreciated.

The error I got when building 1.1.1 is:

if test -x "/usr/bin/help2man"; then /usr/bin/help2man --no-info --help-option="-h" --version-option="-V" --name="Apache CouchDB JavaScript interpreter" ./couchjs --output couchjs.1; fi cp stat_descriptions.cfg.in stat_descriptions.cfg make[4]: Leaving directory /home/surfaceg/src/apache-couchdb-1.1.1/src/couchdb/priv' make[4]: Entering directory/home/surfaceg/src/apache-couchdb-1.1.1/src/couchdb' modules={ find . -name "*.erl" -exec basename {} .erl \; | tr '\n' ','; echo ''; } | sed "s/,$//"; sed -e "s|%package_name%|Apache CouchDB|g" -e "s|%version%|1.1.1|g" -e "s|@modules@|$modules|g" -e "s|%localconfdir%|/home/surfaceg/etc/couchdb|g" -e "s|@defaultini@|default.ini|g" -e "s|@localini@|local.ini|g" > couch.app < couch.app.tpl chmod +x couch.app /home/surfaceg/bin/erlc couch.erl; couch.erl:none: internal error in parse_module; crash reason: {undef,[{epp,read_encoding,["couch.erl"],[]}, {compile,parse_module,1, [{file,"compile.erl"},{line,782}]}, {compile,'-internal_comp/4-anonymous-1-',2, [{file,"compile.erl"},{line,276}]}, {compile,fold_comp,3,[{file,"compile.erl"},{line,294}]}, {compile,internal_comp,4, [{file,"compile.erl"},{line,278}]}, {compile,'-do_compile/2-anonymous-0-',2, [{file,"compile.erl"},{line,152}]}]} make[4]: [couch.beam] Error 1 make[4]: Leaving directory /home/surfaceg/src/apache-couchdb-1.1.1/src/couchdb' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory/home/surfaceg/src/apache-couchdb-1.1.1/src/couchdb' make[2]: [all-recursive] Error 1 make[2]: Leaving directory /home/surfaceg/src/apache-couchdb-1.1.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/surfaceg/src/apache-couchdb-1.1.1' make: *** [all] Error 2

permanent link

answered 11 May '13, 02:46

khwp's gravatar image

accept rate: 0%

I've fixed it!!!

Short story: Clean out all of erlang detritus. Build again from scratch (using timg answer).

Longer story. When I first attempted the build of couchdb v1.3.0 I (foolishly?) decided to use the latest versions of all of the couchdb dependancies. One of the latest dependancies was R16 of erlang.

THAT R16 was the problem. It seems that epp:read_encoding/1 was introduced in R16 and of course earlier versions of compile.erl do not call that function. It looks like compile.beam is from R16 and epp.beam is from R15B03-1 or earlier.

However, trying to build an earlier version of erlang over the latest version didn't work as 'bits' were lying around so I just visually scanned the lib, bin etc directories for traces of erlang and deleted them. Then I rebuilt couch 1.3.0 from scratch but used the versions of the dependancies in the previous webfaction answer. Result? Happiness.

Thanks to timg for the time taken to answer my previous question.

permanent link

answered 11 May '13, 03:25

khwp's gravatar image

accept rate: 0%

@khwp - by any chance, could you explain the "clean out all of erlang detritus" part? I mean moreso, could you specify precisely which to rm? it worries me to think of deleting something because it looks like it might be an erlang piece :/

(10 Aug '13, 09:48) netpoetica netpoetica's gravatar image

The issue is that Erlang/OTP dropped support for parameterised modules, which CouchDB uses in its Mochiweb HTTP application. We've not put this into 1.3.0 as its a breaking change and will go into the next feature release instead.

If people are having trouble building from source in future, I strongly recommend reading the installation docs supplied in the source:

https://github.com/apache/couchdb/blob/1.3.x/INSTALL.Unix https://github.com/apache/couchdb/blob/1.3.x/DEVELOPERS

A fair number of dependencies changed in 1.3.0 so pay close attention!

permanent link

answered 14 May '13, 11:32

dch's gravatar image

accept rate: 0%

@dch - does this mean that you should not use erl R16B01? INSTALL.Unix shows < 16 - not clear to me whether this includes revisions. I would hope that erlang uses convention of no breaking changes in revisions with primary numbers unchanged, but who knows. It sounds like CouchDB is not going to be compataible with these erlang changes until 1.4.0 (which I imagine is a feature release)

(10 Aug '13, 10:01) netpoetica netpoetica's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 10 May '13, 13:12

question was seen: 2,158 times

last updated: 10 Aug '13, 10:03

Features & prices    Sign up    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
© Copyright 2003-2015 Swarma Limited - WebFaction is a service of Swarma Limited