Skip to content

Instantly share code, notes, and snippets.

@No9
Created November 14, 2012 19:08
Show Gist options
  • Save No9/4074070 to your computer and use it in GitHub Desktop.
Save No9/4074070 to your computer and use it in GitHub Desktop.
Installing Erlang and CouchDb on OpenIndiana oi_151.1.7 X86

Installing Erlang and CouchDb on OpenIndiana oi_151.1.7 X86

Building on the great work of http://www.dev-eth0.de All commands below ran in one terminal as root (Watch that PATH doesn't disappear on you)

Erlang

Tested on R15B01 http://www.erlang.org/download/otp_src_R15B01.tar.gz which is also compatible with RIAK.

Install GNU M4 in packagemanager

# PATH=/usr/gcc/4.6/bin:/usr/gnu/bin:/usr/sbin:/usr/bin
# which m4 
/usr/gnu/bin

Link libncurses

# ln -s /usr/gnu/lib/libncurses.so.5 /usr/lib/libncurses.so.5

configure and make

#./configure --prefix=/opt/local
# make
# make install 

ICU

# wget http://download.icu-project.org/files/icu4c/4.8.1/icu4c-4_8_1-src.tgz
# tar xvf icu4c-4_8_1-src.tgz
# cd icu/source/
# ./runConfigureICU Solaris/GCC --prefix=/opt/local
# make
# make install 

Spidermonkey

# wget https://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
# tar xvf js-1.7.0.tar.gz
# cd js/src/config
# ln -s SunOS5.5.mk SunOS5.11_i86pc.mk
# cd ..
# mv config.mk config.mk.bak
# sed 's|NS_USE_NATIVE = 1|#NS_USE_NATIVE = 1|g' config.mk.bak > config.mk
# rm lock_SunOS.s
# gmake -f Makefile.ref
# JS_DIST=/opt/local gmake -f Makefile.ref export

CouchDb

# wget http://www.eu.apache.org/dist/couchdb/releases/1.2.0/apache-couchdb-1.2.0.tar.gz
# tar xvzf apache-couchdb-1.2.0.tar.gz
# PATH=/opt/local/bin:$PATH
# ./configure --prefix=/opt/local --with-js-include=/opt/local/include --with-js-lib=/opt/local/lib --with-erlang=/opt/local/lib/erlang/usr/include
# gmake
# gmake install

After the install couch was crashing as it didn't know where to find the ICU libs at runtime. I tried

LD_LIBRARY_PATH=/opt/local/lib/

But it didn't work so in the end I linked the ICU lib folder

ln -s /opt/local/lib/libicu* /usr/lib/

If couch continues to crash debug it with:

# erl -init_debug  -env ERL_LIBS /opt/local/lib/couchdb/erlang/lib/ -couch_ini
> application:load(couch), application:start(couch).

And look for 'file not found' errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment