18.1.2. Building from Source on Linux - 5.2 English - 57404

AOCL User Guide (57404)

Document ID
57404
Release Date
2025-12-29
Version
5.2 English
  1. Download the latest release of AOCL-Utils (amd/aocl-utils).

  2. Clone the Git repository:

    $ git clone https://github.com/amd/aocl-utils.git
    $ cd aocl-utils
    
  3. Configure the build:

    Basic configuration:

    $ cmake -B build -DCMAKE_INSTALL_PREFIX=install_dir
    

    With specific compiler and generator:

    $ cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang \
            -G "Unix Makefiles" -B build -DCMAKE_INSTALL_PREFIX=install_dir
    
  4. Build:

$ cmake --build build --config release -j
  1. Install:

   $ cmake --install build --config release

This command places:

- Header files in ``<Install Path>/include``
- Static and dynamic libraries in ``<Install Path>/lib`` or ``lib64``

Note

  • This command creates lib/lib64 directory for the binaries. To have a custom library path, use CMAKE_INSTALL_LIBDIR.

  • Update the include path and library path in your project to link with the installed libraries, or use LD_LIBRARY_PATH to point to the installed library path.

  • Refer to the API documentation and examples in the SDK/Examples folder to understand how to link and use the modules.

Important

  • Most CPUID APIs (and their headers) introduced in 4.2 are deprecated and will be removed in a future release. See the API documentation for the newer APIs.

  • Old APIs can be enabled with AU_ENABLE_OLD_API=ON during the build. Failure to do so will result in warnings regarding deprecated APIs.

  • The aoclutils module combines au_core and au_cpuid.

  • The aoclutils module is the default module for all functionalities.

Build Options:

Build Flags

Description

Default

AU_BUILD_DOCS

Generate Docs during build

OFF/ON

AU_BUILD_EXAMPLES

Build examples

OFF/ON

AU_BUILD_TESTS

Build tests

OFF/ON

AU_BUILD_TYPE

Build type

Release (Debug, Developer)

AU_ENABLE_OLD_API

Enable OLD alci_* APIs

OFF/ON

AU_BUILD_SHARED_LIBS

Build shared libraries

ON/OFF

AU_BUILD_STATIC_LIBS

Build static libraries

ON/OFF

AU_BUILD_WITH_ASAN

Enable ASAN options

OFF/ON

AU_BUILD_WITH_TSAN

Enable TSAN options

OFF/ON

AU_BUILD_WITH_MEMSAN

Enable MEMSAN options

OFF/ON