This project tree is meant to exercise and test the OS-agnostic portions of the framework.
As described in the main project README
, a C++ 20 compiler and CMake are required. So, any distribution satisfying these requirements may be used. A known working environment is ubuntu 22.04 (jammy) with a few development packages. Instructions for setting up this environment are provided below.
If development on Windows is desired, ubuntu may be installed in WSL using a rootfs image. To install WSL, on newer versions of Windows 10, use the following command: wsl --install --no-distribution
. For complete instructions, refer to https://learn.microsoft.com/en-us/windows/wsl/install. Then follow these steps to install jammy on WSL:
- Download the ubuntu 22.04 wsl rootfs archive https://cloud-images.ubuntu.com/wsl/jammy/current/ubuntu-jammy-wsl-amd64-wsl.rootfs.tar.gz.
- Unzip the archive to get the .tar file (eg. 7-zip). DO NOT UNTAR THE ARCHIVE
- Choose a location to store the WSL ubuntu filesystem image. A good way to keep organized is to use a top-level directory for all wsl filesystem images such as
c:\wsl
, then add a sub-directory for each distribution installed, such asc:\wsl\focal
,c:\wsl\fedora35
, etc. It's also recommended to do this on a non-system drive if one is available for performance reasons. - Start an elevated command-prompt, and enter the following series of commands:
mkdir c:\wsl\jammy
wsl --import jammy c:\wsl\jammy c:\users\myusername\Downloads\ubuntu-22.04-server-cloudimg-amd64-wsl.rootfs.tar
wsl -d jammy
- You are now running in a root shell on a fresh ubuntu 22.04 installation. Set up a non-root user to use by default:
adduser mycoolusername
# <accept all defaults by successively hitting 'Enter', and set a password>
usermod -G sudo mycoolusername
# install an editor if you don't like the ones pre-installed (vi and nano are available out of the box)
- Create the file
/etc/wsl.conf
(need sudo), and save the following contents to it:
[user]
default=mycoolusername
- Exit ubuntu:
exit
- Shutdown WSL so it can pick up the new default user changes, and re-run ubuntu:
wsl --shutdown
wsl -d jammy
You should now be logged on as mycoolusername
.
Execute the following commands in a shell:
sudo apt update
sudo apt-get install -y build-essential git ninja-build clang clang-format clang-tidy llvm lldb gnupg gdb zip unzip tar curl pkg-config wget
The above will install all the tools required to compile, lint, and debug the project, except for CMake. The build requires CMake version 3.25+ and the version shipping with Ubuntu 22.04 doesn't meet this requirement. Therefore, it must be installed manually using Kitware's standalone apt repository. Perform the following steps:
- Remove the default version provided by Ubuntu, in case it was installed:
sudo apt purge --auto-remove cmake
- Update apt sources and install dependencies:
sudo apt update && \
sudo apt install -y software-properties-common lsb-release && \
sudo apt clean all
- Add the Kitware apt repository:
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository -y "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
- Add Kitware's keyring packaging to keep their signing key up to date:
sudo apt update
sudo apt install kitware-archive-keyring
sudo rm /etc/apt/trusted.gpg.d/kitware.gpg
- Install the CMake package:
sudo apt update
sudo apt install cmake
If running sudo apt update
outputs the following error regarding signature verification:
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://apt.kitware.com/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 42D5A192B819C5DA
copy the public key (here 42D5A192B819C5DA
), and issue the following command to add it, then re-run apt update and install:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 42D5A192B819C5DA
sudo apt update
sudo apt install cmake