Building Coda for Mac OS X

Without guidance, getting Coda up and running could be a bit tricky. Her's some help to the details. The instructions below are tested on an Apple PoweBook Titanium 667 MHz, running Mac OS X 10.3 (Panther) with the Develpoer CD installed, and on a similar iMac G4. If you try this on another system or use other versions than mentioned, there may be bits and pieces to figure out by yourself.

The versions indicated are per 2004-05-17. Do not try any older versions, but if newer versions are available, use them instead. If you do, some of the special tuning indicated may become unnecessary.

Get the necessary GNU libraries.

Some of the software from CMU makes use of the GNU readline library.

Download ftp://ftp.gnu.org/gnu/readline/readline-4.3.tar.gz

Also download the readline patches:

ftp://ftp.gnu.org/gnu/readline/readline-4.3-patches/readline43-001
ftp://ftp.gnu.org/gnu/readline/readline-4.3-patches/readline43-002
ftp://ftp.gnu.org/gnu/readline/readline-4.3-patches/readline43-003
ftp://ftp.gnu.org/gnu/readline/readline-4.3-patches/readline43-004
ftp://ftp.gnu.org/gnu/readline/readline-4.3-patches/readline43-005

Now unpack the tarball

cd readline-4.3
patch -p0 < ../readline43-001
patch -p0 < ../readline43-002
patch -p0 < ../readline43-003
patch -p0 < ../readline43-004
patch -p0 < ../readline43-005
./configure --disable-shared
make
sudo make install
cd ..

Get the libraries needed for Coda

Download the lightweight process library (lwp) (these are called threads nowadays) from
http://www.coda.cs.cmu.edu/pub/coda/src/lwp-1.11.tar.gz

Unpack the tarball and type:

cd lwp-1.11
./configure
make
make check
sudo make install
cd ..

Download the rvm library from http://www.coda.cs.cmu.edu/pub/coda/src/rvm-1.9.tar.gz

Unpack the tarball and type:

cd rvm-1.9
./configure
make
make check
sudo make install
cd ..

Download the rpc2 library from http://www.coda.cs.cmu.edu/pub/coda/src/rpc2-1.22.tar.gz

Unpack the tarball and type:

cd rpc2-1.22
./configure
make
make check
sudo make install
cd ../..

Finally, download the Coda distribution itself from http://www.coda.cs.cmu.edu/pub/coda/src/coda-6.0.6.tar.gz

Unpack the tarball and type:

cd coda-6.0.6
./configure --with-rvm=/usr/local --with-lwp=/usr/local --with-rpc2=/usr/local
echo "#define __BSD44__" >>coda-src/venus/worker.h
#Check that you have the file /usr/include/resolv.h (you should) and fix the config.h and Makeconf files with
echo "#define HAVE_RESOLV_H 1" >>config.h
echo 'LIBS:= $(LIBS) -lresolv' >>Makeconf
make
sudo make client-install
sudo make server-install

Now, you need to configure the Coda venus process. Type:

setenv PATH ${PATH}:/usr/local/sbin

sudo /usr/local/sbin/venus-setup testserver.coda.cs.cmu.edu 20000

Do NOT create /dev/cfs0 as suggested by the printout.

Finally, build and install the kernel extension using the instructions on the first page. When the kext is loaded, start venus using

sudo /usr/local/sbin/venus &

You should now be able to list the /coda directory. Use the terminal for this, not the Finder, i.e.

ls /coda

If the only thing you see is a file named NOT_REALLY_CODA, you haven't succeeded. Otherwise, something is definitely working. In that case try looking into the Coda group's test server. It's open to anyone:

ls /coda/testserver.coda.cs.cmu.edu

When you do this for the first time, you need to be connected to the Internet. If you have succeeded this far, a great lot of things is really working. Congratulations!