On startup Rviz2 searches for some core libraries inside a
$PREFIX/opt/rviz_ogre_vendor path hardcoded into the executable,
assuming it's being run under a regular ROS 2 installation.
As of recently nix-ros-overlay installs everything into standard
directories, including stuff that was previously put into opt/, so
Rviz2 would crash on startup.
This fixes the lookup path and makes it go search in normal directories.
With this change, one can initialize a ROS project by running:
nix flake init --template github:lopsided98/nix-ros-overlay
Besides adding the template, this commit also updates the README to
list the same template as the one from the flake. The listing in the
README can be easily updated to match the flake.nix file by running
the "mdsh" tool.
This fixes build failures in gz-*-vendor packages for Jazzy and
Rolling. Some of these packages are required for building rviz2.
Since most of the gz-* packages share the same structure, we introduce
patchGzAmentVendorGit function to make patching easier. In addition to
patching ament_vendor() calls, it adds a check to CMakeLists.txt to
detect upstream updates of the vendored package version. This should
help keeping our overrides in sync with upstream.
Currently, the overrides for Jazzy and Rolling are the same.
Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
MRPT ROS packaging was recently split to multiple smaller ROS
packages, but the source code of all of them is still maintained in
the original big repo. The new packages fetch the original repo and
build just a part of it. Obviously, with Nix, we have to fetch source
code ourselves, instead of letting CMake do this.
This gets rid of evaluation error for armv7a-darwin. It makes no sense
to support this platform in this overlay. According to the discussion
around around
https://github.com/NixOS/nixpkgs/pull/324155#issuecomment-2362297603,
it is better to support just the systems exposed by the nixpkgs flake.
Currently, these are:
- aarch64-darwin
- aarch64-linux
- armv6l-linux
- armv7l-linux
- i686-linux
- powerpc64le-linux
- riscv64-linux
- x86_64-darwin
- x86_64-freebsd
- 86_64-linux
In file included from ../../../ThirdParty/GL/glh/glh_obs.h:62:
../../../ThirdParty/GL/glh/glh_linear.h:371:11: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
371 | register real u;
| ^~~~~~~~
The vendored version of libjpeg fails to build with errors like this:
../../ThirdParty/LibJPEG/jccolor.c:135:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
135 | register int r, g, b;
| ^~~~~~~~