Make sure we have some basic tools available on the workstation:
sudo dnf install wget git
Some of the build dependencies come from outside the main AppStream repo. So first we will enable those and then install our dependencies:
sudo dnf install epel-release
sudo dnf config-manager --set-enabled powertools
sudo dnf install alsa-lib-devel autoconf automake avahi-compat-libdns_sd-devel bison bzip2-devel cmake-gui curl-devel flex gcc gcc-c++ libXcomposite libXi-devel libaio-devel libffi-devel nasm ncurses-devel nss libtool libxkbcommon libXcomposite libXdamage libXrandr libXtst libXcursor mesa-libOSMesa mesa-libOSMesa-devel meson ninja-build openssl-devel patch pulseaudio-libs pulseaudio-libs-glib2 ocl-icd ocl-icd-devel opencl-headers python3 python3-devel qt5-qtbase-devel readline-devel sqlite-devel tcl-devel tcsh tk-devel yasm zip zlib-devel
You can disable the devel repo afterwards since dnf will warn about it:
sudo dnf config-manager --set-disabled devel
You may or may not have libGLU on your system depending on your graphics driver setup. To know you can check if you have the lib /usr/lib64/libGLU.so.1. If it's there you can skip this step, there's nothing further to do in this section. If not, you can install the graphics drivers for your system. As as last resort, you can install a software (mesa) libGLU version, but you may not have ideal performance with this option. To do so:
sudo dnf install mesa-libGLU mesa-libGLU-devel
Some of the RV build scripts requires extra python packages. They can be installed using the requirements.txt at the root of the repository.
python3 -m pip install -r requirements.txt
You need CMake version 3.27+ to build RV. The dnf-installable version is not quite recent enough, you'll to build and install CMake from sources.
wget https://github.com/Kitware/CMake/releases/download/v3.30.3/cmake-3.30.3.tar.gz
tar -zxvf cmake-3.30.3.tar.gz
cd cmake-3.30.3
./bootstrap --parallel=32 # 32 or whatever your machine allows
make -j 32 # 32 or whatever your machine allows
sudo make install
cmake --version # confirm the version of your newly installed version of CMake
cmake version3.30.3
Download the last version of Qt 5.15.x that you can get using the online installer on the Qt page. Logs, Android, iOS and WebAssembly are not required to build OpenRV.
WARNING: If you fetch Qt from another source, make sure to build it with SSL support, that it contains everything required to build PySide2, and that the file structure is similar to the official package.
(build_rocky8_openrv)=
(building_rocky8_from_command_line)=
(build_rocky8_openrv1)=
To maximize your chances of successfully building Open RV, you must:
- Fully update your code base to the latest version (or the version you want to use) with a command like
git pull
. - Fix all conflicts due to updating the code.
- Revisit all modified files to ensure they aren't using old code that changed during the update such as when the Visual Studio version changes.
(build_rocky8_openrv2)=
Clone the Open RV repository and change directory into the newly created folder. Typically, the command would be:
Using a password-protected SSH key:
git clone --recursive [email protected]:AcademySoftwareFoundation/OpenRV.git
cd OpenRV
Using the web URL:
git clone --recursive https://github.com/AcademySoftwareFoundation/OpenRV.git
cd OpenRV
(build_rocky8_openrv3)=
From the Open RV directory:
source rvcmds.sh
(build_rocky8_openrv4)=
This section needs to be done only one time when a fresh Open RV repository is cloned.
The first time the `rvsetup` is executed, it will create a Python virtual environment in the current directory under `.venv`.
From the Open RV directory, the following command will download and install the Python dependencies.
rvsetup
(build_rocky8_openrv5)=
From the Open RV directory, the following command will configure CMake for the build:
```{code-tab} bash Release
rvcfg
```
```{code-tab} bash Debug
rvcfgd
```
(build_rocky8_openrv6)=
From the Open RV directory, the following command will build the dependencies:
```{code-tab} bash Release
rvbuildt dependencies
```
```{code-tab} bash Debug
rvbuildtd dependencies
```
(build_rocky8_openrv7)=
From the Open RV directory, the following command will build the main executable:
```{code-tab} bash Release
rvbuildt main_executable
```
```{code-tab} bash Debug
rvbuildtd main_executable
```
(build_rocky8_openrv8)=
```{tab} Release
Once the build is completed, the Open RV application can be found in the Open RV directory under `_build/stage/app/bin/rv`.
```
```{tab} Debug
Once the build is completed, the Open RV application can be found in the Open RV directory under `_build_debug/stage/app/bin/rv``.
```
(building_rocky8_with_docker)=
To build Open RV using Docker, utilize the provided Dockerfile, which includes all required dependencies.
(build_rocky8_image)=
cd dockerfiles
docker build -t openrv-rocky8 -f Dockerfile.Linux-Rocky8 .
(run_rocky8_image)=
docker run -d openrv-rocky8 /bin/bash -c "sleep infinity"
(go_into_the_rocky8_container)=
# Lookup the container id for openrv-rocky8
docker container ls
# Use the container id to go into it.
# e.g.
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# 59e7878debc4 openrv-rocky8 "/bin/bash -c 'sleep…" 21 minutes ago Up 21 minutes crazy_pare
# In this example, the <container id> would be 59e7878debc4.
docker container exec -it <container id> /bin/bash
Once you are into the container, you can follow the standard process.
If you are on a host that is compatible with Rocky Linux 8, you can copy the stage folder outside of the container and execute Open RV.
Container id is the same as the one used in the step Go into the container.
docker cp <container id>:/home/rv/OpenRV/_build/stage ./openrv_stage