-
Notifications
You must be signed in to change notification settings - Fork 69
Building Seer Qt6
Seer with Qt6 requires these components:
- Linux
- C++17
- gdb with "mi" interpreter
- CMake (3.10 or newer)
- QT6
- Core
- Gui
- Widgets
- PrintSupport
- Charts
- Svg
- When building Seer from source, you will need the QT6 "devel" packages installed on your system for your distribution.
Ubuntu 22.04 LTS requires these packages:
sudo apt install qt6-base-dev
sudo apt install libqt6charts*-dev
sudo apt install libqt6svg*-dev
OpenSuse 15.5 requires these packages:
sudo zypper install qt6-base-devel
sudo zypper install qt6-charts-devel
sudo zypper install qt6-core-devel
sudo zypper install qt6-gui-devel
sudo zypper install qt6-svg-devel
Grab the latest Seer code from GitHub.
% git clone https://github.com/epasveer/seer
Or grab a source tar file from the releases. The Qt6 version of Seer starts with version 2.0.
https://github.com/epasveer/seer/releases
Setup cmake and build
% cd seer/src
% mkdir build
% cd build
% cmake -DQTVERSION=QT6 ..
or
% cmake .. # Defaults to Qt6
% make seergdb
Some common cmake settings can be specified.
% cmake -DQTVERSION=QT6 -DCMAKE_BUILD_TYPE=Debug .. # Debug release -g.
% cmake -DQTVERSION=QT6 -DCMAKE_BUILD_TYPE=Release .. # Optimized release -O.
% cmake -DQTVERSION=QT6 -DCMAKE_CXX_FLAGS=-Wall .. # With all compile warnings turned on.
Copy the Seer binary to your bin directory of choice. One of the below. May need root access.
% cd seer/src/build
% cp seergdb ~/bin/seergdb
% cp seergdb /usr/local/bin/seergdb
% cp seergdb /usr/bin/seergdb
% rehash
Or use the 'install' make target, which will usually copy it to /usr/local/bin. May need root access.
% cd seer/src/build
% sudo make install
For Debian based releases, you can use the normal tooling to build a .deb
package containing Seer. You need the build-essential
package installed.
% cd seer
% dpkg-buildpackage
For building on MacOS, you most likely need to provide cmake the location of your Qt6 installation. There's lots of info on the web. Here's one source.
https://stackoverflow.com/questions/18722329/cmake-does-not-find-qt-5-1-1
However, you can try one of these ways. The first manually specifies where the Qt6 is installed. The second asks brew.
% cmake -DQTVERSION=QT6 -DCMAKE_PREFIX_PATH=/usr/local/opt/qt6/ ..
% cmake -DQTVERSION=QT6 -DCMAKE_PREFIX_PATH=$(brew --prefix qt6) ..
Note, if you get this error, you are likely using a C++ compiler that doesn't support c++17, which QT6 requires. Check your C++ installation.
/usr/include/qt6/QtCore/qfile.h:13:10: fatal error: filesystem: No such file or directory
#include <filesystem>
^~~~~~~~~~~~
compilation terminated.
Try specifying a more recent g++ and gcc compiler to cmake. Check which compiler is installed on your system.
% cmake -D CMAKE_C_COMPILER=gcc-10 -D CMAKE_CXX_COMPILER=g++-10 -DQTVERSION=QT6 -DCMAKE_BUILD_TYPE=Debug ..