Skip to content

Building from scratch

Steffen Elste edited this page Oct 29, 2021 · 31 revisions

Prerequisites

The development of TSC is done on Raspbian exclusively - it might work on other distros as well, but it's by no means guaranteed!

INDI

INDI version 1.9.2 is available for Raspbian, for details see the page Raspberry PI.

Be sure to install the development package as well:

apt install libindi-dev

FITSIO

Install the development package for the 'Flexible Image Transport System (FITS):

apt install libcfitsio-dev

libnova

Install the development package for the Celestial Mechanics, Astrometry and Astrodynamics Library as well:

apt install libnova-dev

Wiring Pi

This library ships with recent Raspbian images - open a terminal and run

gpio -v

Expected output should be something along these lines:

gpio version: 2.50
Copyright (c) 2012-2018 Gordon Henderson

Qt and Qt Creator

Raspbian ships with older versions of Qt Creator and Qt. There are tutorials available to set up more recent versions on Raspbian, but for these building instructions we're sticking with the packages provided by Raspbian.

Execute

sudo apt-get install qtcreator libqt5serialport5-dev cmake

to install Qt Creator 4.8.2 and Qt 5.11.3 and a whole bunch of dependencies as well as CMake, the build system used with Qt Creator.

OpenCV

Run

sudo apt-get install libopencv-dev

to install the OpenCV library including header files and dependencies.

TSC

Once all the preliminaries are done with it is finally time to compile TSC itself. Clone the repository, then start Qt Creator, locate and open the 'TwoStepperControl.pro' file to load the project.

Project configuration modifications

The configuration file for the Qt Creator project - 'TwoStepperControl.pro' has to be edited:

  • comment out or delete the INCLUDEPATH statements for the 'pi' user (lines 46 to 48)
  • comment out or delete the INCLUDEPATH statement for 'opencv2' as well (line 49)

If You run the build now You'll likely end up with an error message similar to this one:

stdlib.h: No such file or directory
#include_next <stdlib.h>

This is a known bug in gcc 6.1 - Hard-coded C++ header paths and relocation problem - easy to circumvent by adding the statement:

QMAKE_DEFAULT_INCDIRS = \\

to the configuration file.

That's about it ... clicking the green 'Run' arrow button on the left should now result in a successful build of the application!