wiki:Getting started

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 llvm clang version 3.4 (or newer).

When compiling with GCC, the development branch requires at least GCC version 5.4.

Ubuntu

If you use Ubuntu, you may use the packages we created so far to install the required tools and libraries.

Ubuntu Version Supported Finroc® Versions
Version Short Codename 13.10 14.08 17.03 (beta) development
12.04 LTS precise
12.10 quantal
13.04 raring
13.10 saucy
14.04 LTS trusty
14.10 utopic
15.04 vivid
15.10 wily
16.04 LTS xenial

Become root for the next steps and add our package repository to your distribution, replacing <SHORT_CODENAME> from the table above accordingly:

~$ sudo su -
~# cat > /etc/apt/sources.list.d/finroc.org.list <<EOF
> deb     http://packages.finroc.org/ubuntu <SHORT_CODENAME> main
> deb-src http://packages.finroc.org/ubuntu <SHORT_CODENAME> main
> EOF

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

~# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5C9E0513
~# apt-get update
~# apt-get install --no-install-recommends finroc-dependencies astyle=2.03-1
~# apt-mark hold astyle
~# 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 with respect to the build environment. Finroc® can, however, be cross-compiled for other platforms.

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

If you did not install the Ubuntu packages mentioned above, a hostfingerprints entry is currently needed in the ~/.hgrc (until the server gets a properly assured SSL certificate):

[hostfingerprints]
finroc.org = AD:C4:C9:99:88:71:EF:BD:75:09:1A:AC:89:06:7A:8F:7B:F4:15:AD

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 14.08. Therefore, clone the according branch using mercurial.

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

or

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

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

Note: Some commands changed since version 13.10. If using the old stable branch please refer to an older version of this document.

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:              linux_x86_64_debug
 Restrict Components: no
----------------------------------

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 finroc_tools_gui-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, generate the Makefile:

~/finroc$ make makefile

This step is mainly for diagnostics and automatically included in the normal build process.

Any programs and libraries that cannot be built due to missing dependencies are listed at the end of the command line output. Note: After installing missing system libraries, you need to update the lib database running make libdb in order to make them known to the build system.

Run make to build the core and main tools:

~/finroc$ make -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

The default compiler flags are stored in small files in etc/targets. Switch to one for llvm clang - e.g.:

~/finroc$ source scripts/setenv -m debug-clang

Now you can build the project using make

~/finroc$ make -j4

Next steps

Last modified 3 months ago Last modified on 09.08.2017 15:07:19