Avida on FreeBSD
Something that I had some trouble with was getting Avida running on some of the operating systems I’m more familiar with, chief among them FreeBSD. This evening, I managed to put the pieces together for running Avida on FreeBSD 6.2. Of course, I’m checking out the development branch from the Devolab svn repository, so I’m not talking about the FreeBSD port of Avida.
Avida uses the Cmake project build tool, so the first thing needed is is to turn to the ports system and get current versions of Cmake and other dependencies installed. If one installed the “development” distribution in the FreeBSD install, you’ll already have most things. You will definitely need the GNU GCC compiler with G++.
Once you have a checkout of the Avida source, one needs to run “ccmake .” in the top-level directory of the tree. I’m just setting up targets of “avida” and “avida-viewer”, with “Debug” mode set. Once that works, one can launch the build process with “make”. That will churn for a while and crap out about half-way through. The issue? “log2” is not defined in one of the source files. You’ll need to edit “source/main/cTaskLib.cc” and look for “log2”. You’ll find a #define for it in a conditional for a Windows installation. Copy that line and paste it in outside the conditional. Re-start the make. Everything will be fine thereafter. (tcmalloc throws a lot of warnings. It does that everywhere, though, so just ignore it.)
I’ll see about getting a conditional around that for FreeBSD in the main distribution.