Spider Monkey Libraries
Hi,
I am trying to build the 2.0 preview on our custom hardware. I have built spider monkey separately. I did set the flags in the top level makefile to point to the directories containing spidermonkey.
However, upon building I get:
checking for pthread_create in -lpthread... no
checking for JS_NewContext in -lmozjs... no
checking for JS_NewContext in -ljs... no
checking for JS_NewContext in -ljs3250... no
checking for JS_NewContext in -ljs32... no
configure: error: Could not find the js library.
Is the Mozilla SpiderMonkey library installed?
make: *** [couchdb/Makefile] Error 1
What is the proper method to set the paths and environment so spidermonkey is found?
Thanks.
-Jon
Thanks. Are you supporting spidermonkey 1.8.5 or something lower.
I did fix the libraries problem but during the build I'm now hitting:
couch_js/main.c: In function 'execute_script':
couch_js/main.c:215: error: 'JSScript' undeclared (first use in this function)
couch_js/main.c:215: error: (Each undeclared identifier is reported only once
couch_js/main.c:215: error: for each function it appears in.)
I read on a previous thread http://comments.gmane.org/gmane.comp.db.couchdb.user/14197
that this may be due to use of 1.8.5. I am currently trying 1.8 but with similar results.
Jon, seems like there might be a versioning problem here as the errors say we can't find some of the symbols expected in the include directory.
This is the library we use: git://github.com/membase/spidermonkey.git
Hi,
I did a clone of that repository and was unable to build on either x86 or Tile. Can you give me the exact syntax I need so I can insure I'm doing this correctly.
I was able to build spidermonkey 1.8 from the spidermonkey site.
Do you know whether CouchBase links dynamically or statically to the js libraries?
-Jon
Hi Perry,
I am getting the following build error during the Couchbase 2.0 build. I built the spidermonkey libraries using the git repository you indicated. They are located in /usr/local/lib.
libtool: link: gcc -D_BSD_SOURCE -g -O2 -I/home/dev/erlang/lib/erlang/usr/include -I/usr/local/include/ -DXP_UNIX -o couchjs couchjs-http.o couchjs-main.o couchjs-utf8.o -L/usr/local/lib -L/opt/local/lib -lm -lcurl -ljs -lcrypt
/usr/bin/ld: cannot find -ljs
collect2: ld returned 1 exit status
make[4]: *** [couchjs] Error 1
make[4]: Leaving directory `/opt/membase-2.0-repo/couchdb/src/couchdb/priv'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/opt/membase-2.0-repo/couchdb/src/couchdb'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/opt/membase-2.0-repo/couchdb/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/opt/membase-2.0-repo/couchdb'
make: *** [make-install-couchdb] Error 2
-sh-4.1#
As per your other thread (http://www.couchbase.org/forums/thread/couchbase-startup) has this been resolved sufficiently?
For windows, we pass the following parameters to ./configure command
--with-js-lib=/cygdrive/c/spidermonkey-3.7a3-winnt6.1/dist/bin
--with-js-include=/cygdrive/c/spidermonkey-3.7a3-winnt6.1/dist/include
Where we put compiled spidermonkey package under /cygdrive/c/spidermonkey-3.7a3-winnt6.1/dist
For other platforms, we pass those parameters as
--with-js-lib=/opt/couchbase/lib \
--with-js-include=/opt/couchbase/include \
Where spidermonkey libraries are at lib and headers are at include directory.
You can do similar thing for your compiled spidermonkey libraries and header files.
You also can look at the config.log file under the couchdb directory to figure out exactly the reason why their spidermonkey libraries and header files are not found.
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!