Building squirrel library and utils
Overview
The following OS configurations have been tested to build squirrel with Qt 6.5
Compatible
RHEL compatible Linux 8 (not 8.6)
CentOS 8 (not CentOS 8 Stream)
CentOS 7
Windows 10/11
squirrel library and utils cannot be built on CentOS Stream 8 or Rocky Linux 8.6. There are kernel bugs which do not work correctly with Qt's QProcess library. This can lead to inconsistencies when running shell commands, and qmake build errors.
Other OS configurations may work to build squirrel, but have not been tested.
Prepare Build Environment
Install the following as root
Install Qt
Download Qt open-source from https://www.qt.io/download-open-source
Make the installer executable
chmod 777 qt-unified-linux-x64-x.x.x-online.run
Run
./qt-unified-linux-x64-x.x.x-online.run
The Qt Maintenance Tool will start. An account is required to download Qt open source.
On the components screen, select the checkbox for Qt 6.5.3 → Desktop gcc 64-bit
Building the squirrel Library
Once the build environment is setup, the build process can be performed by script. The build.sh
script will build the squirrel library files and the squirrel utils.
The first time building squirrel on this machine, perform the following
This will build gdcm (squirrel depends on GDCM for reading DICOM headers), squirrel lib, and squirrel-gui.
All subsequent builds on this machine can be done with the following
Contributing to the squirrel Library
Setting up a development environment
Once you've been granted access to the squirrel project on github, you'll need to add your server's SSH key to your github 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 server.
Cloning a new repository with SSH
This will create a git repository called squirrel 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 in which 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 RHEL 8.6. Downgrade to 8.5 or upgrade to 8.7.
Library error
This example is from the nidb example. 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, 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 fixes to get the network back:
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.
Open the VM settings. Go to network, and click the button to edit the bridged adapters. Uncheck the VM adapter. This is if you are using bridged networking only.
Switch to NAT networking. This may be better if you are connected to a public wifi.
Using the squirrel Library
Copy the squirrel library files to the lib directory. The libs will then be available for the whole system.
Last updated