# Rviz build on Linux

**URL:** <https://discourse.openrobotics.org/t/rviz-build-on-linux/3225>\
**Category:** ROS General\
**Tags:** ros2\
**Created:** [November 22, 2017, 12:37am UTC](https://discourse.openrobotics.org/t/rviz-build-on-linux/3225 "2017-11-22T00:37:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yechun](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/yechun/32/903_2.png) [@yechun](https://discourse.openrobotics.org/u/yechun)\
**Post date:** [November 22, 2017, 12:37am UTC](https://discourse.openrobotics.org/t/rviz-build-on-linux/3225/1 "2017-11-22T00:37:44Z")

</div>

Setup new ubuntu 16.04 environment to build rviz of ros2, there are always some dependence packages not found, here list build errors and fixing solution for reference.

Follow rviz 2 [readme.md](https://github.com/ros2/rviz):

###############################################  
Could NOT find SDL2 (missing: SDL2\_LIBRARY SDL2\_INCLUDE\_DIR)

> apt-get install libsdl2-dev

###############################################  
By not providing “FindQt5.cmake” in CMAKE\_MODULE\_PATH this project has  
asked CMake to find a package configuration file provided by “Qt5”, but  
CMake did not find one.

Could not find a package configuration file provided by “Qt5” with any of  
the following names:  
Qt5Config.cmake  
qt5-config.cmake

> apt-get install qt5-defalut

###############################################  
Could not find freeimage library

> apt-get install libfreeimage-dev

###############################################  
Checking for module ‘yaml-cpp\>=0.5’  
CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):  
A required package was not found

> apt-get install libyaml-cpp-dev

###############################################  
Could not find a package configuration file provided by “ASSIMP” with any  
of the following names:  
ASSIMPConfig.cmake  
assimp-config.cmake

> apt-get install libassimp-dev

###############################################  
Could NOT find CURL (missing: CURL\_LIBRARY CURL\_INCLUDE\_DIR)

> apt-get install libcurl4-openssl-dev

###############################################

---

<div class="post-metadata">

**Author:** ![thealy](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/thealy/32/1840_2.png) [@thealy](https://discourse.openrobotics.org/u/thealy)\
**Post date:** [November 22, 2017, 1:08am UTC](https://discourse.openrobotics.org/t/rviz-build-on-linux/3225/2 "2017-11-22T01:08:25Z")

</div>

Thanks very much for your work here, Chris. It seems that the make file is  
quite a mess! You saved a lot of us less skilled people a lot of hunting  
and despair.

---

<div class="post-metadata">

**Author:** ![greimela-si](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/greimela-si/32/1572_2.png) [@greimela-si](https://discourse.openrobotics.org/u/greimela-si)\
**Post date:** [November 22, 2017, 3:21pm UTC](https://discourse.openrobotics.org/t/rviz-build-on-linux/3225/3 "2017-11-22T15:21:58Z")

</div>

Hi Chris, thanks for documenting the RViz dependencies!

We are aware that the build instructions are not very clear right now.  
The following pull request should make it clearer:

> <https://github.com/ros2/rviz/pull/117>
>
> Additional information on building RViz for both Ubunth and Windows.

Some comments regarding your findings:

- Thanks to your post I noticed that the instructions still missed curl in the dependency list and added it.
- FreeImage is currently not required for building RViz. The error message is printed but it is not relevant for now.
- SDL is built automatically together with OGRE. It should therefore not be necessary to install the apt package.  
However, installing the SDL apt package also installs two required dependencies, namely `libgles2-mesa-dev` and `libglu1-mesa-dev`. These are included in the new build instructions.

---

<div class="post-metadata">

**Author:** ![dennis.bergin](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dennis.bergin](https://discourse.openrobotics.org/u/dennis.bergin)\
**Post date:** [December 13, 2017, 10:58am UTC](https://discourse.openrobotics.org/t/rviz-build-on-linux/3225/4 "2017-12-13T10:58:09Z")

</div>

I have an equivalent error on OSX. Have you update the relevant instructions, also?  
Thanks Dennis

---

<div class="post-metadata">

**Author:** ![yechun](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/yechun/32/903_2.png) [@yechun](https://discourse.openrobotics.org/u/yechun)\
**Post date:** [December 14, 2017, 4:18am UTC](https://discourse.openrobotics.org/t/rviz-build-on-linux/3225/5 "2017-12-14T04:18:50Z")

</div>

I do not try on OSX, hope anyone else working on OSX could help you

---

<div class="post-metadata">

**Author:** ![Roser](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@Roser](https://discourse.openrobotics.org/u/Roser)\
**Post date:** [December 22, 2017, 8:35am UTC](https://discourse.openrobotics.org/t/rviz-build-on-linux/3225/6 "2017-12-22T08:35:49Z")

</div>

> [@yechun](#):
>
> apt-get install libyaml-cpp-dev

@greimela-si Just to confirm that it’s still necessary to install libyaml-cpp-dev ? it seems that rviz2 has its own yaml-cpp now

---

<div class="post-metadata">

**Author:** ![greimela-si](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/greimela-si/32/1572_2.png) [@greimela-si](https://discourse.openrobotics.org/u/greimela-si)\
**Post date:** [January 9, 2018, 10:06am UTC](https://discourse.openrobotics.org/t/rviz-build-on-linux/3225/8 "2018-01-09T10:06:19Z")

</div>

Sorry for the late reply!

No, some of the dependencies listed in this post such as yaml-cpp should not be necessary to install anymore.

The dependencies listed on this page should be enough

> **[GitHub - ros2/ros2: The Robot Operating System, is a meta operating...](https://github.com/ros2/ros2)**
>
> The Robot Operating System, is a meta operating system for robots.
