Building NiDB

How to build NiDB and contribute to its development

Compatible Linux Distributions

The following OS configurations have been tested to build nidb. It may be possible to build NiDB on other OS configurations, but only the below environments have been tested.

  • Tested & Compatible

    • RHEL 9 compatible (Rocky Linux 9, AlmaLinux 9, RHEL 9)

    • RHEL 8 compatible (Rocky Linux 8, AlmaLinux 8, CentOS 8, RHEL 8)

    • RHEL 7 compatible (RHEL 7, CentOS 7)

    • Ubuntu 20

    • Debian 12

  • Incompatible

    • RHEL-compatible 8.6 (RHEL 8.6, Rocky 8.6, AlmaLinux 8.6)

    • CentOS 8 Stream

  • Unknown

    • Windows 10/11 - NiDB will compile and build on Windows, but NiDB uses Linux system calls to perform many background operations, and thus would not work on Windows.

Prepare Build Environment

Step 1 - Install development tools

Run these commands as root (or sudo) based on your distribution

Step 2 - Install Qt 6.9.3

  1. Download Qt open-source from https://www.qt.io/download-open-source

  2. Make the installer executable chmod 777 qt-unified-linux-x64-x.x.x-online.run

  3. Run ./qt-unified-linux-x64-x.x.x-online.run

  4. The Qt Maintenance Tool will start. An account is required to download Qt open source

  5. On the components screen, select the checkbox for Qt 6.9.3 → Desktop gcc 64-bit

Step 3 - (Optional) Build MySQL/MariaDB driver for Qt

Sometimes the MySQL/MariaDB driver supplied with Qt will not work correctly, and needs to be built manually. This happens on Debian 12, for example. If building is successful, the path to the driver should eventually be ~/Qt/6.9.3/gcc_64/plugins/sqldrivers/libqsqlmysql.so

  1. On step 2 above (using the Qt MaintenanceTool), also select the checkbox for Qt 6.9.3 → Sources

Building the NiDB executable

Once the build environment is setup, the builds can be done by script. The build.sh script will build only the nidb executable, this is useful when testing. The rpmbuildx.sh scripts will build the rpm which will create releases.

First time build on this machine, perform the following

All subsequent builds on this machine can be done with the following

Contributing to the NiDB Project

Setting up a development server

A development server can be a full server, a VM, or any installation of one of the supported Linux operating systems. Once you've been granted access to the nidb project on github, you'll need to add your SSH key under your account (github.com --> click your username --> Settings --> SSH and GPG keys). There are directions on the github site for how to do this. Then you can clone the current source code into your .

Cloning a new repository with SSH

This will create a git repository called nidb in your home directory.

Committing changes

Updating your repository

To keep your local copy of the repository up to date, you'll need to pull any changes from github.

Troubleshooting

Build freezes

This may happen if the build machine does not have enough RAM or processors. More likely, this is happening inside of a VM if the VM does not have enough RAM or processors allocated.

Build fails with "QMAKE_CXX.COMPILER_MACROS not defined"

This error happens because of a kernel bug in Rocky Linux 8.6 and any qmake built with Qt 6.3. Downgrade or use a lower version kernel until this kernel bug is fixed.

Library error when running nidb executable

If you get an error similar to the following, you'll need to install the missing library

You can check which libraries are missing by running ldd on the nidb executable

Copy the missing library file(s) to /lib as root. Then run ldconfig to register any new libraries.

Virtual Machine Has No Network

If you are using a virtual machine to build NiDB, there are a couple of weird bugs in VMWare Workstation Player (possibly other VMWare products as well) where the network adapters on a Linux guest simply stop working. You can't activate them, you can't do anything with them, they just are offline and can't be activated. Or it's connected and network connection is present, but your VM is inaccessible from the outside.

Try these two fixes to get the network back:

1) While the VM is running, suspend the guest OS. Wait for it to suspend and close itself. Then resume the guest OS. No idea why, but this should fix the lack of network adapter in Linux

2) (This is if you are using bridged networking only) Open the VM settings. Go to network, and click the button to edit the bridged adapters. Uncheck the VM adapter.

Last updated

Was this helpful?