This guide will describe how to set up a build environment to compile chrono on several different arm platforms, Arch linux in general, Windows and OSX.

Hardware/OS

based on an ARM5 architecture: Pogoplug V4

based on an ARM6 architecture: Raspberry Pi

based on an ARM7 architecture: Galaxy Nexus

Intel i7-5960X Running Windows 8.1 and Arch Linux

Intel iMac running OSX 10.9 or 10.10 iMac (20-inch, Early 2009)

Installing Arch

Installation of arch onto the pogoplug can be done using the guide provided Here

Installation of arch onto the raspberry pi can be done using the guide provided Here

Installation of arch onto the galaxy nexus can be done using the Complete Linux Installer

For standard platform follow this guide ###Set up build environment

  • Update arch
  • Install development tools
  • Install cmake, git, wget, htop, screen, unzip, clang
pacman -Suy
pacman -S base-devel
pacman -S cmake git wget htop screen unzip

Test build of chrono

Note that you don’t have to follow my directory structure here, I use it because I feel that it’s a bit cleaner.

cd
mkdir builds
mkdir repos
cd repos
git clone https://github.com/projectchrono/chrono.git
cd ../builds
mkdir chrono
cd chrono
cmake ../../repos/chrono/src
cmake . -DCMAKE_BUILD_TYPE=Release
make

Enable more units

cd ~/builds/chrono
cmake . -DENABLE_UNIT_POSTPROCESS:BOOL=TRUE
cmake . -DENABLE_UNIT_FEM:BOOL=TRUE
cmake . -DENABLE_UNIT_TESTS:BOOL=TRUE
cmake . -DENABLE_UNIT_IRRLICHT:BOOL=TRUE

Irrlicht

Download irrlicht from here note that the glext.h header might need to be replaced.

pacman -S glew glm glfw glut
unzip irrlicht-1.8.1.zip*
cd irrlicht-1.8.1/source/Irrlicht/
wget http://sourceforge.net/p/irrlicht/code/HEAD/tree/trunk/source/Irrlicht/glext.h?format=raw
mv glext.h glext.h_old
mv glext.h\?format\=raw glext.h
make sharedlib
make install

Setting up buildbot

Most of this is taken from the buildbot first run documentation.

It is possible that the /tmp partition is too small, in this case run the following line with the desired size, in this case 1024M.

mount -t tmpfs tmpfs /tmp -o size=1024M,mode=1777,remount

Increase swap size for large builds

dd if=/dev/zero of=/swapfile bs=1M count=1024
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
nano /etc/fstab 
#add the following: /swapfile none swap defaults 0 0
pacman -S buildbot python2-virtualenv
cd
mkdir buildbot
cd buildbot
virtualenv2 --no-site-packages sandbox
source sandbox/bin/activate
easy_install sqlalchemy==0.7.10
easy_install buildbot-slave
buildslave create-slave slave localhost:9989 example-slave pass
buildslave start slave

Windows

Follow This on downloading and installing the prerequisites. Then follow the creating a new slave section in this guide. If Python was installed to a standard location then the following should be enough to get the slave running. Note that the commands should be run from wherever you intend to install the slave. In my case I installed to “C:\Users\buildbot\buildbot”

C:\Python27\scripts\easy_install buildbot-slave
C:\Python27\scripts\buildslave create-slave slave localhost:9989 example-slave pass
C:\Python27\scripts\buildslave start slave

Use full path in buildbot command

OSX

  • Install Xcode (from the app store)
  • Install command line tools for xcode
  • Install homebrew
  • Install xquatz
  • Install the following packages for compiling on OSX
brew install cmake glew homebrew/versions/glfw3 glm freeglut wget subversion gcc49 irrlicht boost

Follow the buildbot documentation to get a buildbot slave running.