My first Mac was a G4 mini which now mostly just serves an external drive to our home network as a Time Machine backup destination. Since it’s powered up 24/7, I’ve been wanting to make a bit more use of it as a server, which means Couch of course.
Unfortunately, the process wasn’t terribly “relaxing” — I couldn’t find a PPC build of CouchDB for Mac OS X on the ENTIRE INTERNETS. Yet fortunately, after who knows how many hours of blood, sweat and swearing under my breath, I was able to coax out a working build. For the 3 other CouchDB fans out there who still have a PowerPC machine plugged in and enjoy sysadmin pain, here are my build notes:
- First, install git if necessary and follow the instructions for the build-couchdb helper scripts until the “rake” part.
- To avoid a mktmpdir issue in rake, you’ll need to get a Ruby 1.8.7 version of Rake working. I don’t recommend this route, but when it was all said and done I moved aside /usr/bin/ruby, /usr/bin/rake and /usr/bin/gem (each to /usr/bin/X-orig) and then followed the first few steps of these instructions to get newer versions working out of /usr/local/bin instead.
- To avoid an unsupported architecture crash-and-burn, you’ll need to go into build-couchdb/tasks/erlang.rake and comment out a 64-bit option line:
#configure.push '--enable-darwin-64bit' if DISTRO == :osx
- The CouchDB build doesn’t like the Leopard version of libcurl, so build and install the latest from source. Temporarily move /usr/bin/curl-config to /usr/bin/curl-config-orig so the build process will use the right curl libraries. (Again, there’s maybe a better way to do this, but I wasn’t feeling picky at this point…)
If any of that made any sense, and I didn’t forget anything, you may even be able to reproduce this on your own PowerPC Mac at your own risk. PLEASE PLEASE PLEASE let me know if there’s a better way to get build-couchdb using the right versions of Ruby and libcurl without desperately mucking around in /usr/bin like I did.