Hi,
As far as I remember (I took notes), I did the following to successfully
install couchdb 1.2 on centos 6, after I got the same kind of error message
about spidermonkey...
Have a try ...
Hot to install couchdb 1.2 on centos6 :
yum update -y
sudo rpm -Uvh
http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
sudo yum install erlang
yum install gcc-c++
sudo yum install libicu-devel openssl-devel curl-devel make gcc erlang
js-devel libtool which
make
make install
Change "bind_address=0.0.0.0" in /usr/local/etc/couchdb/local.ini
sudo adduser -r --home /usr/local/var/lib/couchdb -M --shell
/bin/bash --comment "CouchDB Admin" couchdb
sudo chown -R couchdb: /usr/local/var/lib/couchdb /usr/local/var/log/couchdb
/usr/local/var/run/couchdb /usr/local/etc/couchdb
sudo ln -s /usr/local/etc/rc.d/couchdb /etc/init.d/couchdb
sudo chkconfig --add couchdb
sudo chkconfig --level 345 couchdb on
sudo service couchdb start
try it with futon. Hope it will be good
Thierry
-----Message d'origine-----
From: Michael Parker
Sent: Friday, May 25, 2012 12:28 AM
To: [email protected]
Subject: Trouble building from source on CentOS 5.6
Hi all,
I'm having trouble installing CouchDB 1.2 from source as described at
http://wiki.apache.org/couchdb/Installing_SpiderMonkey.
All the header files can be found in /usr/local/include/js/, and
/usr/local/lib looks correct:
$ ls /usr/local/lib/libmozjs185*
/usr/local/lib/libmozjs185-1.0.a /usr/local/lib/libmozjs185.so
/usr/local/lib/libmozjs185.so.1.0 /usr/local/lib/libmozjs185.so.1.0.0
I then run configure for CouchDB with:
./configure --with-js-lib=/usr/local/lib/
--with-js-include=/usr/local/include/js/
During the configure, it seems to be finding some Javascript headers:
checking jsapi.h usability... yes
checking jsapi.h presence... yes
checking for jsapi.h... yes
checking for JS_NewObject in -lmozjs... no
checking for JS_NewObject in -ljs... yes
checking for JS_NewCompartmentAndGlobalObject in -ljs... no
checking for JS_ThrowStopIteration in -ljs... no
checking for JS_GetStringCharsAndLength in -ljs... no
checking for JSScript*... no
But when I run make it quickly fails with:
In file included from couch_js/main.c:20:
couch_js/sm170.c: In function ‘req_status’:
couch_js/sm170.c:105: error: implicit declaration of function
‘INT_FITS_IN_JSVAL’
couch_js/sm170.c: In function ‘evalcx’:
couch_js/sm170.c:138: error: implicit declaration of function
‘JS_GetStringChars’
couch_js/sm170.c:138: error: assignment makes pointer from integer
without a cast
couch_js/sm170.c: In function ‘seal’:
couch_js/sm170.c:220: error: implicit declaration of function ‘JS_SealObject’
couch_js/sm170.c: At top level:
couch_js/sm170.c:236: error: initialization from incompatible pointer type
Note that, on another CentOS 5.6 box where for some mysterious reason
I was able to install CouchDB, running configure in the exact same way
seems to be finding the SpiderMonkey 1.8.5 headers:
checking jsapi.h presence... yes
checking for jsapi.h... yes
checking for JS_NewObject in -lmozjs... no
checking for JS_NewObject in -ljs... no
checking for JS_NewObject in -ljs3250... no
checking for JS_NewObject in -ljs32... no
checking for JS_NewObject in -lmozjs185-1.0... no
checking for JS_NewObject in -lmozjs185... yes
checking for JS_NewCompartmentAndGlobalObject in -lmozjs185... yes
checking whether JSOPTION_ANONFUNFIX is declared... yes
checking for JS_ThrowStopIteration in -lmozjs185... yes
checking for JS_GetStringCharsAndLength in -lmozjs185... yes
checking for JSScript*... no
Note that "checking for JS_NewObject in -lmozjs185" succeeds, and not
"checking for JS_NewObject in -ljs" like on my problematic box.
Running make afterward on this box succeeds.
So configure isn't finding the Spidermonkey 1.8.5 headers, and seem to
be picking up some other, wrong JS headers. Anyone know how I can fix
it?
Thanks,
Mike