diff options
author | Giuliano Procida <gprocida@google.com> | 2024-05-10 07:28:03 +0100 |
---|---|---|
committer | Giuliano Procida <gprocida@google.com> | 2024-05-10 07:33:46 +0100 |
commit | 5adbe8ef91fc7932683d3f88ece819bc695e56af (patch) | |
tree | 01f936483968a98cc4e1621968845640687885b3 | |
parent | de821f47d1e211ca6981436dece5fed6b0aa97d2 (diff) | |
download | stg-5adbe8ef91fc7932683d3f88ece819bc695e56af.tar.gz |
CMake build: add dependency version information
* CMake: 3.14 is some years old and supports everything we need
* elfutils: 0.189 contains an interface we contributed and need
* libxml: 2.9 is an older version supporting everything we need
* Linux UAPI: 5.19 has the BTF node definition for enum64 types
* Protocol Buffers: the repeated field header files are in 3.19
* jemalloc: 5 is the current major version and is in common use
* Catch: versions 2 and 3 are not compatible and we are using 2
PiperOrigin-RevId: 632388642
Change-Id: Ic58d0b01997f5a640e1e42cedabdd4bf366ca767
-rw-r--r-- | CMakeLists.txt | 12 | ||||
-rw-r--r-- | README.md | 26 |
2 files changed, 19 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 17fd062..f28e0d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,11 +49,11 @@ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -find_package(LibElf REQUIRED) -find_package(LibDw REQUIRED) -find_package(LibXml2 REQUIRED) -find_package(LinuxUAPI REQUIRED) -find_package(Protobuf REQUIRED) +find_package(LibElf 0.189 REQUIRED) +find_package(LibDw 0.189 REQUIRED) +find_package(LibXml2 2.9 REQUIRED) +find_package(LinuxUAPI 5.19 REQUIRED) +find_package(Protobuf 3.19 REQUIRED) if(NOT Protobuf_PROTOC_EXECUTABLE) message(FATAL_ERROR "Could NOT find protobuf::protoc. @@ -67,7 +67,7 @@ set(COMMON_LIBRARIES protobuf::libprotobuf) if(NOT Jemalloc_DISABLE) - find_package(Jemalloc) + find_package(Jemalloc 5) if(Jemalloc_FOUND) list(APPEND COMMON_LIBRARIES Jemalloc::Jemalloc) else() @@ -38,19 +38,19 @@ Instructions are included for local and Docker builds. ### Dependencies STG is written in C++20. It is known to compile with GCC 11, Clang 15 or -later versions. - -| *Dependency* | *Debian* | *RedHat* | -| ------------- | ----------------- | ----------------- | -| build | cmake | cmake | -| ELF, BTF | libelf-dev | elfutils-devel | -| DWARF | libdw-dev | elfutils-devel | -| XML | libxml2-dev | libxml2-devel | -| BTF | linux-libc-dev | kernel-headers | -| native format | libprotobuf-dev | protobuf-devel | -| native format | protobuf-compiler | protobuf-compiler | -| allocator[^1] | libjemalloc-dev | jemalloc-devel | -| catch2[^2] | catch2 | catch2-devel | +later versions. Mininum requirements for a local build are: + +| *Dependency* | *Debian* | *RedHat* | *Version* | +| ------------- | ----------------- | ----------------- | --------- | +| build | cmake | cmake | 3.14 | +| ELF, BTF | libelf-dev | elfutils-devel | 0.189 | +| DWARF | libdw-dev | elfutils-devel | 0.189 | +| XML | libxml2-dev | libxml2-devel | 2.9 | +| BTF | linux-libc-dev | kernel-headers | 5.19 | +| native format | libprotobuf-dev | protobuf-devel | 3.19 | +| native format | protobuf-compiler | protobuf-compiler | 3.19 | +| allocator[^1] | libjemalloc-dev | jemalloc-devel | 5 | +| catch2[^2] | catch2 | catch2-devel | 2 (only) | [^1]: jemalloc is optional, but will likely improve performance. [^2]: catch2 is optional, but required to build the test suite. |