wiki:Getting started

Version 15 (modified by max, 6 years ago) (diff)

Updated info on llvm

Getting started

Installation

Currently, the only supported way to install Finroc® is from source. Therefore, a few dependencies must be installed.

Notably, the build process requires either llvm clang 3.4 (or newer) or doxygen in a version not newer than 1.7.6.1.

Furthermore, the development branch requires at least GCC version 4.8 or llvm clang 3.4 to compile.

Ubuntu

If you use Ubuntu (>= 12.04), you may use the packages we created so far to install the required tools and libraries. Become root for the next steps and add our package repository to your distribution:

~$ sudo su -
~# cat > /etc/apt/sources.list.d/finroc.org.list <<EOF

12.04 (Precise Pangolin) supported by Finroc 13.10 only

> deb     http://packages.finroc.org/ubuntu precise main
> deb-src http://packages.finroc.org/ubuntu precise main

12.10 (Quantal Quetzal) supported by Finroc 13.10 only

> deb     http://packages.finroc.org/ubuntu quantal main
> deb-src http://packages.finroc.org/ubuntu quantal main

13.04 (Raring Ringtail) supported by Finroc 13.10 only

> deb     http://packages.finroc.org/ubuntu raring main
> deb-src http://packages.finroc.org/ubuntu raring main

13.10 (Saucy Salamander) supported by 13.10 and development

> deb     http://packages.finroc.org/ubuntu saucy main
> deb-src http://packages.finroc.org/ubuntu saucy main

Then, update apt's database and install our keyring and dependencies.

> EOF
~# apt-get update
~# apt-get install -y --force-yes finroc-archive-keyring
~# apt-get update
~# apt-get install --no-install-recommends finroc-dependencies doxygen=1.7.6.1-2ubuntu1
~# echo doxygen hold | dpkg --set-selections
~# logout

Other Linux distributions

On other Linux distributions, please refer to our Dependencies List to install the required tools and libraries.

Non-Linux operating systems

There is currently no support for other operating systems than Linux.

Setup mercurial

The main source control management system used on finroc.org is mercurial. You can skip this step if you want to just have a quick look at Finroc®. However, if you are going to check out more components, create or change code and want to commit you changes, it is recommended to create some configuration for mercurial first.

If it does not already exist, create the file ~/.hgrc:

[ui]
username = Your Name <your@email.address>
merge = kdiff3

[merge-tools]
kdiff3.args = $base $local $other -o $output
kdiff3.premerge = true

[auth]
finroc_org.prefix = https://finroc.org/hg
finroc_org.username = anonymous
finroc_org.password = your@email.address

Configuring the merge tool is optional, but our recommendation. The hostfingerprints are currently needed until the server gets a properly assured SSL certificate. If you already created an account on finroc.org, you should, of course, replace the anonymous credentials by your own. As the file now contains your credentials, make it non-readable for others:

~$ chmod go= ~/.hgrc

Clone the Finroc® environment

Getting the source code of components, configuring, building, and execution is all conveniently done from within the Finroc® environment. Here, you also select if you want to use our development branch or a stable release, like version 13.10. Therefore, clone the according branch using mercurial.

~$ hg clone https://finroc.org/hg/finroc              # for our development branch

or

~$ hg clone -u 13.10 https://finroc.org/hg/finroc     # for stable version 13.10

If you skipped the step Setup mercurial, you might be asked about your username and password. Just use anonymous together with a valid email address as password.

Setup environment

Each time you want to use Finroc®, some paths and other environment variables must be set.

~$ cd finroc
~/finroc$ source scripts/setenv
----------------------------------
 FINROC Settings
----------------------------------
 Home:          /home/$USER/finroc
 Project:       <unknown>
 Project Home:  <unknown>
 Language:      <unknown>
 Target:        i686_linux_debug
----------------------------------

Get the core and main tools

In Finroc®, the source code of the single components (core, libraries, plugins, tools, projects) can be easily cloned/checked out using finroc_get. Use it to install the first components and their dependencies:

~/finroc$ finroc_get finroc_core finroc_tools_finstruct-java

Questions for optional components can be answered with no for now.

Compiling with GCC (default)

To check if all dependencies are satisfied and all targets can be built, run makeSafeMakefile.

~/finroc$ makeSafeMakefile

This step is mainly for diagnostics and included in the main build command makeSafe. Use it to build the core and main tools:

~/finroc$ makeSafe -j4

This starts parallel building with 4 threads. If you have more CPU cores and enough RAM, you may increase the number of build threads.

Compiling with llvm clang (experimental)

If you want to compile Finroc® with llvm clang, specify a different compiler:

~/finroc$ makeSafe -j4 CC=clang CXX=clang++

Note: Due to a bug in Ubuntu 13.10, it currently does not work on 32-bit installations (adding -I/usr/include/i386-linux-gnu/c++/4.8 helps, but there will be linker errors later).

Next steps