First make sure you install the dependencies
cmake
sudo apt install llvm-11 libclang-11-dev llvm-11 llvm-11-dev llvm-11-runtime llvm-11-tools
(may or may not be missing one, but they are all in the repositories, no need to manually install or build from src)
git clone https://github.com/Andersbakken/rtags
git submodule init
git submodule update
and finally,
./configure --prefix $HOME/.local --cmake-argument \
-DLIBCLANG_LLVM_CONFIG_EXECUTABLE=/usr/lib/llvm-11/bin/llvm-config \
--cmake-argument -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
--cmake-argument -DRTAGS_NO_ELISP_BYTECOMPILE=1
from here follow the rest of the instructions from https://eklitzke.org/using-emacs-and-rtags-with-autotools-c++-projects