- 1 Intro
- 2 Goal
- 3 Fedora 19
- 4 Arch Linux
- 5 Installing the Cross compiler toolchain
- 6 Installing OCaml packages using OPAM
- 7 IVY
- 8 LPC21ISP
- 9 Paparazzi-dev Debian/Ubuntu packages
- 9.1 Whole lot in one
- 9.2 Ocaml and libraries
- 9.3 Gnome canvas Library
- 9.4 USB Library
- 9.5 Ocaml PCRE
- 9.6 Glade Library
- 9.7 Tcl/Tk
- 9.8 Make
- 9.9 Build essential
- 9.10 Libtool
- 9.11 libpcre3-dev
- 9.12 Git Client
- 9.13 Subversion
- 9.14 GNU Plot
- 9.15 Meld
- 9.16 FTDI library
- 9.17 MPFR library
- 9.18 ImageMagick
- 9.19 Optional on an older OS
- 10 Paparazzi Main sourcecode
- 11 Useful links
Users of recent Debian/Ubuntu distributions are advised to use the binary packages as described in Installation/Linux.
WARNING! Only use if you are proficient in working with Linux!
Users of other Linux flavors or anyone needing manual control of each individual package can install them independently.
The list of dependencies of the Debian package is located in the debian/control file and may help users of other distributions.
Some corresponding source tarballs can be downloaded from paparazzi-uav ppa on launchpad. (maybe building the packages from source is more reliable in view of dependencies)
For distributions using RPM packaging, the alien tool can be used to convert a .deb package into a .rpm package.
As with all Wiki pages, also this page is a work in progress. Try to be a big help to the Paparazzi project and improve this page whenever you can. If you have a distribution different from Ubuntu which doesn't satisfy any other dependency and have instructions about compiling it, packaging it, feel free to add any reference on how to do that on this wikipage.
The goal of this page is to clarify about which version of each piece of software has to be compiled, where to find that software, patches needed to make it compile on Linux, maybe even FreeBSD or OSX.
To build paparazzi-uav on Fedora 19, you must install the next packages from the official repository:
Paparazzi-uav needs to include some ocaml headers when it compiles the simulator, then please be sure that they are included. If not, edit sw/simulator/Makefile and add:
CAML_CFLAGS = -I/usr/lib64/ocaml
The following packages must be built from source code (they are not included in the official repository):
Paparazzi-uav was successfully compiled using ivy-c 3.14 (downloaded from SVN repository, revision #3602) and ivy-ocaml 1.2. Please note that the ivy-c version is an unstable version!
Additionally, you need install the next RPMs to build ivy-c:
Don't forget to set the environment variable PKG_CONFIG before building ivy-ocaml, e.g:
$ export PKG_CONFIG=/usr/local/lib/pkgconfig
This is probably a dirty hacked together (not realy according to "the Arch Way") install, but works on fresh installed Archbang.
NOTE: following issues
- This has been written for Archbang, although it should work on any Arch Linux based system, it has not been tested yet.
- It seems that the error "unbound module GnoCanvas" can be resolved with installing lablgtk2 over yaourt and then conf-gnomecanvas over opam?
- why is there no symlink from liblglibivy.so.3 and liblglibivy.so.3 to libglibivy.so.3.15?
- If pkg-config can't find some .pc files, the required path for these might not be set and exported properly. Use "pkg-config --variable pc_path pkg-config" to check if the path containing the ivy-c.pc, ivy-glib.pc and ivy-tcl.pc files are found.
- "ocamlfind: Package `netclient' not found" error, no solution yet written down
1. Update the fresh installation
# pacman -Syyu
2. Install base-devel (pacman build tools, if you don't already have it) and yajl (for yaourt)
# pacman -S base-devel yajl
3. Add "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/" to your shell config file (mostly ~/.bashrc)
$ echo 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/' >> ~/.bashrc
4. Install yaourt (this tool can build and install packages from the AUR for you)
5. Install general dependencies
# pacman -S subversion git libusb pcre ocaml camlp4 tcl tk python python-pip sdl glade
(libtool is a component of base-devel, so this will be already installed)
6. Build Ivy-C from Source
$ svn checkout https://svn.tls.cena.fr/svn/ivy/ivy-c/trunk /home/$USER/temp/ivy-c $ cd /home/$USER/temp/ivy-c/src $ make # sudo make install
7. Dirty All the ivy libs are installed in /usr/local/lib64 and not /usr/local/lib as the .pc files point to currently.
Change in the third line (libdir) in the ivy-c.pc, ivy-glib.pc and ivy-tcl.pc file from lib to lib64 and the fourth line (includedir) from include to include/Ivy
8. DirtyFor libgivy, libivy and libtclivy (.so and .so.3 ending) is a link directing to the lib with .so.3.15 availaible, but not for libglibivy.
Create these links for libglibivy
# ln -s /usr/local/lib64/libglibivy.so.3.15 /usr/local/lib64/libglibivy.so # ln -s /usr/local/lib64/libglibivy.so.3.15 /usr/local/lib64/libglibivy.so.3
9. Install opam (OCaml packet manager) via yaourt
$ yaourt -S opam
10. Initialize opam
$ opam init $ f $ ~/.bashrc $ echo 'eval `opam config env`' >> ~/.bashrc
11. Install and pin lablgtk.2.16.0 (2.18.0 will not work)
$ opam install -v lablgtk.2.16.0 $ opam pin add lablgtk 2.16.0
12. Install OCaml packets via opam
$ opam install ocamlfind ocamlnet xml-light pcre ivy
If this fails at Ivy check the notes on top of this guide.
13. Install ivy-python via pip
# pip install ivy-python
14. Install the Toolchain for Paparazzi (e.g. gcc-arm-none-eabi-bin from the AUR)
$pacman -S gcc-arm-none-eabi-bin
15. Install flashing utilities if needed
$ yaourt stlink-git dfu-util
Installing the Cross compiler toolchain
There are currently two different toolchains available that can be used on Linux based systems with Paparazzi. For more information see Installation/Linux#ARM_embedded_toolchain
Installing OCaml packages using OPAM
One possibility to install and manage OCaml packages is OPAM (OCaml Package Manager):
Please first check the official OPAM install guide for the simplest method.
To install it from the latest git tree run:
git clone https://github.com/OCamlPro/opam.git cd opam ./configure && make sudo make install
opam init eval `opam config env`
Update your shell environment as per opam init's instructions. E.g. add to your ~/.profile:
eval `opam config env`
Build and install OCaml libs:
opam install ocamlfind xml-light pcre ocamlnet opam install -v lablgtk
IVY is a simple protocol and a set of open-source libraries and programs that allows applications to broadcast information through text messages, with a subscription mechanism based on regular expressions. The project can be found at: http://www.eei.cena.fr/products/ivy/
In the paparazzi project, Ivy is used to send telemetry data to where ever you want.
NOTE: Do not confuse this IVY with the Apache Ivy project.
The ivy-python package makes it possible to use the IVY libraries from within the Python programming language. The ivy-python package is architecture independent, so it can be downloaded from the Ubuntu or Debian paparazzi repository.
pip install ivy-python
Or install from the source repository via
git clone https://gitorious.org/ivybus/ivy-python.git cd ivy-python ./setup.py install
To be able to use ivy-c, the libraries need to be installed.
Required packages (Debian based):
Download source, compile and install libraries:
# mkdir -p /opt/ivy-c # cd /opt/ivy-c # svn co https://svn.tls.cena.fr/svn/ivy/ivy-c/trunk # cd /opt/ivy-c/trunk/src # make # make install
It is possible you get errors of the test module when compiling, just ignore the messages, it is not important for the Paparazzi project. Contact the IVY team to help them also to resolve also the testing makefile issue.
gcc -c -O2 -Wall -Wshadow -fPIC -I/usr/include/tcl8.4 -DTCL_CHANNEL_INTEGRATION ivytcl.c ivytcl.c:28:17: fatal error: tcl.h: No such file or directory
The Makefile cannot read the tcl-dev version you have installed and assumes that version 8.4 is installed, but can't find the appropriate folder.
Edit the line 57 of the Makefile from TCLVERS=8.4 according to your installed version, or just delete the 8.4, both work.
Can't find 64bit libs: Your ivy libs were probably installed to /usr/local/lib64 and you have to make symbolic links so that they will be found:
$ sudo ln -s /usr/local/lib64/libivy.so /usr/local/lib64/libivy.so.3 /usr/lib
sudo ln -s /usr/local/lib64/libivy.so /usr/local/lib64/libivy.so.3 /usr/local/lib
If you get an error relating to ivytestready.c, make the following changes:
mkdir /opt/ivy-c/trunk/tools/Ivy cd /opt/ivy-c/trunk/tools/Ivy cp ../../src/ivy.h . cp ../../src/ivyloop.h . cp ../../src/ivysocket.h . cp ../../src/timer.h . cd ~/develop/ivy-c/trunk/src make
This copies files from the src directory to the Ivy folder in tools which did not appear after running svn above.
Download source, compile and install libraries:
# mkdir -p /opt/ivy-ocaml # cd /opt/ivy-ocaml # svn co https://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk # cd /opt/ivy-ocaml/trunk # make # make install
ivy-ocaml via OPAM
Or use OPAM: While the source repository and debian package is named ivy-ocaml, in OPAM it is only named ivy (since it is obviously for OCaml).
$ opam update $ opam install ivy
lpc21isp is only needed to serially flash the LPC2148 based autopilots (e.g. Lpc21BootloaderUpload bootloader for tiny, twog, umarim). LPC21ISP is an in-circuit programming (ISP) tool for the microcontroller used on the Paparazzi autopilot boards. The lpc21isp project is hosted on sourceforge and one can find the source packages and information at http://sourceforge.net/projects/lpc21isp/
Get the SVN version via
$ mkdir -p /opt/lpc21isp $ cd /opt/lpc21isp $ svn co https://lpc21isp.svn.sourceforge.net/svnroot/lpc21isp lpc21
To compile go into the source directory and then do
$ cd lpc21 $ make -f Makefile clean all
$ exportline="PATH=$PATH:/opt/lpc21isp" $ if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi $ source ~/.profile
Paparazzi-dev Debian/Ubuntu packages
For Ubuntu users, you can install the following packages from standard repository. You can just copy the line(s) and paste into your terminal. But do not copy the $ sign, this symbol is just added on this page to show that it is to be pasted at a normal terminal prompt.
Whole lot in one
sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \ liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev libpcre-ocaml \ libpcre-ocaml-dev libgnomecanvas2-0 libgnomecanvas2-dev libglade2-0 libglade2-dev make build-essential \ git gnuplot boa m4 libtool libftdi-dev libmpfr-dev tcl8.5-dev xutils-dev
Ocaml and libraries
Ocaml, short for Objective Caml is the most popular variant of the Caml language. The Paparazzi Ground Control Station (GCS) and some of it's tools are crafted in this language.
- ocaml, ocaml-camlimages-devel, ocaml-lablgtk2-devel, ocaml-xml-light-devel, ocamlnet-ocaml-devel
$ sudo apt-get install ocaml libcamlimages-ocaml liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev \ liblablgtk2-gnome-ocaml-dev libxml-light-ocaml-dev libocamlnet-ocaml-dev
Gnome canvas Library
The GnomeCanvas is an engine for structured graphics that offers a rich imaging model, high performance rendering, and a powerful, high level API. This widget can be used for flexible display of graphics and for creating interactive user interface elements.
$ sudo apt-get install libgnomecanvas2-0 libgnomecanvas2-dev
The libusb project aims to create a library for use by user level applications to access USB devices regardless of OS. 
$ sudo apt-get install libusb-dev
This OCaml-library interfaces the PCRE (Perl-compatibility regular expressions) C library. it can be used for matching regular expressions which are written in Perl style.
$ sudo apt-get install libpcre-ocaml libpcre-ocaml-dev
Libglade is a library that performs a similar job to the C source output routines in the GLADE user interface builder. Whereas GLADE's output routines create C source code that must be compiled, libglade builds the interface from an XML file (GLADE's save format) at runtime. This can allow modifying the user interface without recompiling.
$ sudo apt-get install libglade2-0 libglade2-dev
$ sudo apt-get install tcl-dev
Also the some utils are required to compile and install Ivy.
$ sudo apt-get install xutils-dev
GNU Make is an utility which controls the generation of executables and other target files of a program from the program's source files.
$ sudo apt-get install make
$ sudo apt-get install build-essential
GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface. Creating the files for Paparazzi software building becomes less cumbersome by using this tool.
$ sudo apt-get install libtool
Required for compiling Ivy-C.
$ apt-get install libpcre3-dev
Git is a version control system. Version control systems allow many individuals to collaborate on the Paparazzi source code. This is needed to retrieve the latest sourcecode from various packages and Paparazzi sourcecode itself.
$ sudo apt-get install git
Version control system, required for cloning the ivy packages.
$ apt-get install subversion
A command-line driven interactive plotting program. Unknow if it is used
$ sudo apt-get install gnuplot
Meld is a graphical front end to the diff program. It provides a side-by-side view of the differences between two files. It is used by the Paparazzi Center when configuration changes are not yet saved and the option comes along where one either can keep or view changes made in aircraft- and other configuration files.
$ sudo apt-get install meld
libftdi is a library that talks to FTDI's 232 type chips, including the popular bitbang mode, using libusb. A library to be able to use with a debugging Autopilot hardware boards.
$ sudo apt-get install libftdi-dev
The MPFR library is a C library for multiple-precision floating-point computations with correct rounding. MPFR is based on the GMP multiple-precision library. The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both efficient and has a well-defined semantics.
$ sudo apt-get install libmpfr-dev
ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. Being able to modify image based map pictures is a feature that may come in handy one time.
$ sudo apt-get install imagemagick
Optional on an older OS
If you have an older OS distribution it never hurts to install the following...
$ sudo apt-get install libx11-6 libx11-dev texinfo libncurses5 libncursesw5 libncursesw5-dev zlibc
Paparazzi Main sourcecode
See the main Installation#Getting_the_Source_Code page
TIP: If you get the File "pprz.mli", line 149, characters 78-89: Error: Unbound type constructor Ivy.binding ...this happens when IVY libraries are not yet installed. How to do this, read the part on installing IVY on this page