Getting Started¶
Platform Dependencies¶
Each supported platform has a set of dependencies which are required in order to build the oneAPI Construction Kit.
Once the platform dependencies have been installed please read the Developer Guide for more information about building and contributing to the oneAPI Construction Kit.
Ubuntu 22.04¶
On an x86-64 host system these are the minimum requirements to build the oneAPI Construction Kit. These packages are required for any build configuration.
$ sudo apt update
$ sudo apt install -y build-essential git cmake libtinfo-dev python3
Recommended for Ubuntu 22.04¶
Ninja is a useful, fast, build tool. To use it pass
-GNinja
to CMake the first time it configures a build directory.clang-format 17 is a tool to format C/C++/Java/JavaScript/Objective-C/Protobuf code. All oneAPI Construction Kit source files are required to be formatted before being committed to the repository, including source files which are generated by the build.
lit is a portable tool for executing LLVM and Clang style test suites.
$ sudo apt update
$ sudo apt install -y ninja-build doxygen python3-pip
$ sudo pip3 install lit virtualenv cmakelint clang-format==19.1.0
Tip
For ease of use python3
and pip3
can be symlinked to python
and
pip
with the following commands:
$ sudo apt install python-is-python3
$ sudo update-alternatives --install /usr/bin/pip pip `which pip3` 30
32-bit Compile¶
Install the 32-bit C and C++ standard libraries, LLVM also depends on the 32-bit terminal info library.
$ sudo apt install -y gcc-11-multilib g++-11-multilib libc6-dev:i386 lib32tinfo-dev
Warning
The gcc-multilib
and g++-multilib
packages conflict with the Arm and
AArch64 toolchain packages below. To install the 32 bit libraries at the same
time use gcc-11-multilib
, g++-11-multilib
, and libc6-dev:i386
that
gcc-multilib
and g++-multilib
depend on but do not conflict with the
Arm and AArch64 toolchain packages.
Arm 32-bit Cross Compile¶
In addition to the 32-bit packages, install the Arm toolchain.
$ sudo apt install -y gcc-11-arm-linux-gnueabihf g++-11-arm-linux-gnueabihf
Arm 64-bit (AArch64) Cross Compile¶
Install the AArch64 toolchain.
$ sudo apt install -y gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu
Ubuntu 24.04¶
This is supported, but has not been tested to the same level as 22.04. gcc version 13 is recommended for this operating system. This will be required for some qemu RISC-V features such as the half extension which was added in version 7.
Windows 10¶
On an x86-64 Windows 10 host system these are the minimum requirements to build the oneAPI Construction Kit. These tools are required for any build configuration.
Visual Studio 2019 or 2022.
CMake 3.4.3+
Python 3.6.9+
LunarG Vulkan SDK packages 1.1.97+
Windows 10 does not provide an adequate package manager. However, the third-party Chocolatey package manager can be used to install the required packages.
$ choco install -y python
$ choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
There are a number of choices for installing Git on Windows, the recommended
approach is to install Cmder which bundles Git, various UNIX core utilities,
and an improved cmd.exe
user experience.
$ choco install -y cmder
Alternatively, to install Git for Windows and forego using Cmder do the following.
$ choco install -y git
Recommended for Windows 10¶
Ninja is a useful, fast, build tool, to use it pass
-GNinja
to CMake the first time it configures a build directory.clang-format 16 is a tool to format C/C++/Java/JavaScript/Objective-C/Protobuf code, all oneAPI Construction Kit source files are required to be formatted before being committed to the repository, including source files which are generated by the build.
lit is a portable tool for executing LLVM and Clang style test suites.
$ choco install -y ninja doxygen.install
$ choco install -y llvm --version 18.1.5
$ pip install lit virtualenv cmakelint
Windows 11¶
Windows 11 is supported, but has not been tested to the same level as Windows 10.
SPIRV-Tools¶
SPIRV-Tools may optionally be installed on the system PATH
. This is
recommended to achieve good coverage of SPIR-V compilation paths.
Follow the build instructions, or install the pre-built binaries in the repository. It’s harder to pin down versions of SPIRV-Tools since they don’t do releases, but we should support any commit from after January 2019.
Ubuntu 22.04 and later users can install spirv-tools
from the package repository:
$ sudo apt install -y spirv-tools
Note for Windows, SPIR-V Tools can be installed from LunarG.
Warning
As the LunarG Vulkan SDK packages and the spirv-tools
package both
provide SPIRV-Tools builds, it is possible these packages may conflict
causing issues during installation. Choose one or the other.