Builds all dependencies used directly when developing underview software
Tested Distro's
- Ubuntu 20.04
- Ubuntu 22.04
- Arch Linux (sway)
Project currently utilizes GCC 13.
Debian
$ sudo apt update -y && sudo apt upgrade -y
# reboot
$ sudo apt install -y aptitude
$ sudo aptitude install -y build-essential cmake clang automake autoconf autopoint libtool flex bison m4 yasm dos2unix
$ sudo aptitude install -y pkg-config python3-pip ninja-build curl wget git gperf texinfo libmount-dev
$ sudo python3 -m pip install meson==1.3.1 Mako jinja2
# Update Kernel Version >= 5.20.0
$ sudo add-apt-repository ppa:cappelikan/ppa -y
$ sudo aptitude update -y
$ sudo aptitude install -y mainline
$ mainline --list
$ mainline --install 6.3.4
# reboot
Switching GCC version
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo aptitude update -y
$ sudo aptitude install -y gcc-13 g++-13 gcc-12 g++12 gcc-11 g++11
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 90 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 80 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
$ sudo update-alternatives --config gcc
Arch Linux
$ sudo pacman -Syyu --noconfirm
$ sudo pacman -S --noconfirm base-devel cmake clang wget zip yasm dos2unix
$ sudo pacman -S --noconfirm python3 python-pip ninja curl git gperf
$ sudo python3 -m pip install meson==1.3.1 Mako jinja2
$ ./build.sh
Override TASKTHREADS/BUILDTHREADS variables
- BUILDTHREADS - variable used to specify cpu core count when building with ninja/make/etc...
- TASKTHREADS - TBA
NOTE: by doing so you are now at the mercy of the Out Of Memory (OOM) killer.
$ BUILDTHREADS=$(nproc) ./build.sh
Changing Build Types
By Default BUILDTYPE
is set to Release
. BUILDTYPE
potential value have a one to
one relation with CMAKE_BUILD_TYPE
values
(see CMAKE_CONFIGURATION_TYPES).
-
Options
$ BUILDTYPE="Debug" ./build.sh $ BUILDTYPE="RelWithDebInfo" ./build.sh $ BUILDTYPE="MinSizeRel" ./build.sh
Development
$ . ./build.sh
$ underview-create <recipe> <optional task argument>
Set environment variables
$ . ./setenvars.sh
Running monado
$ monado-service &
# active_runtime.json is generated by monado recipe
# There seems to be a bug when you first run `hello_xr -g Vulkan`
# the active_runtime.json file gets deleted re-add if problem occur
$ mkdir -p $(pwd)/working/build_output/etc/openxr/1/
$ cp -av $(pwd)/active_runtime.json $(pwd)/working/build_output/etc/openxr/1/
$ hello_xr -g Vulkan