couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sho Fukamachi <>
Subject Re: errors in tests
Date Sat, 03 May 2008 01:09:46 GMT
Hi Chris,

> Absolutely, but also by a bad Erlang install.

Well, I've installed Erlang again (several times, from R12-B source)  
without (visible) errors...

> I've had a very similar problem with Erlang on Debian Etch on an  
> AMD64 Linode. I was using the Erlang version available via apt-get,  
> and seeing problems like those you're seeing. I then tried to  
> install Erlang from source, only to see the configure script hang on  
> a line "checking floating point exceptions" (or similar). After some  
> research it turns out this was a compatibility problem with AMD64,  
> but you could disable HiPE to get around it. Which is what I did (./ 
> configure --disable-hipe IIRC), and things worked.

Maybe this is fixed in more recent versions, or maybe it was a Xen  
thing - this is a dedicated server. Anyway, I can't see any problems  
with Erlang, I can load the console fine. Do you recommend any tests I  
can do which might expose the error, if it exists?

> One symptom of this is if couchjs works as expected when run  
> manually from the command-line, e.g.
>  $ /usr/local/couchdb/bin/couchjs /usr/local/couchdb/share/couchdb/ 
> server/main.js
>  ["reset"]
>  true

# /usr/local/bin/couchjs /usr/local/share/couchdb/server/main.js
/usr/local/lib/couchdb/bin/couchjs: symbol lookup error: /usr/local/ 
lib/couchdb/bin/couchjs: undefined symbol: js_fgets

Doesn't work. And while we're at it,

# /tmp/couchdb/bin/couchjs /tmp/couchdb/share/couchdb/server/main.js
/tmp/couchdb/lib/couchdb/bin/couchjs: symbol lookup error: /tmp/ 
couchdb/lib/couchdb/bin/couchjs: undefined symbol: js_fgets

> If it doesn't work, there's probably something wrong with your  
> spidermonkey installation.

Wouldn't surprise me at all, although I've re-installed spidermonkey  
several times, with any number of variations on the theme. I've also  
copied the js executable to /usr/bin, just to get rid of the old 1.5.0  
version which used to be there - although I've been telling couch to  
look in the /usr/local/spidermonkey folders anyway.

# which js
# /usr/bin/js -v
JavaScript-C 1.7.0 2007-10-03

The spidermonkey page on Mozilla's site gives a small test, running a  
"perfect.js" test script - I've run that against every binary I can  
find on the system, they all work fine.

I'm kind of out of ideas as to how to troubleshoot the spidermonkey  
install any further. I've also tried to isolate the issue as much as  
possible - I just reinstalled spidermoney to /tmp/spidermonkey, then  
configured a new couchdb against that and made/installed it to another  
tmp dir .. exactly the same problem.

Still, I can't escape the feeling that CouchDB is not linking properly  
or something. I'm using this line to configure it:

./configure --with-js-lib=/usr/local/spidermonkey/lib64 --with-js- 

Which correspond to the correct directories. However I'm aware there  
are several other "with js-(something)=" options .. does it need more  
information? Does it need to be told where the binary is, too? Could  
it be a simple naming issue .. not expecting "lib64"?

Other areas of confusion for me include the necessity of the setting  
environment variables like

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/spidermonkey/lib

I've tried this as well, no difference that I could see. Another thing  
I'm not sure about is the exact commands to install spidermonkey, I  
followed the exact instructions in the wiki (and mailing list, and  
IRC) and it *seems* to work but I don't trust it. But maybe that's  
just me grasping at straws .. : )

Anyway thanks a lot for your patience and help - it's a tricky one.


> Cheers,
> Chris
> --
> Christopher Lenz
>  cmlenz at

View raw message