Skip to content
Michael Grossniklaus edited this page Dec 12, 2025 · 16 revisions

This page provides a tutorial on how to build the LLVM frontend for the Oberon programming language on Linux. Since this project uses CMake to manage its build process, it is recommended to use the CLion IDE under Linux, which uses CMakeLists.txt natively as its project model. Furthermore, the GNU Compiler Collection (GCC) is assumed to be used to compile the frontend.

Prerequisites

Before the Oberon LLVM frontend can be built, the Boost libraries (algorithm, convert, filesystem, and program-options components) and the LLVM Compiler Infrastructure (core libraries and tools) need to be installed. On Ubuntu, it is recommended to use the Advanced Package Tool (APT), whereas on Fedora, it is recommended to use Dandified YUM (DNF) to accomplish this task. Note that this tutorial assumes that standard build tools such as git, make, and cmake are available on the system used to build the frontend. Otherwise, these tools can also be installed using either APT or DNF.

Installing Boost

  • Ubuntu
    sudo apt install libboost-all-dev
    
  • Fedora
    sudo dnf install boost-devel
    

Installing LLVM and LLD

  • Ubuntu
    sudo apt install llvm-dev
    sudo apt install liblld-dev
    
  • Fedora
    sudo dnf install llvm-devel
    sudo dnf install lld-devel
    

Installing Test Framework

pip3 install lit [--break-system-packages]
pip3 install filecheck [--break-system-packages]

Installing Documentation Tools

pip3 install sphinx [--break-system-packages]
pip3 install sphinx_rtd_theme [--break-system-packages]

Building the Frontend

The LLVM frontend for the Oberon programming language on Linux can be built from the command line or using an IDE that supports CMake projects such as CLion.

Begin by cloning the project repository from GitLab.

git clone https://github.com/zaskar9/oberon-lang.git

Command Line

  1. Navigate to the oberon-lang directory and create a new build directory. Then, navigate to the newly created build directory.

    cd oberon-lang
    
    mkdir build
    
    cd build
    
  2. Invoke CMake to set up the build toolchain and generate the required build files.

    cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
    
  3. As a result, CMake will create a generator that can be used to build the frontend.

    cmake --build . --parallel
    

After the build successfully terminates, the oberon-lang binary can be found in the oberon-lang/build/olang subdirectory, whereas the standard library is located in the oberon-lang/build/stdlib subdirectory.

CLion

  1. Start CLion and select Open in the welcome dialog.

  2. Navigate to the oberon-lang folder to which you cloned the project repository and click Open.

  3. Once the project is open, build it using the BuildBuild Project menu.

Once the build successfully terminates, the oberon-lang executable can be found in the oberon-lang/cmake-build-debug/olang or oberon-lang/cmake-build-release/olang subdirectory.

Clone this wiki locally