Justin Walgran | 14 Jun 14:50 2011

Build from source failure on Ubuntu 11.04

I have tried and failed using both the 1.0.1 source and the 1.1.0 source.

I am using the directions on this wiki page, following the "10.04 and later" path
http://wiki.apache.org/couchdb/Installing_on_Ubuntu

make fails with the following errors (full make output attached)

***

gcc -DHAVE_CONFIG_H -I. -I../../..   -D_XOPEN_SOURCE  -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX   -D_BSD_SOURCE  -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17 -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr   -MT couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o `test -f 'couch_js/main.c' || echo './'`couch_js/main.c
couch_js/main.c: In function ‘evalcx’:
couch_js/main.c:62:9: warning: assignment makes pointer from integer without a cast
couch_js/main.c: In function ‘execute_script’:

couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in this function)

couch_js/main.c:215:5: note: each undeclared identifier is reported only once for each function it appears in
couch_js/main.c:215:15: error: ‘script’ undeclared (first use in this function)
couch_js/main.c: At top level:

***

Any guidance on getting this build to work? Thanks.

Justin

make  all-recursive
make[1]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb'
Making all in bin
make[2]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/bin'
sed -e "s|%ERL%|/usr/bin/erl|g" \
	    -e "s|%ICU_CONFIG%|/usr/bin/icu-config|g" \
	    -e "s|%bindir%|/usr/local/bin|g" \
	    -e "s|%localerlanglibdir%|/usr/local/lib/couchdb/erlang/lib|g" \
	    -e "s|%defaultini%|default.ini|g" \
	    -e "s|%localini%|local.ini|g" \
	    -e "s|%localconfdir%|/usr/local/etc/couchdb|g" \
	    -e "s|%localstatelogdir%|/usr/local/var/log/couchdb|g" \
	    -e "s|%localstatelibdir%|/usr/local/var/lib/couchdb|g" \
	    -e "s|%localstatedir%|/usr/local/var|g" \
	    -e "s|%bug_uri%|https://issues.apache.org/jira/browse/COUCHDB|g" \
	    -e "s|%package_author_address%|dev <at> couchdb.apache.org|g" \
	    -e "s|%package_author_name%|The Apache Software Foundation|g" \
	    -e "s|%package_name%|Apache CouchDB|g" \
	    -e "s|%version%|1.1.0|g" \
	    -e "s|%couchdb_command_name%|`echo couchdb | sed 's,x,x,'`|g" > \
	couchdb < couchdb.tpl
chmod +x couchdb
sed -e "s|%locallibbindir%|/usr/local/lib/couchdb/bin|g" \
	    -e "s|%bug_uri%|https://issues.apache.org/jira/browse/COUCHDB|g" \
	    -e "s|%package_author_address%|dev <at> couchdb.apache.org|g" \
	    -e "s|%package_author_name%|The Apache Software Foundation|g" \
	    -e "s|%package_name%|Apache CouchDB|g" \
	    -e "s|%version%|1.1.0|g" \
	    -e "s|%couchjs_command_name%|`echo couchjs | sed 's,x,x,'`|g" > \
	couchjs < couchjs.tpl
chmod +x couchjs
sed -e "s|%locallibbindir%|/home/local/AZVA-INT/jwalgran/Source/couchdb/src/couchdb/priv|g" \
	    -e "s|%bug_uri%|https://issues.apache.org/jira/browse/COUCHDB|g" \
	    -e "s|%package_author_address%|dev <at> couchdb.apache.org|g" \
	    -e "s|%package_author_name%|The Apache Software Foundation|g" \
	    -e "s|%package_name%|Apache CouchDB|g" \
	    -e "s|%version%|1.1.0|g" \
	    -e "s|%couchjs_command_name%|`echo couchjs | sed 's,x,x,'`|g" > \
	couchjs_dev < couchjs.tpl
chmod +x couchjs_dev
touch couchdb.1
if test -x "/usr/bin/help2man"; then \
	    make -f Makefile couchdb; \
	    /usr/bin/help2man --no-info --help-option="-h" --version-option="-V" \
	        --name="Apache CouchDB database server" ./couchdb --output couchdb.1; \
	fi
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/bin'
make[3]: `couchdb' is up to date.
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/bin'
touch couchjs.1
if test -x "/usr/bin/help2man"; then \
	    make -f Makefile couchjs; \
	    /usr/bin/help2man --no-info --help-option="-h" --version-option="-V" \
	        --name="Apache CouchDB JavaScript interpreter" ./couchjs --output couchjs.1; \
	fi
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/bin'
make[3]: `couchjs' is up to date.
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/bin'
make[2]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/bin'
Making all in etc
make[2]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc'
Making all in couchdb
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/couchdb'
sed -e "s|%bindir%|/usr/local/bin|g" \
	    -e "s|%localconfdir%|/usr/local/etc/couchdb|g" \
	    -e "s|%localdatadir%|/usr/local/share/couchdb|g" \
		-e "s|%localbuilddatadir%|/usr/local/share/couchdb|g" \
	    -e "s|%localstatelibdir%|/usr/local/var/lib/couchdb|g" \
	    -e "s|%localstatelogdir%|/usr/local/var/log/couchdb|g" \
	    -e "s|%localstaterundir%|/usr/local/var/run/couchdb|g" \
	    -e "s|%couchprivlibdir%|/usr/local/lib/couchdb/erlang/lib/couch-1.1.0/priv/lib|g" \
	    -e "s|%couchjs_command_name%|`echo couchjs | sed 's,x,x,'`|g" \
	< default.ini.tpl > default.ini
sed -e "s|%bindir%|/home/local/AZVA-INT/jwalgran/Source/couchdb/bin|g" \
	    -e "s|%localconfdir%|/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/couchdb|g" \
	    -e "s|%localdatadir%|/home/local/AZVA-INT/jwalgran/Source/couchdb/share|g" \
		-e "s|%localbuilddatadir%|/home/local/AZVA-INT/jwalgran/Source/couchdb/share|g" \
	    -e "s|%localstatelibdir%|/home/local/AZVA-INT/jwalgran/Source/couchdb/tmp/lib|g" \
	    -e "s|%localstatelogdir%|/home/local/AZVA-INT/jwalgran/Source/couchdb/tmp/log|g" \
	    -e "s|%localstaterundir%|/home/local/AZVA-INT/jwalgran/Source/couchdb/tmp/run|g" \
	    -e
"s|%couchprivlibdir%|/home/local/AZVA-INT/jwalgran/Source/couchdb/src/couchdb/priv/.libs|g" \
	    -e "s|%couchjs_command_name%|`echo couchjs_dev | sed 's,x,x,'`|g" \
	< default.ini.tpl > default_dev.ini
if test ! -f "local_dev.ini"; then \
	    cp local.ini local_dev.ini; \
	fi
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/couchdb'
Making all in default
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/default'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/default'
Making all in init
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/init'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/init'
Making all in launchd
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/launchd'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/launchd'
Making all in logrotate.d
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/logrotate.d'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/logrotate.d'
Making all in windows
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/windows'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc/windows'
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc'
if test "/bin/mkdir -p"; then \
	    /bin/mkdir -p init; \
	else \
	    if test ! -d init; then \
	        mkdir init; \
	    fi \
	fi
sed -e "s|%configure_input%|init/couchdb. Generated from init/couchdb.tpl by configure.|" \
	    -e "s|%bindir%|/usr/local/bin|" \
	    -e "s|%sysconfdir%|/usr/local/etc|" \
	    -e "s|%localstaterundir%|/usr/local/var/run/couchdb|" \
	    -e "s|%couchdb_command_name%|`echo couchdb | sed 's,x,x,'`|" \
	< init/couchdb.tpl > init/couchdb
sed -e "s|%localstatelogdir%|/usr/local/var/log/couchdb|g" < logrotate.d/couchdb.tpl > logrotate.d/couchdb
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc'
make[2]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/etc'
Making all in src
make[2]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/src'
Making all in couchdb
make[3]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/src/couchdb'
Making all in priv
make[4]: Entering directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/src/couchdb/priv'
/bin/bash ../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../..  
-D_XOPEN_SOURCE  -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
-I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
-I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js -I/usr/include/mozjs
-I/usr/local/include -I/opt/local/include -I/usr/local/include/js -I/opt/local/include/js
-DXP_UNIX   -I/usr/include  -L/usr/lib  -DXP_UNIX -DJS_THREADSAFE
-I/usr/include/xulrunner-1.9.2.17 -I/usr/include/xulrunner-1.9.2.17/nspr
-I/usr/include/nspr   -MT couch_icu_driver_la-couch_icu_driver.lo -MD -MP -MF
.deps/couch_icu_driver_la-couch_icu_driver.Tpo -c -o couch_icu_driver_la-couch_icu_driver.lo
`test -f 'icu_driver/couch_icu_driver.c' || echo './'`icu_driver/couch_icu_driver.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../.. -D_XOPEN_SOURCE -L/usr/local/lib
-L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/lib/erlang/usr/include
-I/usr/local/lib/erlang/usr/include -I/opt/local/lib/erlang/usr/include -I/usr/include
-I/usr/include/js -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
-I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX -I/usr/include -L/usr/lib -DXP_UNIX
-DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17 -I/usr/include/xulrunner-1.9.2.17/nspr
-I/usr/include/nspr -MT couch_icu_driver_la-couch_icu_driver.lo -MD -MP -MF
.deps/couch_icu_driver_la-couch_icu_driver.Tpo -c icu_driver/couch_icu_driver.c  -fPIC -DPIC -o .libs/couch_icu_driver_la-couch_icu_driver.o
mv -f .deps/couch_icu_driver_la-couch_icu_driver.Tpo .deps/couch_icu_driver_la-couch_icu_driver.Plo
/bin/bash ../../../libtool --tag=CC   --mode=link gcc -I/usr/include  -L/usr/lib  -DXP_UNIX
-DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17 -I/usr/include/xulrunner-1.9.2.17/nspr
-I/usr/include/nspr   -module -avoid-version -I/usr/include  -L/usr/lib   -L/usr/local/lib
-L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/lib/erlang/usr/include
-I/usr/local/lib/erlang/usr/include -I/opt/local/lib/erlang/usr/include -I/usr/include
-I/usr/include/js -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
-I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX  -lm
-L/usr/lib/xulrunner-devel-1.9.2.17/lib   -o couch_icu_driver.la -rpath
/usr/local/lib/couchdb/erlang/lib/couch-1.1.0/priv/lib
couch_icu_driver_la-couch_icu_driver.lo -licuuc -licudata -licui18n -L/usr/local/lib
-L/opt/local/lib -lpthread  -lcrypt
libtool: link: rm -fr  .libs/couch_icu_driver.la .libs/couch_icu_driver.lai .libs/couch_icu_driver.so
libtool: link: gcc -shared  .libs/couch_icu_driver_la-couch_icu_driver.o   -L/usr/lib
-L/usr/local/lib -L/opt/local/lib -lm -L/usr/lib/xulrunner-devel-1.9.2.17/lib -licuuc
-licudata -licui18n -lpthread -lcrypt    -Wl,-soname -Wl,couch_icu_driver.so -o .libs/couch_icu_driver.so
libtool: link: ( cd ".libs" && rm -f "couch_icu_driver.la" && ln -s "../couch_icu_driver.la"
"couch_icu_driver.la" )
cp spawnkillable/couchspawnkillable.sh couchspawnkillable
chmod +x couchspawnkillable
gcc -DHAVE_CONFIG_H -I. -I../../..   -D_XOPEN_SOURCE  -L/usr/local/lib -L/opt/local/lib
-I/usr/local/lib/erlang/usr/include -I/usr/lib/erlang/usr/include
-I/usr/local/lib/erlang/usr/include -I/opt/local/lib/erlang/usr/include -I/usr/include
-I/usr/include/js -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
-I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX   -D_BSD_SOURCE  -DXP_UNIX
-DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17 -I/usr/include/xulrunner-1.9.2.17/nspr
-I/usr/include/nspr   -MT couchjs-http.o -MD -MP -MF .deps/couchjs-http.Tpo -c -o couchjs-http.o
`test -f 'couch_js/http.c' || echo './'`couch_js/http.c
couch_js/http.c:309:5: warning: initialization from incompatible pointer type
couch_js/http.c:318:5: warning: initialization from incompatible pointer type
couch_js/http.c:323:5: warning: initialization from incompatible pointer type
couch_js/http.c:323:5: warning: excess elements in struct initializer
couch_js/http.c:323:5: warning: (near initialization for 'CouchHTTPFunctions[0]')
couch_js/http.c:324:5: warning: initialization from incompatible pointer type
couch_js/http.c:324:5: warning: excess elements in struct initializer
couch_js/http.c:324:5: warning: (near initialization for 'CouchHTTPFunctions[1]')
couch_js/http.c:325:5: warning: initialization from incompatible pointer type
couch_js/http.c:325:5: warning: excess elements in struct initializer
couch_js/http.c:325:5: warning: (near initialization for 'CouchHTTPFunctions[2]')
couch_js/http.c:326:5: warning: excess elements in struct initializer
couch_js/http.c:326:5: warning: (near initialization for 'CouchHTTPFunctions[3]')
couch_js/http.c: In function 'install_http':
couch_js/http.c:346:5: warning: passing argument 5 of 'JS_InitClass' from incompatible pointer type
/usr/include/js/jsapi.h:2110:1: note: expected 'JSNative' but argument is of type 'JSBool (*)(struct
JSContext *, struct JSObject *, uintN,  jsval *, jsval *)'
mv -f .deps/couchjs-http.Tpo .deps/couchjs-http.Po
gcc -DHAVE_CONFIG_H -I. -I../../..   -D_XOPEN_SOURCE  -L/usr/local/lib -L/opt/local/lib
-I/usr/local/lib/erlang/usr/include -I/usr/lib/erlang/usr/include
-I/usr/local/lib/erlang/usr/include -I/opt/local/lib/erlang/usr/include -I/usr/include
-I/usr/include/js -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
-I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX   -D_BSD_SOURCE  -DXP_UNIX
-DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17 -I/usr/include/xulrunner-1.9.2.17/nspr
-I/usr/include/nspr   -MT couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o
`test -f 'couch_js/main.c' || echo './'`couch_js/main.c
couch_js/main.c: In function 'evalcx':
couch_js/main.c:62:9: warning: assignment makes pointer from integer without a cast
couch_js/main.c: In function 'execute_script':
couch_js/main.c:215:5: error: 'JSScript' undeclared (first use in this function)
couch_js/main.c:215:5: note: each undeclared identifier is reported only once for each function it
appears in
couch_js/main.c:215:15: error: 'script' undeclared (first use in this function)
couch_js/main.c: At top level:
couch_js/main.c:251:5: warning: initialization from incompatible pointer type
couch_js/main.c:251:5: warning: excess elements in struct initializer
couch_js/main.c:251:5: warning: (near initialization for 'global_functions[0]')
couch_js/main.c:252:5: warning: initialization from incompatible pointer type
couch_js/main.c:252:5: warning: excess elements in struct initializer
couch_js/main.c:252:5: warning: (near initialization for 'global_functions[1]')
couch_js/main.c:253:5: warning: initialization from incompatible pointer type
couch_js/main.c:253:5: warning: excess elements in struct initializer
couch_js/main.c:253:5: warning: (near initialization for 'global_functions[2]')
couch_js/main.c:254:5: warning: initialization from incompatible pointer type
couch_js/main.c:254:5: warning: excess elements in struct initializer
couch_js/main.c:254:5: warning: (near initialization for 'global_functions[3]')
couch_js/main.c:255:5: warning: initialization from incompatible pointer type
couch_js/main.c:255:5: warning: excess elements in struct initializer
couch_js/main.c:255:5: warning: (near initialization for 'global_functions[4]')
couch_js/main.c:256:5: warning: initialization from incompatible pointer type
couch_js/main.c:256:5: warning: excess elements in struct initializer
couch_js/main.c:256:5: warning: (near initialization for 'global_functions[5]')
couch_js/main.c:257:5: warning: excess elements in struct initializer
couch_js/main.c:257:5: warning: (near initialization for 'global_functions[6]')
couch_js/main.c:266:5: warning: initialization from incompatible pointer type
make[4]: *** [couchjs-main.o] Error 1
make[4]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/src/couchdb/priv'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/src/couchdb'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/local/AZVA-INT/jwalgran/Source/couchdb'
make: *** [all] Error 2
Randall Leeds | 14 Jun 21:28 2011
Picon

Re: Build from source failure on Ubuntu 11.04

It looks as though you have installed spidermonkey somehow, not from
the xulrunner-*-dev packages:

"/usr/include/js/jsapi.h:2110:1: note: expected 'JSNative' but
argument is of type 'JSBool (*)(struct JSContext *, struct JSObject *,
uintN,  jsval *, jsval *)'"

Looking at my machine, I just realized that ubuntu is now shipping
1.8.5 version of spidermonkey as a separate libmozjs185 package, and
this is likely what you have installed.

To verify that is the case, check the output of `aptitude show libmozjs185-dev`.

There is an open ticket to include support for building with this
version of spidermonkey in the bug tracker right now.
However, until that lands you will not be able to build from source
with 1.8.5 present.
Uninstall libmozjs185 (if it doesn't require you to uninstall other
important things) and then follow the instructions for providing
./configure with the libs and includes from
/var/lib/xulrunner-devel-1.9.2.17

(And yes, it's confusing that xulrunner-1.9.2.17 includes a *lower* SM
version than 1.8.5)

Let me know if that helps!

-R

On Tue, Jun 14, 2011 at 05:50, Justin Walgran <jwalgran@...> wrote:
> I have tried and failed using both the 1.0.1 source and the 1.1.0 source.
>
> I am using the directions on this wiki page, following the "10.04 and later"
> path
> http://wiki.apache.org/couchdb/Installing_on_Ubuntu
>
> make fails with the following errors (full make output attached)
>
> ***
>
> gcc -DHAVE_CONFIG_H -I. -I../../..   -D_XOPEN_SOURCE  -L/usr/local/lib
> -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
> -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
> -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
> -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
> -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX   -D_BSD_SOURCE
> -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
> -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr   -MT
> couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o `test
> -f 'couch_js/main.c' || echo './'`couch_js/main.c
> couch_js/main.c: In function ‘evalcx’:
> couch_js/main.c:62:9: warning: assignment makes pointer from integer without
> a cast
> couch_js/main.c: In function ‘execute_script’:
>
> couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in this
> function)
>
> couch_js/main.c:215:5: note: each undeclared identifier is reported only
> once for each function it appears in
> couch_js/main.c:215:15: error: ‘script’ undeclared (first use in this
> function)
> couch_js/main.c: At top level:
>
> ***
>
> Any guidance on getting this build to work? Thanks.
>
> Justin
>

Justin Walgran | 15 Jun 15:54 2011

Re: Build from source failure on Ubuntu 11.04

Thank you for digging into my problem, Randall.

Running `aptitude remove libmozjs185-dev` did the trick. The 1.1.0 source is
now building successfully.

Justin

On Tue, Jun 14, 2011 at 3:28 PM, Randall Leeds <randall.leeds@...>wrote:

> It looks as though you have installed spidermonkey somehow, not from
> the xulrunner-*-dev packages:
>
> "/usr/include/js/jsapi.h:2110:1: note: expected 'JSNative' but
> argument is of type 'JSBool (*)(struct JSContext *, struct JSObject *,
> uintN,  jsval *, jsval *)'"
>
> Looking at my machine, I just realized that ubuntu is now shipping
> 1.8.5 version of spidermonkey as a separate libmozjs185 package, and
> this is likely what you have installed.
>
> To verify that is the case, check the output of `aptitude show
> libmozjs185-dev`.
>
> There is an open ticket to include support for building with this
> version of spidermonkey in the bug tracker right now.
> However, until that lands you will not be able to build from source
> with 1.8.5 present.
> Uninstall libmozjs185 (if it doesn't require you to uninstall other
> important things) and then follow the instructions for providing
> ./configure with the libs and includes from
> /var/lib/xulrunner-devel-1.9.2.17
>
> (And yes, it's confusing that xulrunner-1.9.2.17 includes a *lower* SM
> version than 1.8.5)
>
> Let me know if that helps!
>
> -R
>
> On Tue, Jun 14, 2011 at 05:50, Justin Walgran <jwalgran@...> wrote:
> > I have tried and failed using both the 1.0.1 source and the 1.1.0 source.
> >
> > I am using the directions on this wiki page, following the "10.04 and
> later"
> > path
> > http://wiki.apache.org/couchdb/Installing_on_Ubuntu
> >
> > make fails with the following errors (full make output attached)
> >
> > ***
> >
> > gcc -DHAVE_CONFIG_H -I. -I../../..   -D_XOPEN_SOURCE  -L/usr/local/lib
> > -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
> > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
> > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
> > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
> > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX   -D_BSD_SOURCE
> > -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
> > -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr   -MT
> > couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o
> `test
> > -f 'couch_js/main.c' || echo './'`couch_js/main.c
> > couch_js/main.c: In function ‘evalcx’:
> > couch_js/main.c:62:9: warning: assignment makes pointer from integer
> without
> > a cast
> > couch_js/main.c: In function ‘execute_script’:
> >
> > couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in this
> > function)
> >
> > couch_js/main.c:215:5: note: each undeclared identifier is reported only
> > once for each function it appears in
> > couch_js/main.c:215:15: error: ‘script’ undeclared (first use in this
> > function)
> > couch_js/main.c: At top level:
> >
> > ***
> >
> > Any guidance on getting this build to work? Thanks.
> >
> > Justin
> >
>
Frank Behrens | 4 Jul 20:24 2011
Picon

Re: Build from source failure on Ubuntu 11.04

Hello,

i followed  http://wiki.apache.org/couchdb/Installing_on_Ubuntu
but it's not working on fresh Ubuntu11.04  (for me)

Running `aptitude remove libmozjs185-dev` didn't do the trick either.

➜  apache-couchdb-1.1.0  .configure
.....
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether ln -s works... yes
checking for pthread_create in -lpthread... yes
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?
➜  apache-couchdb-1.1.0  cat /etc/ld.so.conf.d/xulrunner.conf
/usr/lib/xulrunner-1.9.2.17
/usr/lib/xulrunner-devel-1.9.2.17
➜  apache-couchdb-1.1.0  xulrunner -v
Mozilla XULRunner 1.9.2.17 - 20110424121034
➜  apache-couchdb-1.1.0

any guidance is dearly appreciated
Frank Behrens:

2011/6/14 Justin Walgran <jwalgran@...>

> I have tried and failed using both the 1.0.1 source and the 1.1.0 source.
>
> I am using the directions on this wiki page, following the "10.04 and
> later" path
> http://wiki.apache.org/couchdb/Installing_on_Ubuntu
>
> make fails with the following errors (full make output attached)
>
> ***
>
> gcc -DHAVE_CONFIG_H -I. -I../../..   -D_XOPEN_SOURCE  -L/usr/local/lib
> -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
> -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
> -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
> -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
> -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX   -D_BSD_SOURCE
> -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
> -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr   -MT
> couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o `test
> -f 'couch_js/main.c' || echo './'`couch_js/main.c
> couch_js/main.c: In function ‘evalcx’:
> couch_js/main.c:62:9: warning: assignment makes pointer from integer
> without a cast
> couch_js/main.c: In function ‘execute_script’:
>
> couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in this
> function)
>
> couch_js/main.c:215:5: note: each undeclared identifier is reported only
> once for each function it appears in
> couch_js/main.c:215:15: error: ‘script’ undeclared (first use in this
> function)
> couch_js/main.c: At top level:
>
> ***
>
> Any guidance on getting this build to work? Thanks.
>
> Justin
>

Frank Behrens:
  :mobile: +49 178 8862743

2011/6/15 Justin Walgran <jwalgran@...>

> Thank you for digging into my problem, Randall.
>
> Running `aptitude remove libmozjs185-dev` did the trick. The 1.1.0 source
> is
> now building successfully.
>
>
> Justin
>
> On Tue, Jun 14, 2011 at 3:28 PM, Randall Leeds <randall.leeds@...
> >wrote:
>
> > It looks as though you have installed spidermonkey somehow, not from
> > the xulrunner-*-dev packages:
> >
> > "/usr/include/js/jsapi.h:2110:1: note: expected 'JSNative' but
> > argument is of type 'JSBool (*)(struct JSContext *, struct JSObject *,
> > uintN,  jsval *, jsval *)'"
> >
> > Looking at my machine, I just realized that ubuntu is now shipping
> > 1.8.5 version of spidermonkey as a separate libmozjs185 package, and
> > this is likely what you have installed.
> >
> > To verify that is the case, check the output of `aptitude show
> > libmozjs185-dev`.
> >
> > There is an open ticket to include support for building with this
> > version of spidermonkey in the bug tracker right now.
> > However, until that lands you will not be able to build from source
> > with 1.8.5 present.
> > Uninstall libmozjs185 (if it doesn't require you to uninstall other
> > important things) and then follow the instructions for providing
> > ./configure with the libs and includes from
> > /var/lib/xulrunner-devel-1.9.2.17
> >
> > (And yes, it's confusing that xulrunner-1.9.2.17 includes a *lower* SM
> > version than 1.8.5)
> >
> > Let me know if that helps!
> >
> > -R
> >
> > On Tue, Jun 14, 2011 at 05:50, Justin Walgran <jwalgran@...>
> wrote:
> > > I have tried and failed using both the 1.0.1 source and the 1.1.0
> source.
> > >
> > > I am using the directions on this wiki page, following the "10.04 and
> > later"
> > > path
> > > http://wiki.apache.org/couchdb/Installing_on_Ubuntu
> > >
> > > make fails with the following errors (full make output attached)
> > >
> > > ***
> > >
> > > gcc -DHAVE_CONFIG_H -I. -I../../..   -D_XOPEN_SOURCE  -L/usr/local/lib
> > > -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
> > > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
> > > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
> > > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
> > > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX
> -D_BSD_SOURCE
> > > -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
> > > -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr   -MT
> > > couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o
> > `test
> > > -f 'couch_js/main.c' || echo './'`couch_js/main.c
> > > couch_js/main.c: In function ‘evalcx’:
> > > couch_js/main.c:62:9: warning: assignment makes pointer from integer
> > without
> > > a cast
> > > couch_js/main.c: In function ‘execute_script’:
> > >
> > > couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in this
> > > function)
> > >
> > > couch_js/main.c:215:5: note: each undeclared identifier is reported
> only
> > > once for each function it appears in
> > > couch_js/main.c:215:15: error: ‘script’ undeclared (first use in this
> > > function)
> > > couch_js/main.c: At top level:
> > >
> > > ***
> > >
> > > Any guidance on getting this build to work? Thanks.
> > >
> > > Justin
> > >
> >
>
Randall Leeds | 4 Jul 22:24 2011
Picon

Re: Build from source failure on Ubuntu 11.04

Looks like you're set up right to link to the xulrunner spidermonkey but
you'll still have to pass the --with-js-include and --with-js-lib options to
configure as in the 10.04 instructions.

I should have waited to update those instructions until after a release that
contains the changes for mozjs185. I'll go clean that up. Trunk should build
as in the 11.04 instructions, but 1.1 still needs these extra options to
find xulrunner's spidermonkey.

For now, if you follow the instructions for 10.04 you should have no
trouble.
On Jul 4, 2011 11:25 AM, "Frank Behrens" <fbehrens@...> wrote:
> Hello,
>
> i followed http://wiki.apache.org/couchdb/Installing_on_Ubuntu
> but it's not working on fresh Ubuntu11.04 (for me)
>
> Running `aptitude remove libmozjs185-dev` didn't do the trick either.
>
> ➜ apache-couchdb-1.1.0 .configure
> .....
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... no
> checking whether ln -s works... yes
> checking for pthread_create in -lpthread... yes
> 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?
> ➜ apache-couchdb-1.1.0 cat /etc/ld.so.conf.d/xulrunner.conf
> /usr/lib/xulrunner-1.9.2.17
> /usr/lib/xulrunner-devel-1.9.2.17
> ➜ apache-couchdb-1.1.0 xulrunner -v
> Mozilla XULRunner 1.9.2.17 - 20110424121034
> ➜ apache-couchdb-1.1.0
>
> any guidance is dearly appreciated
> Frank Behrens:
>
>
>
> 2011/6/14 Justin Walgran <jwalgran@...>
>
>> I have tried and failed using both the 1.0.1 source and the 1.1.0 source.
>>
>> I am using the directions on this wiki page, following the "10.04 and
>> later" path
>> http://wiki.apache.org/couchdb/Installing_on_Ubuntu
>>
>> make fails with the following errors (full make output attached)
>>
>> ***
>>
>> gcc -DHAVE_CONFIG_H -I. -I../../.. -D_XOPEN_SOURCE -L/usr/local/lib
>> -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
>> -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
>> -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
>> -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
>> -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX -D_BSD_SOURCE
>> -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
>> -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr -MT
>> couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o
`test
>> -f 'couch_js/main.c' || echo './'`couch_js/main.c
>> couch_js/main.c: In function ‘evalcx’:
>> couch_js/main.c:62:9: warning: assignment makes pointer from integer
>> without a cast
>> couch_js/main.c: In function ‘execute_script’:
>>
>> couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in this
>> function)
>>
>> couch_js/main.c:215:5: note: each undeclared identifier is reported only
>> once for each function it appears in
>> couch_js/main.c:215:15: error: ‘script’ undeclared (first use in this
>> function)
>> couch_js/main.c: At top level:
>>
>> ***
>>
>> Any guidance on getting this build to work? Thanks.
>>
>> Justin
>>
>
> Frank Behrens:
> :mobile: +49 178 8862743
>
>
>
> 2011/6/15 Justin Walgran <jwalgran@...>
>
>> Thank you for digging into my problem, Randall.
>>
>> Running `aptitude remove libmozjs185-dev` did the trick. The 1.1.0 source
>> is
>> now building successfully.
>>
>>
>> Justin
>>
>> On Tue, Jun 14, 2011 at 3:28 PM, Randall Leeds <randall.leeds@...
>> >wrote:
>>
>> > It looks as though you have installed spidermonkey somehow, not from
>> > the xulrunner-*-dev packages:
>> >
>> > "/usr/include/js/jsapi.h:2110:1: note: expected 'JSNative' but
>> > argument is of type 'JSBool (*)(struct JSContext *, struct JSObject *,
>> > uintN, jsval *, jsval *)'"
>> >
>> > Looking at my machine, I just realized that ubuntu is now shipping
>> > 1.8.5 version of spidermonkey as a separate libmozjs185 package, and
>> > this is likely what you have installed.
>> >
>> > To verify that is the case, check the output of `aptitude show
>> > libmozjs185-dev`.
>> >
>> > There is an open ticket to include support for building with this
>> > version of spidermonkey in the bug tracker right now.
>> > However, until that lands you will not be able to build from source
>> > with 1.8.5 present.
>> > Uninstall libmozjs185 (if it doesn't require you to uninstall other
>> > important things) and then follow the instructions for providing
>> > ./configure with the libs and includes from
>> > /var/lib/xulrunner-devel-1.9.2.17
>> >
>> > (And yes, it's confusing that xulrunner-1.9.2.17 includes a *lower* SM
>> > version than 1.8.5)
>> >
>> > Let me know if that helps!
>> >
>> > -R
>> >
>> > On Tue, Jun 14, 2011 at 05:50, Justin Walgran <jwalgran@...>
>> wrote:
>> > > I have tried and failed using both the 1.0.1 source and the 1.1.0
>> source.
>> > >
>> > > I am using the directions on this wiki page, following the "10.04 and
>> > later"
>> > > path
>> > > http://wiki.apache.org/couchdb/Installing_on_Ubuntu
>> > >
>> > > make fails with the following errors (full make output attached)
>> > >
>> > > ***
>> > >
>> > > gcc -DHAVE_CONFIG_H -I. -I../../.. -D_XOPEN_SOURCE -L/usr/local/lib
>> > > -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
>> > > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
>> > > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
>> > > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
>> > > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX
>> -D_BSD_SOURCE
>> > > -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
>> > > -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr -MT
>> > > couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o
couchjs-main.o
>> > `test
>> > > -f 'couch_js/main.c' || echo './'`couch_js/main.c
>> > > couch_js/main.c: In function ‘evalcx’:
>> > > couch_js/main.c:62:9: warning: assignment makes pointer from integer
>> > without
>> > > a cast
>> > > couch_js/main.c: In function ‘execute_script’:
>> > >
>> > > couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in
this
>> > > function)
>> > >
>> > > couch_js/main.c:215:5: note: each undeclared identifier is reported
>> only
>> > > once for each function it appears in
>> > > couch_js/main.c:215:15: error: ‘script’ undeclared (first use in this
>> > > function)
>> > > couch_js/main.c: At top level:
>> > >
>> > > ***
>> > >
>> > > Any guidance on getting this build to work? Thanks.
>> > >
>> > > Justin
>> > >
>> >
>>
Frank Behrens | 5 Jul 07:32 2011
Picon

Re: Build from source failure on Ubuntu 11.04

Thanks Randall, works fine, time to relax now, cheers,Frank

2011/7/4 Randall Leeds <randall.leeds@...>

> Looks like you're set up right to link to the xulrunner spidermonkey but
> you'll still have to pass the --with-js-include and --with-js-lib options
> to
> configure as in the 10.04 instructions.
>
> I should have waited to update those instructions until after a release
> that
> contains the changes for mozjs185. I'll go clean that up. Trunk should
> build
> as in the 11.04 instructions, but 1.1 still needs these extra options to
> find xulrunner's spidermonkey.
>
> For now, if you follow the instructions for 10.04 you should have no
> trouble.
> On Jul 4, 2011 11:25 AM, "Frank Behrens" <fbehrens@...> wrote:
> > Hello,
> >
> > i followed http://wiki.apache.org/couchdb/Installing_on_Ubuntu
> > but it's not working on fresh Ubuntu11.04 (for me)
> >
> > Running `aptitude remove libmozjs185-dev` didn't do the trick either.
> >
> > ➜ apache-couchdb-1.1.0 .configure
> > .....
> > checking whether stripping libraries is possible... yes
> > checking if libtool supports shared libraries... yes
> > checking whether to build shared libraries... yes
> > checking whether to build static libraries... no
> > checking whether ln -s works... yes
> > checking for pthread_create in -lpthread... yes
> > 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?
> > ➜ apache-couchdb-1.1.0 cat /etc/ld.so.conf.d/xulrunner.conf
> > /usr/lib/xulrunner-1.9.2.17
> > /usr/lib/xulrunner-devel-1.9.2.17
> > ➜ apache-couchdb-1.1.0 xulrunner -v
> > Mozilla XULRunner 1.9.2.17 - 20110424121034
> > ➜ apache-couchdb-1.1.0
> >
> > any guidance is dearly appreciated
> > Frank Behrens:
> >
> >
> >
> > 2011/6/14 Justin Walgran <jwalgran@...>
> >
> >> I have tried and failed using both the 1.0.1 source and the 1.1.0
> source.
> >>
> >> I am using the directions on this wiki page, following the "10.04 and
> >> later" path
> >> http://wiki.apache.org/couchdb/Installing_on_Ubuntu
> >>
> >> make fails with the following errors (full make output attached)
> >>
> >> ***
> >>
> >> gcc -DHAVE_CONFIG_H -I. -I../../.. -D_XOPEN_SOURCE -L/usr/local/lib
> >> -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
> >> -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
> >> -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
> >> -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
> >> -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX -D_BSD_SOURCE
> >> -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
> >> -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr -MT
> >> couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o
> `test
> >> -f 'couch_js/main.c' || echo './'`couch_js/main.c
> >> couch_js/main.c: In function ‘evalcx’:
> >> couch_js/main.c:62:9: warning: assignment makes pointer from integer
> >> without a cast
> >> couch_js/main.c: In function ‘execute_script’:
> >>
> >> couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in this
> >> function)
> >>
> >> couch_js/main.c:215:5: note: each undeclared identifier is reported only
> >> once for each function it appears in
> >> couch_js/main.c:215:15: error: ‘script’ undeclared (first use in this
> >> function)
> >> couch_js/main.c: At top level:
> >>
> >> ***
> >>
> >> Any guidance on getting this build to work? Thanks.
> >>
> >> Justin
> >>
> >
> > Frank Behrens:
> > :mobile: +49 178 8862743
> >
> >
> >
> > 2011/6/15 Justin Walgran <jwalgran@...>
> >
> >> Thank you for digging into my problem, Randall.
> >>
> >> Running `aptitude remove libmozjs185-dev` did the trick. The 1.1.0
> source
> >> is
> >> now building successfully.
> >>
> >>
> >> Justin
> >>
> >> On Tue, Jun 14, 2011 at 3:28 PM, Randall Leeds <randall.leeds@...m
> >> >wrote:
> >>
> >> > It looks as though you have installed spidermonkey somehow, not from
> >> > the xulrunner-*-dev packages:
> >> >
> >> > "/usr/include/js/jsapi.h:2110:1: note: expected 'JSNative' but
> >> > argument is of type 'JSBool (*)(struct JSContext *, struct JSObject *,
> >> > uintN, jsval *, jsval *)'"
> >> >
> >> > Looking at my machine, I just realized that ubuntu is now shipping
> >> > 1.8.5 version of spidermonkey as a separate libmozjs185 package, and
> >> > this is likely what you have installed.
> >> >
> >> > To verify that is the case, check the output of `aptitude show
> >> > libmozjs185-dev`.
> >> >
> >> > There is an open ticket to include support for building with this
> >> > version of spidermonkey in the bug tracker right now.
> >> > However, until that lands you will not be able to build from source
> >> > with 1.8.5 present.
> >> > Uninstall libmozjs185 (if it doesn't require you to uninstall other
> >> > important things) and then follow the instructions for providing
> >> > ./configure with the libs and includes from
> >> > /var/lib/xulrunner-devel-1.9.2.17
> >> >
> >> > (And yes, it's confusing that xulrunner-1.9.2.17 includes a *lower* SM
> >> > version than 1.8.5)
> >> >
> >> > Let me know if that helps!
> >> >
> >> > -R
> >> >
> >> > On Tue, Jun 14, 2011 at 05:50, Justin Walgran <jwalgran@...>
> >> wrote:
> >> > > I have tried and failed using both the 1.0.1 source and the 1.1.0
> >> source.
> >> > >
> >> > > I am using the directions on this wiki page, following the "10.04
> and
> >> > later"
> >> > > path
> >> > > http://wiki.apache.org/couchdb/Installing_on_Ubuntu
> >> > >
> >> > > make fails with the following errors (full make output attached)
> >> > >
> >> > > ***
> >> > >
> >> > > gcc -DHAVE_CONFIG_H -I. -I../../.. -D_XOPEN_SOURCE -L/usr/local/lib
> >> > > -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
> >> > > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
> >> > > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
> >> > > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
> >> > > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX
> >> -D_BSD_SOURCE
> >> > > -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
> >> > > -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr -MT
> >> > > couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o
> couchjs-main.o
> >> > `test
> >> > > -f 'couch_js/main.c' || echo './'`couch_js/main.c
> >> > > couch_js/main.c: In function ‘evalcx’:
> >> > > couch_js/main.c:62:9: warning: assignment makes pointer from integer
> >> > without
> >> > > a cast
> >> > > couch_js/main.c: In function ‘execute_script’:
> >> > >
> >> > > couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in
> this
> >> > > function)
> >> > >
> >> > > couch_js/main.c:215:5: note: each undeclared identifier is reported
> >> only
> >> > > once for each function it appears in
> >> > > couch_js/main.c:215:15: error: ‘script’ undeclared (first use in
> this
> >> > > function)
> >> > > couch_js/main.c: At top level:
> >> > >
> >> > > ***
> >> > >
> >> > > Any guidance on getting this build to work? Thanks.
> >> > >
> >> > > Justin
> >> > >
> >> >
> >>
>
Randall Leeds | 5 Jul 20:27 2011
Picon

Re: Build from source failure on Ubuntu 11.04

On Mon, Jul 4, 2011 at 22:32, Frank Behrens <fbehrens@...> wrote:
> Thanks Randall, works fine, time to relax now, cheers,Frank
>

Great! I updated the wiki to be more clear, as well.

> 2011/7/4 Randall Leeds <randall.leeds@...>
>
>> Looks like you're set up right to link to the xulrunner spidermonkey but
>> you'll still have to pass the --with-js-include and --with-js-lib options
>> to
>> configure as in the 10.04 instructions.
>>
>> I should have waited to update those instructions until after a release
>> that
>> contains the changes for mozjs185. I'll go clean that up. Trunk should
>> build
>> as in the 11.04 instructions, but 1.1 still needs these extra options to
>> find xulrunner's spidermonkey.
>>
>> For now, if you follow the instructions for 10.04 you should have no
>> trouble.
>> On Jul 4, 2011 11:25 AM, "Frank Behrens" <fbehrens@...> wrote:
>> > Hello,
>> >
>> > i followed http://wiki.apache.org/couchdb/Installing_on_Ubuntu
>> > but it's not working on fresh Ubuntu11.04 (for me)
>> >
>> > Running `aptitude remove libmozjs185-dev` didn't do the trick either.
>> >
>> > ➜ apache-couchdb-1.1.0 .configure
>> > .....
>> > checking whether stripping libraries is possible... yes
>> > checking if libtool supports shared libraries... yes
>> > checking whether to build shared libraries... yes
>> > checking whether to build static libraries... no
>> > checking whether ln -s works... yes
>> > checking for pthread_create in -lpthread... yes
>> > 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?
>> > ➜ apache-couchdb-1.1.0 cat /etc/ld.so.conf.d/xulrunner.conf
>> > /usr/lib/xulrunner-1.9.2.17
>> > /usr/lib/xulrunner-devel-1.9.2.17
>> > ➜ apache-couchdb-1.1.0 xulrunner -v
>> > Mozilla XULRunner 1.9.2.17 - 20110424121034
>> > ➜ apache-couchdb-1.1.0
>> >
>> > any guidance is dearly appreciated
>> > Frank Behrens:
>> >
>> >
>> >
>> > 2011/6/14 Justin Walgran <jwalgran@...>
>> >
>> >> I have tried and failed using both the 1.0.1 source and the 1.1.0
>> source.
>> >>
>> >> I am using the directions on this wiki page, following the "10.04 and
>> >> later" path
>> >> http://wiki.apache.org/couchdb/Installing_on_Ubuntu
>> >>
>> >> make fails with the following errors (full make output attached)
>> >>
>> >> ***
>> >>
>> >> gcc -DHAVE_CONFIG_H -I. -I../../.. -D_XOPEN_SOURCE -L/usr/local/lib
>> >> -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
>> >> -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
>> >> -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
>> >> -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
>> >> -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX -D_BSD_SOURCE
>> >> -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
>> >> -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr -MT
>> >> couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o couchjs-main.o
>> `test
>> >> -f 'couch_js/main.c' || echo './'`couch_js/main.c
>> >> couch_js/main.c: In function ‘evalcx’:
>> >> couch_js/main.c:62:9: warning: assignment makes pointer from integer
>> >> without a cast
>> >> couch_js/main.c: In function ‘execute_script’:
>> >>
>> >> couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in this
>> >> function)
>> >>
>> >> couch_js/main.c:215:5: note: each undeclared identifier is reported only
>> >> once for each function it appears in
>> >> couch_js/main.c:215:15: error: ‘script’ undeclared (first use in this
>> >> function)
>> >> couch_js/main.c: At top level:
>> >>
>> >> ***
>> >>
>> >> Any guidance on getting this build to work? Thanks.
>> >>
>> >> Justin
>> >>
>> >
>> > Frank Behrens:
>> > :mobile: +49 178 8862743
>> >
>> >
>> >
>> > 2011/6/15 Justin Walgran <jwalgran@...>
>> >
>> >> Thank you for digging into my problem, Randall.
>> >>
>> >> Running `aptitude remove libmozjs185-dev` did the trick. The 1.1.0
>> source
>> >> is
>> >> now building successfully.
>> >>
>> >>
>> >> Justin
>> >>
>> >> On Tue, Jun 14, 2011 at 3:28 PM, Randall Leeds <randall.leeds <at> gmail.com
>> >> >wrote:
>> >>
>> >> > It looks as though you have installed spidermonkey somehow, not from
>> >> > the xulrunner-*-dev packages:
>> >> >
>> >> > "/usr/include/js/jsapi.h:2110:1: note: expected 'JSNative' but
>> >> > argument is of type 'JSBool (*)(struct JSContext *, struct JSObject *,
>> >> > uintN, jsval *, jsval *)'"
>> >> >
>> >> > Looking at my machine, I just realized that ubuntu is now shipping
>> >> > 1.8.5 version of spidermonkey as a separate libmozjs185 package, and
>> >> > this is likely what you have installed.
>> >> >
>> >> > To verify that is the case, check the output of `aptitude show
>> >> > libmozjs185-dev`.
>> >> >
>> >> > There is an open ticket to include support for building with this
>> >> > version of spidermonkey in the bug tracker right now.
>> >> > However, until that lands you will not be able to build from source
>> >> > with 1.8.5 present.
>> >> > Uninstall libmozjs185 (if it doesn't require you to uninstall other
>> >> > important things) and then follow the instructions for providing
>> >> > ./configure with the libs and includes from
>> >> > /var/lib/xulrunner-devel-1.9.2.17
>> >> >
>> >> > (And yes, it's confusing that xulrunner-1.9.2.17 includes a *lower* SM
>> >> > version than 1.8.5)
>> >> >
>> >> > Let me know if that helps!
>> >> >
>> >> > -R
>> >> >
>> >> > On Tue, Jun 14, 2011 at 05:50, Justin Walgran <jwalgran@...>
>> >> wrote:
>> >> > > I have tried and failed using both the 1.0.1 source and the 1.1.0
>> >> source.
>> >> > >
>> >> > > I am using the directions on this wiki page, following the "10.04
>> and
>> >> > later"
>> >> > > path
>> >> > > http://wiki.apache.org/couchdb/Installing_on_Ubuntu
>> >> > >
>> >> > > make fails with the following errors (full make output attached)
>> >> > >
>> >> > > ***
>> >> > >
>> >> > > gcc -DHAVE_CONFIG_H -I. -I../../.. -D_XOPEN_SOURCE -L/usr/local/lib
>> >> > > -L/opt/local/lib -I/usr/local/lib/erlang/usr/include
>> >> > > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include
>> >> > > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js
>> >> > > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include
>> >> > > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX
>> >> -D_BSD_SOURCE
>> >> > > -DXP_UNIX -DJS_THREADSAFE -I/usr/include/xulrunner-1.9.2.17
>> >> > > -I/usr/include/xulrunner-1.9.2.17/nspr -I/usr/include/nspr -MT
>> >> > > couchjs-main.o -MD -MP -MF .deps/couchjs-main.Tpo -c -o
>> couchjs-main.o
>> >> > `test
>> >> > > -f 'couch_js/main.c' || echo './'`couch_js/main.c
>> >> > > couch_js/main.c: In function ‘evalcx’:
>> >> > > couch_js/main.c:62:9: warning: assignment makes pointer from integer
>> >> > without
>> >> > > a cast
>> >> > > couch_js/main.c: In function ‘execute_script’:
>> >> > >
>> >> > > couch_js/main.c:215:5: error: ‘JSScript’ undeclared (first use in
>> this
>> >> > > function)
>> >> > >
>> >> > > couch_js/main.c:215:5: note: each undeclared identifier is reported
>> >> only
>> >> > > once for each function it appears in
>> >> > > couch_js/main.c:215:15: error: ‘script’ undeclared (first use in
>> this
>> >> > > function)
>> >> > > couch_js/main.c: At top level:
>> >> > >
>> >> > > ***
>> >> > >
>> >> > > Any guidance on getting this build to work? Thanks.
>> >> > >
>> >> > > Justin
>> >> > >
>> >> >
>> >>
>>
>


Gmane