Building WSJTX from Source on Ubuntu 18.10

There a multiple steps for Building WSJTX from source (ie from the SourceForge Git Repository these can be summarised as follows:

  1. Install Build tools
  2. Install Build time dependencies
  3. Checkout HamLib
  4. Build modified HamLib
  5. Checkout WSJTX
  6. Build WSJTX

Installing the build tools

If you've build C++ and FORTRAN applications before, you can likely omit this step. Running it if you have already got everything installed won't hurt either.

sudo apt-get install -y build-essential gfortran autoconf automake libtool cmake git

Installing Build time dependencies

apt-get install -y asciidoctor libfftw3-dev qtdeclarative5-dev texinfo libqt5multimedia5 libqt5multimedia5-plugins qtmultimedia5-dev libusb-1.0.0-dev libqt5serialport5-dev asciidoc libudev-dev

Checking out and building a custom HamLib

According to the official WSJTX instructions a custom version of HamLib is required for WSJTX as it contains changes which are not merged into the upstream package. This is likely to change when the two code bases are brought together, but for now it is required. To avoid clashing with other installed version of HamLib, we create a static version off on it's own prefix rather than installing it into the system library path.

mkdir hamlib 
cd hamlib
git clone git://git.code.sf.net/u/bsomervi/hamlib src
cd src 
git checkout integration
./bootstrap
mkdir ../build
cd ../build
../src/configure --prefix=$HOME/hamlib-prefix    --disable-shared --enable-static    --without-cxx-binding --disable-winradio    CFLAGS="-g -O2 -fdata-sections -ffunction-sections"  LDFLAGS="-Wl,--gc-sections"
make -j4 
make install-strip
cd ../../

Checkout and build WSJTX

Once the custom version of hamlib has been build and installed into ~/hamlib-prefix we can build WSJTX. The following snippet installs the WSJTX libaries into ~/wsjtx/output, this was to keep it separate from the package manager delivered version. However, this can be easily changed for a different directory by modifying the INSTALL_PREFIX parameter.

mkdir wsjtx
cd wsjtx
git clone https://git.code.sf.net/p/wsjt/wsjtx wsjt-wsjtx 
mkdir build
mkdir output 
cd build
cmake -D CMAKE_PREFIX_PATH=~/hamlib-prefix    -D CMAKE_INSTALL_PREFIX=~/wsjtx/output ../wsjt-wsjtx/
cmake --build . -- -j4 
cmake --build . --target install