couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Parker <michael.g.par...@gmail.com>
Subject Trouble building from source on CentOS 5.6
Date Thu, 24 May 2012 22:28:45 GMT
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

Mime
View raw message