build notes

Introduction

ssc can be built on various unii with CMake and clang or gcc for C++ 17 or better, or Visual Studios 2017 / 2019 / 2022 under Windows. Over time, I have built & tested it under various OSs on some amd64 & arm64 architectures, including various flavours of Linux (but especially Ubuntu), macOS, OpenBSD, and Windows.

riff on name

Although ssc builds with some older compilers on some older systems, some features are unavailable.

Be warned: ssc is written to run fast, not build fast. I could probably make some changes to improve build speed, but, to be honest, I find it quite acceptable on my primary build machine (which runs msvc). I regret to say the gcc build time can be rather poor.

You can download the current source here, or from github.

Libraries

Common dependencies

ssc needs boost version 1.75 or better, Microsoft’s GSL library (or #define NO_GSL), and, except for Windows, a recent version of the ICU libraries (or #define NOICU). To build the GUI version, #define WX, and you’ll need a recent version of wxWidgets (this may change). For signed output, install libreSSL, or an equivalent. Note that libreSSL is built into OpenBSD and Windows 11. An Operating System’s package manager often has appropriate versions ready to install.

You may need to set these environment variables:

  • BOOST: if you’re not using your operating system’s packaged flavour of boost, then set BOOST to your boost source root directory;
  • GSL: set it to your GSL root directory.
  • ICU_ROOT: if you’re not using your operating system’s packaged ICU, set ICU_ROOT to your ICU source root directory (alternatively, #define NOICU);
  • WX_ROOT: if you’re building the gui front end to ssc, you’ll need to install wxWidgets and set WX_ROOT to its installation directory;
  • SSL: if you want output signed, point SSL to your installation of libreSSL (or an equivalent). You may also need to #define SIGNED.

hunspell

Building ssc with spelling checks under unii, including macos, requires a development installation of hunspell, or equivalent. You should be able to install it using the appropriate package manager. Alternatively, #define NOSPELL.

winspell

The Windows build, by default, uses the native Windows spellchecker. Be warned that, in Windows 10, that doesn’t seem to work so well in contexts unimpaired by monolingualism. Alternatively, #define NOSPELL.

Building

Windows

To build from Visual Studio, navigate to recipe/tea, open the appropriate .sln file, then build. Only Visual Studios 2017, 2019 and 2022 have been built & tested for x64, and only 2022 has been tested for arm64 under Windows 10 & 11. Older versions for amd64 and i386 were tested on older versions of Windows.

On low resource machines, disable the /MP switch.

Unii & mock Unii

I wrote ssc using visual C++ and clang. It turns out that, regretfully, some of the choices I made left gcc ridiculously slow. I suggest, if you have the choice, that you avoid it.

You will need CMake 3.24 or better. On Linux, you will also need lsb-release. These can be found in most distributions’ standard packages. For macos, I used macports, but brew should be good too.

From the home directory, compile a normal build thus:

cmake .
make
make install

For a debug build:

cmake -DCMAKE_BUILD_TYPE=Debug .
make
make install

If everything works correctly, then everything will be built with a final result at the very end saying no failures. Having said that, given ssc is alpha, don’t be too surprised to see some warnings.

You can run the test suite thus:

ctest -V

Note that complaints about being unable to find or copy files during testing are of no concern. These come from scripts that set up or tear down individual tests. The standard commands used sometimes complain that they can’t find files they’re supposed to delete, which is a bit silly given that means things are already in the desired state.

riff on name

Unfortunately, the spelling tests depend on the local system spell checker, and they’re inconsistent across systems, so they’re excluded from the unix tests.

ssc has, at various times, been successfully built under versions of OpenBSD, FreeBSD, (mostly Ubuntu) Linux, & MacOS, on AMD64 and ARM64 architectures.

The current version of ssc requires the current version of an operating system. Older operating systems require older versions of ssc. Not all features work on all systems.

I’ve sometimes found it necessary to use cmake’s -DCMAKE_CXX_COMPILER=… switch.

Linux

I tend to build under ubuntu LTS, but many other flavours work too.

OpenBSD

You may need to increase significantly the available memory setting for your build account in login.conf.

macOS

Certain versions of macos clang produce buggy code, whether or not optimisations are applied. Use an alternative compiler if you want a stable executable. I suspect this is really due to a bug in ssc, but I’ve not been able to find it.

Testing

Windows

Under Visual Studio, run ssc-test using these arguments:

-v -x $(ProjectDir)..\..\ssc.exe -f $(ProjectDir)..\toast\ssc-test\win.lst

Add ‘-d’ if you want the test utility to retain intermediate output files.

CMake

Under CMake, run ctest:

ctest -V

(which runs an ssc-test for you, using nix.lst).

Dimitude

The testing utility is rather dim; it will test unbuilt features, causing failures.

Spelling test results depend on the dictionaries installed.

riff on name

Supporting libraries

GSL

If you can’t find a copy of Microsoft’s GSL in your system’s standard package suite, then grab a copy from github, unpack, build, and install it.

Boost

Boost is to C++ as breakfast to the working day.

Most package managers support it, including vcpkg. Alternatively, build your own version using the source found at boost.org.

ICU4C

The ICU4C C++ library is used to process unicode.

Most package managers support it. Alternatively, build your own version using the source found at icu.unicode.org.

LibreSSL

LibreSSL is only required if you wish to sign andor verify ssc’s output. Alternatives are available, although I’ve not tested them. It is built into OpenBSD and recent versions of Windows.

wxWidgets

This is only required if you make a GUI build. It can be found at wxwidgets.org. Note that it has not been tested for many of the systems supported by wxWidgets.

Dylan Harris
August 2025