Russell, Welcome to the awesomeness of multi-architecture binaries :)
The key here is to make sure that Erlang, ICU, and couch_icu_driver are all compiled with the same architecture. 10.6 defaults to trying to link things as x86_64 where as Erlang will default to i386 if you don't use the --enable-darwin-64bit flag. And the ICU configure has a screwy thing in its configure system that prevents x86_64 compilation. There's a patch in the Homebrew [1] formula [2]. Once those are both built as x86_64 you should be able to get on swimmingly. HTH, Paul Davis [1] http://github.com/mxcl/homebrew [2] http://github.com/mxcl/homebrew/blob/master/Library/Formula/icu4c.rb On Fri, Feb 12, 2010 at 9:22 AM, Russell Brown <[email protected]> wrote: > Hi, > I have been following the instructions at > http://wiki.apache.org/couchdb/Installing_on_OSX to install couchdb from > source. I have a MacBook Pro from 2007-2008 (pre unibody) running snow > leopard. When I run "arch" I get i386. > > I am able to build everything following the instructions but when I start > couchdb I get the following crash report > > =INFO REPORT==== 12-Feb-2010::10:58:58 === > application: couch > exited: {bad_return,{{couch_app,start, > [normal, > > ["/Users/russell/couchdb/etc/couchdb/default.ini", > > "/Users/russell/couchdb/etc/couchdb/local.ini"]]}, > > {'EXIT',"dlopen(/Users/russell/couchdb/lib/couchdb/erlang/lib/couch-0.11.0b909351/priv/lib/couch_icu_driver.so, > 2): no suitable image found. Did > find:\n\t/Users/russell/couchdb/lib/couchdb/erlang/lib/couch-0.11.0b909351/priv/lib/couch_icu_driver.so: > mach-o, but wrong architecture"}}} > type: temporary > > > > I guessed that maybe the > > > /runConfigureICU MacOSX --with-library-bits=64 --disable-samples > --enable-static # if this fails for you try: ./configure --enable-64bit-libs > > was to blame so I tried building icu again without the 64 bit options. I > rebuilt couchdb and still had the same error when I tried to run it. In > desperation I removed icu and installed MacPorts and asked that to install > icu for me. I rebuilt couchdb again and still get the same error when I try > to start it. > > I googled around a bit. I can't find that exact error to do with couchdb but > I have found similar stuff that seems to be mainly people trying to build 32 > bit code on 64 bit machine. > > I'm sort of at a loss. I know I can use CouchDBX (in fact I have done before) > but I wanted to see if I could build from source (I guess not ;)) and try a > get a bit more control over my environment. I have one deployed website > backed by couchdb (on ubuntu) so I thought I'd be better trying to set up a > dev env closer to the deployed env. > > I know this is not strictly speaking a couchdb issue, but if anyone out there > has seen this before or can help I appreciate it. > > Thanks in advance > > Russell >
