Skip to content

Commit

Permalink
Document required apt dependencies in machine readable format with ap…
Browse files Browse the repository at this point in the history
…t.txt file (robotology#825)

Co-authored-by: Stefano Dafarra <[email protected]>
  • Loading branch information
2 people authored and Nicogene committed Feb 14, 2022
1 parent 48f9e1e commit 22d1385
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .ci/install_debian.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export DEBIAN_FRONTEND=noninteractive
# CI specific packages
apt-get install -y clang valgrind ccache ninja-build

# Core dependencies
apt-get install -y bash-completion build-essential cmake cmake-curses-gui coinor-libipopt-dev freeglut3-dev git libace-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libdc1394-22-dev libedit-dev libeigen3-dev libgsl0-dev libjpeg-dev liblua5.1-dev libode-dev libopencv-dev libsdl1.2-dev libtinyxml-dev libv4l-dev libxml2-dev lua5.1 portaudio19-dev qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings qml-module-qtmultimedia qml-module-qtquick-controls qml-module-qtquick-dialogs qml-module-qtquick-window2 qml-module-qtquick2 qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev swig libspdlog-dev libblas-dev liblapack-dev
# Dependencies
# Get location of the script
SCRIPT_DIR=$(cd "$(dirname "$BASH_SOURCE")"; cd -P "$(dirname "$(readlink "$BASH_SOURCE" || echo .)")"; pwd)

# Dynamics dependencies
apt-get install -y libmatio-dev libirrlicht-dev
source ${SCRIPT_DIR}/../scripts/install_apt_dependencies.sh

# Python
apt-get install -y python3-dev python3-numpy python3-pybind11 pybind11-dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
- name: Dependencies [Docker]
run: |
chmod +x ./.ci/install_debian.sh
./.ci/install_debian.sh
bash ./.ci/install_debian.sh
- name: Install CMake 3.16 [Docker/Debian Buster]
if: matrix.docker_image == 'debian:buster-backports'
Expand Down Expand Up @@ -343,7 +343,7 @@ jobs:
run: |
cd $ROBOTOLOGY_SUPERBUILD_SOURCE_DIR
chmod +x ./.ci/install_debian.sh
sudo ./.ci/install_debian.sh
sudo bash ./.ci/install_debian.sh
- name: Dependencies [macOS]
if: contains(matrix.os, 'macos')
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo
- In `YARP`, all the `fake***` YARP devices are now enabled (https://github.com/robotology/robotology-superbuild/pull/797).
- `pybind11` has been added as dependency for the `ROBOTOLOGY_USES_PYTHON` option (https://github.com/robotology/robotology-superbuild/pull/800), to enable compilation of Python bindings of `manif` and `bipedal-locomotion-framework`.
- The `idyntree-yarp-tools` was added to the Dynamics component of the superbuild (https://github.com/robotology/robotology-superbuild/pull/818).
- An `apt.txt` file and a `scripts/install_apt_dependencies.sh` script have been added to the superbuild to report the required apt packages in a machine readable form. People that mantain either Docker recipes or documentation on how to instal the robotology-superbuild are suggest to switch to use these files instead of hardcoding the dependencies manually (https://github.com/robotology/robotology-superbuild/pull/825).

## [2021.05] - 2021-05-31

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ All the software packages are installed using the `install` directory of the bui

## Linux from source
### System Dependencies
On Debian based systems (as Ubuntu) you can install the C++ toolchain, Git, CMake and Eigen (and other dependencies necessary for the software include in `robotology-superbuild`) using `apt-get`:
```
sudo apt-get install bash-completion build-essential cmake cmake-curses-gui coinor-libipopt-dev freeglut3-dev git libace-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libdc1394-22-dev libedit-dev libeigen3-dev libgsl0-dev libjpeg-dev liblua5.1-dev libode-dev libopencv-dev libsdl1.2-dev libtinyxml-dev libv4l-dev libxml2-dev lua5.1 portaudio19-dev qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings qml-module-qtmultimedia qml-module-qtquick-controls qml-module-qtquick-dialogs qml-module-qtquick-window2 qml-module-qtquick2 qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev swig libmatio-dev libirrlicht-dev libspdlog-dev libblas-dev liblapack-dev
```
On Debian based systems (as Ubuntu) you can install the C++ toolchain, Git, CMake and Eigen (and other dependencies necessary for the software include in `robotology-superbuild`) using `apt-get`. This can be done by installing the packages listed in the `apt.txt` file using the following script:
~~~
cd robotology-superbuild
sudo bash ./scripts/install_apt_dependencies.sh
~~~

If you are **not** using Ubuntu 18.04, you also need to install:
~~~
Expand All @@ -136,7 +137,7 @@ More details can be found at https://github.com/robotology/QA/issues/364 .
If you enabled any [profile](doc/cmake-options.md#profile-cmake-options) or [dependency](doc/cmake-options.md#dependencies-cmake-options) specific CMake option you may need to install additional system dependencies, following the dependency-specific documentation (in particular, the `ROBOTOLOGY_USES_GAZEBO` option is enabled by default, so you should install Gazebo unless you plan to disable this option):
* [`ROBOTOLOGY_USES_GAZEBO`](doc/cmake-options.md#gazebo)

### Superbuild
### Compile the superbuild

Finally it is possible to install robotology software using the YCM superbuild:
```bash
Expand Down
40 changes: 40 additions & 0 deletions apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
bash-completion
build-essential
cmake
cmake-curses-gui
coinor-libipopt-dev
freeglut3-dev
git
libace-dev
libboost-filesystem-dev
libboost-system-dev
libboost-thread-dev
libdc1394-22-dev
libedit-dev
libeigen3-dev
libgsl0-dev
libjpeg-dev
liblua5.1-dev
libode-dev
libopencv-dev
libsdl1.2-dev
libtinyxml-dev
libv4l-dev
libxml2-dev
portaudio19-dev
qml-module-qt-labs-folderlistmodel
qml-module-qt-labs-settings
qml-module-qtmultimedia
qml-module-qtquick-controls
qml-module-qtquick-dialogs
qml-module-qtquick-window2
qml-module-qtquick2
qtbase5-dev
qtdeclarative5-dev
qtmultimedia5-dev
swig
libmatio-dev
libirrlicht-dev
libspdlog-dev
libblas-dev
liblapack-dev
9 changes: 9 additions & 0 deletions scripts/install_apt_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
#
# Install dependencies of robotology-superbuild
# using apt on Ubuntu or Debian

# Get location of the script
SCRIPT_DIR=$(cd "$(dirname "$BASH_SOURCE")"; cd -P "$(dirname "$(readlink "$BASH_SOURCE" || echo .)")"; pwd)

xargs -a ${SCRIPT_DIR}/../apt.txt apt-get install -y

0 comments on commit 22d1385

Please sign in to comment.