Skip to content

How to Build OCTproZ

Clone Repository

You can clone OCTproZ with or without plugin submodules.

Clone with all plugins

git clone --recurse-submodules https://github.com/spectralcode/OCTproZ.git

Clone without plugins

git clone https://github.com/spectralcode/OCTproZ.git

To initialize a specific existing plugin (already part of OCTproZ and tracked in .gitmodules):

git submodule update --init octproz_project/octproz_plugins/<plugin-folder>

Example for the Phase Extraction Extension:

git submodule update --init octproz_project/octproz_plugins/octproz-phase-extraction-extension

Add a new plugin manually

If the plugin is not yet listed in .gitmodules, you can add it manually:

git submodule add <plugin-repo-url> octproz_project/octproz_plugins/<plugin-folder>

Pull updates (main repo + plugins)

git pull --recurse-submodules
git submodule update --init --recursive

(Optional) Update plugins to latest versions

If you want the latest plugin commits (not just the versions pinned by the main repo):

git submodule update --remote --merge

Compiling

Requirements

Building OCTproZ from source requires:

Build Steps

  1. Clone/Download the OCTproZ project. The destination path should not contain any spaces!
  2. Start Qt Creator and open octproz_project.pro
  3. Configure project by selecting appropriate kit in Qt Creator (on Windows you need the MSVC compiler)
  4. Change the CUDA architecture flags in cuda.pri if necessary for your hardware (more info)
  5. Build octproz_project (right click on _octproz_project -> Build_)
  6. 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

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

  1. Download Visual Studio 2017 installer
  2. Start Visual Studio 2017 installer
  3. Select Desktop development with C++. (This will install MSVC v141 and Windows 10 SDK) and start installation process
  4. When installation is done, restart Windows
  5. Open "Add or remove programs" in Windows system settings
  6. Search for „Windows Software Development Kit"
  7. Click on ModifyChangeNext 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

  1. Download CUDA 11.5.2
  2. Start CUDA installer and follow instructions on screen

3. Install Qt 5.12.12

  1. Download Qt 15.12.12 offline installer
  2. Disconnect from internet to skip Qt login screen
  3. Start Qt installer and follow instructions on screen
  4. In the Select Components screen you only need Qt 5.12.12MSVC 2017 64-bit and Developer and Designer ToolsQt Creator 5.02 CDB Debugger Support. Everything else can be unchecked.
  5. 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:

nano /home/$USER/.bashrc

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

sudo apt-get install build-essential
sudo apt-get install qtcreator

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:

sudo apt-get build-dep qt5-default

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:

make
sudo make install

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:

NMAKE : fatal error U1077: "C:\Program": Rückgabe-Code "0x1""

Solution:

  1. Close Qt Creator
  2. (Re-)install Qt Creator 4.14.2 with the offline installer from here
  3. Delete the file toolchains.xml located at:
    C:\Users\%USERNAME%\AppData\Roaming\QtProject\qtcreator\toolchains.xml
    
  4. 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).