Building OpenCog in a Linux Virtual Machine on Mac OS X

From OpenCog

For general instructions see Building OpenCog, for the partially complete native port, see Building OpenCog on Mac OS X with MacPorts.

These instructions will work for Mac OS X 10.8 and 10.9.

Get Tools

Download & install the latest version of each of:

  1. VirtualBox (do not run VirtualBox at the end of the installation wizard)
  2. Vagrant
  3. GitHub for Mac
  4. X Window System Server for Mac

Run Vagrant

The virtual machine created has all the dependencies required for working on cogutils, atomspace, moses, and opencog.

If you are new to vagrant, see or if you like to understand what vagrant is. Understanding the working of vagrant is not required for contributing to opencog.

The common steps after installing VirtualBox, git and Vagrant for your os and running a bash(on windows use the equivalent powershell commands) shell are:

mkdir opencog_repos
cd opencog_repos
git clone

# You can clone other repos if you so choose

ln -s $PWD/opencog/lib/Vagrantfile Vagrantfile
vagrant up
vagrant ssh

# The folder from which your run 'vagrant up' is accessiable at
# '/home/vagrant/opencog' on sshing into the virtual machine.

# Do your thing

vagrant halt

OpenCog First build

Immediately after setting up the virtual machine, you need to follow these instructions to build OpenCog for the first time.

In the vagrant@... window:

cd opencog
mkdir build
cd build
cmake ..

(Optional: If you have configured multiple processors for the virtual machine, you can specify that using the syntax "make -j4" to speed up the build process.)

If you begin to modify source code, see the manual building instructions at Building OpenCog and the git branching and pull request instructions at Development_standards.