You are not logged in.
So, I'm working on a project where I need to use the boost library and linked that in my CMakeLists.txt. However, apparently this project requires the system package, which has been removed from the current version of boost.
So now I'm trying to figure out how to have cmake use the required version of boost (1.54 according to the project files), without installing it system-wide. But I'm just confused on how to do that. Can anyone help me with this?
My CMakeLists.txt has the following lines:
```
cmake_minimum_required(VERSION 3.10)
project(MyProject)
find_package(Boost 1.54 QUIET REQUIRED COMPONENTS system unit_test_framework)
add_definitions(-DH5_USE_BOOST )
include_directories(SYSTEM ${Boost_INCLUDE_DIR})
```
which produce:
```
CMake Error at /usr/lib/cmake/Boost-1.89.0/BoostConfig.cmake:141 (find_package):
Could not find a package configuration file provided by "boost_system"
(requested version 1.89.0) with any of the following names:
boost_systemConfig.cmake
boost_system-config.cmake
Add the installation prefix of "boost_system" to CMAKE_PREFIX_PATH or set
"boost_system_DIR" to a directory containing one of the above files. If
"boost_system" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
/usr/lib/cmake/Boost-1.89.0/BoostConfig.cmake:262 (boost_find_component)
/usr/share/cmake/Modules/FindBoost.cmake:610 (find_package)
CMakeLists.txt:4 (find_package)
```
Last edited by morganazeefae (2026-01-21 22:04:09)
Offline
Remove system from the required components, it has been a stub for a long time, and has been removed with 1.89:
https://bbs.archlinux.org/viewtopic.php?id=309669
https://github.com/boostorg/system/comm … 839b0fd3a3
Mainboard: GIGABYTE B550 AORUS ELITE V2 | CPU: Ryzen 7 5800X | RAM: 32 GB
GPU: GeForce RTX 4060 8 GB (580.119.02 proprietary) | Display: BenQ BL2405 1920x1080
Kernel: 6.18.1 stable | Boot Manager: GRUB2 | DE: KDE Plasma | Login Manager: SDDM | Compositor: KWin
Offline
Mod note: Moving to programming & scripting.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Removing system from the source (and replacing things that do need system by supported methods) is the best cause of action.
In case that's not doable, there are several pre-189 boost packages in AUR .
((I just tested my boost 183 package , it still builds fine in a clean chroot) .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
You don't have to remove system references from any header and/or source files, it is available by default, just modify the CMakeLists.txt so CMake doesn't look for its (no longer existing) config.
Mainboard: GIGABYTE B550 AORUS ELITE V2 | CPU: Ryzen 7 5800X | RAM: 32 GB
GPU: GeForce RTX 4060 8 GB (580.119.02 proprietary) | Display: BenQ BL2405 1920x1080
Kernel: 6.18.1 stable | Boot Manager: GRUB2 | DE: KDE Plasma | Login Manager: SDDM | Compositor: KWin
Offline
Alright, simply removing the system references from CMakeLists.txt worked. Thanks, guys.
Offline