Skip to content
James Edmondson edited this page Jan 1, 2024 · 22 revisions

Table of Contents


Linux

There are two options for Linux installation.

  1. Using cmake to install into /usr/local
  2. Using the MPC build system which provides a lot of flexibility

For most users, the cmake system is the easiest and allows for easy integration into find_package with the popular cmake system. For that reason, it's the recommended method of installing MADARA for collaborative AI and knowledge sharing.

Cmake

Cmake is relatively easy to install on Ubuntu 18+. Here's the process.

git clone https://github.com/jredmondson/madara.git
madara/scripts/cmake.sh prereqs

This will install MADARA and some core useful tools like karl and mpg.pl into the /usr/local space. You can check out the cmake.sh and if you understand cmake, you can tweak this in more interesting ways than from the defaults.

MPC Build System

MADARA and derivative projects like GAMS were historically built with a portable build system called MPC that allowed us to target many different platforms (Linux/Windows/Android/etc.) You can still use these. They work well and are currently maintained, primarily within the GAMS repository via the GAMS Linux build scripts. They have been designed to make MADARA installation on Linux as easy as possible. For instance, if you download and use the GAMS scripts, you can essentially build all of MADARA with the following:

git clone https://github.com/jredmondson/gams.git
gams/scripts/linux/base_build.sh prereqs madara

We can potentially update this Wiki to advise how to do this by hand, but right now, we advise building MADARA using the GAMS build scripts. Don't forget to include the prereqs option on first installation or usage of new features to install feature prerequisites with apt-get install.

To get a list of all features that can be enabled in the build script, pass help as an option.


Mac

It is highly recommended that for Mac, you use the GAMS Mac build scripts. They have been designed to make MADARA installation on Mac as easy as possible. For instance, if you download and use the GAMS scripts, you can essentially build all of MADARA with the following (after installing Homebrew on Mac):

git clone https://github.com/jredmondson/gams.git
gams/scripts/mac/base_build.sh prereqs madara

To get a list of all features that can be enabled in the build script, pass help as an option.


Windows

To install on Windows, you should understand that the old build instructions at Sourceforge are slightly wrong. We are moving away from ACE (from the CORBA/ACE+TAO world) and are instead using STL and Boost where possible for threading, OS functionality, etc. The new requirements for installing base MADARA on Windows are the following:


Windows Prerequisites

  • Install Perl (ActiveState)
  • Install Git (TortoiseGit), which requires Git for Windows. It is highly recommended that when prompted to install command line tools, do so. The Windows Builds instructions below expect you to have command line git available. If you don't, download the MADARA repo as you would do normally with how you are comfortable on Windows.
  • Download Boost (Boost)
  • Install Oracle JDK (if you want Java) (preferably 1.8)
  • Install Visual Studio 2017 (2015 is no longer supported)

Windows Build

It is highly recommended that for Windows, you use the GAMS Windows build script (base_build.bat). We have tried to design this script to be as useful and intuitive as possible (as close as we can get a Windows installation process to download and install most dependencies).

git clone https://github.com/jredmondson/gams.git
gams\scripts\windows\base_build.bat prereqs madara

For best results, load the environment file saved to your HOME/.gams/env.bat or more preferably, save these environment variables permanently to your profile. We outline an example process for this in the next section.

Set Environment Variables

You're going to want to set a few environment variables in order to refer to MADARA and GAMS in your installation. Most of them are required for your installation and programs to function correctly.

On Windows, to change environment variables, you need to do the following. First, click your Start Menu, right click on "Computer", and then right click "Properties". This is shown in the image below.

Click Properties from your Computer

Click the "Environment Variables" button, and then set your environment variables in the User section. You can set them in the System section if you want other users to be able to develop GAMS applications. Here are the variables you need to setup.

  • MADARA_ROOT needs to be set to the directory MADARA is downloaded to (e.g., %PROJECTS_DIR%\madara)
  • GAMS_ROOT needs to be set to the directory GAMS is downloaded to (e.g., %PROJECTS_DIR%\gams)
  • PATH will need to have %ACE_ROOT%\lib;%ACE_ROOT%\bin;%MADARA_ROOT%\lib;%GAMS_ROOT%\lib added to it either in User or System
  • VREP_ROOT needs to be set to the directory where you can see the vrep executable

And this is what the resulting Environment Variables dialog might look like:

Example Environment Variables setup

IMPORTANT: the MADARA_ROOT and GAMS_ROOT should point to locations that have "lib" directories inside of them. If you do not see a "lib" directory inside of %MADARA_ROOT% or %GAMS_ROOT%, adjust your environment variables to the locations that do have that directory inside of them.

Do remember that if you are including VREP support, then VREP_ROOT will also need to be set appropriately.