How to Build OCTproZ
Clone Repository
You can clone OCTproZ with or without plugin submodules.
Clone with all plugins
Clone without plugins
To initialize a specific existing plugin (already part of OCTproZ and tracked in .gitmodules
):
Example for the Phase Extraction Extension:
Add a new plugin manually
If the plugin is not yet listed in .gitmodules
, you can add it manually:
Pull updates (main repo + plugins)
(Optional) Update plugins to latest versions
If you want the latest plugin commits (not just the versions pinned by the main repo):
Compiling
Requirements
Building OCTproZ from source requires:
- Installation of Qt 5 (version 5.10.1 or newer)
- Installation of CUDA Toolkit (version 8 or newer)
- Windows: MSVC compiler that is compatible with your CUDA version (see CUDA installation guide for Windows)
- Linux: Development environment that is compatible with your CUDA version (see CUDA installation guide for Linux)
Build Steps
- Clone/Download the OCTproZ project. The destination path should not contain any spaces!
- Start Qt Creator and open octproz_project.pro
- Configure project by selecting appropriate kit in Qt Creator (on Windows you need the MSVC compiler)
- Change the CUDA architecture flags in cuda.pri if necessary for your hardware (more info)
- Build octproz_project (right click on _octproz_project -> Build_)
- Run OCTproZ (right click on octproz_project or right click on octproz -> Run)
Note
The project file octproz_project.pro ensures that the devkit is compiled first as it generates a folder with files that are used by OCTproZ and any plug-in at compile time.
Installing Development Tools
Windows
Video Tutorial
OCTproZ can be compiled with different versions of Qt, CUDA and MSVC. One of the easiest setups is possible with:
1. Install Visual Studio 2017
- Download Visual Studio 2017 installer
- Start Visual Studio 2017 installer
- Select Desktop development with C++. (This will install MSVC v141 and Windows 10 SDK) and start installation process
- When installation is done, restart Windows
- Open "Add or remove programs" in Windows system settings
- Search for „Windows Software Development Kit"
- Click on Modify → Change → Next and select Debugging Tools for Windows. Click on Change. This will install the debugger that can be used later within Qt Creator.
2. Install CUDA
- Download CUDA 11.5.2
- Start CUDA installer and follow instructions on screen
3. Install Qt 5.12.12
- Download Qt 15.12.12 offline installer
- Disconnect from internet to skip Qt login screen
- Start Qt installer and follow instructions on screen
- In the Select Components screen you only need Qt 5.12.12 → MSVC 2017 64-bit and Developer and Designer Tools → Qt Creator 5.02 CDB Debugger Support. Everything else can be unchecked.
- Finish installation procedure and you are done!
Linux (Debian-based Systems)
The following instructions have been tested with Ubuntu 18.04.
1. Install Qt 5
Open a terminal (ctrl + alt + t) and type the following commands:
sudo apt-get install build-essential
sudo apt-get install qtcreator
sudo apt-get install qt5-default
Qt documentation and examples (recommended but not required):
sudo apt-get install qt5-doc
sudo apt-get install qt5-doc-html qtbase5-doc-html
sudo apt-get install qtbase5-examples
2. Install CUDA
Important
Follow the CUDA installation guide for Linux carefully.
When you get to the post-installation actions, add paths to the PATH variable by modifying the .bashrc
file:
Insert the CUDA relevant paths as stated in the CUDA installation guide at the end of the file.
To save the file press Ctrl + O, and to close the file press Ctrl + X.
Verify that the CUDA toolkit can find and communicate correctly with the CUDA-capable hardware.
Finally, install third-party libraries:
sudo apt-get install g++ freeglut3-dev build-essential libx11-dev \
libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
That's all! Now you can compile OCTproZ by opening the project files with Qt Creator.
NVIDIA Jetson Nano with JetPack
To compile and run OCTproZ on the Jetson Nano you need Qt with enabled OpenGL desktop option.
Building Qt from Source
1. Install build-essential package and Qt Creator
2. Install build dependencies
Enable the "Source code" option in Software and Updates > Ubuntu Software under the "Downloadable from the Internet" section. Then install the build dependencies:
3. Get the Qt source
git clone https://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.12.10
git submodule update --init --recursive
cd ~
mkdir qt5-build
cd qt5-build
Qt Version
You can also use the latest Qt 5 version: git checkout 5.15
It works, but has not been thoroughly tested with OCTproZ on the Jetson Nano. Use at your own risk.
4. Configure and build
Configure Qt for OpenGL desktop (required) and remove some packages with -skip (optional):
../qt5/configure -qt-xcb -opengl desktop -nomake examples -nomake tests -skip qtwebengine -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtwinextras
For Qt 5.15 and later
The -qt-xcb
option was removed. Use -bundled-xcb-xinput
instead.
After configuration, verify that there is a yes in the line with Desktop OpenGL in the Configure summary. Then start the build process:
Build Time
Be aware that make
will take about 5 hours on the Jetson Nano.
When everything has been successfully completed, you can start Qt Creator and build OCTproZ!
Troubleshooting
Windows
After installing Qt 5.12.11 with the offline installer, you may get the error message:
Solution:
- Close Qt Creator
- (Re-)install Qt Creator 4.14.2 with the offline installer from here
- Delete the file toolchains.xml located at:
- Reopen Qt Creator and everything should work fine
Jetson Nano
If you encounter the following error message after the configure step:
ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed.
Solution:
Install the following packages:
sudo apt-get install libx11*
sudo apt-get install libxcb-*
sudo apt-get install libxcb*
sudo apt-get install libxkbcommon-dev
sudo apt-get install libxkbcommon-x11-dev
After installing these packages, delete the content of the qt5-build folder and run the configure step again (see this discussion).