Building OpenCog in a Linux Virtual Machine on Mac OS X

From OpenCog
Jump to: navigation, search

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 https://www.vagrantup.com/docs/why-vagrant/ or https://www.vagrantup.com/docs/getting-started/ 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 https://github.com/opencog/opencog

# 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

exit
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 ..
make

(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.