various: fix build with boost 1.89 (#505830)

This commit is contained in:
Philip Taron
2026-04-06 21:24:24 +00:00
committed by GitHub
11 changed files with 81 additions and 4 deletions
+7
View File
@@ -19,6 +19,13 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-BQg2rVYe1wJOX7YnvgDVpmN6hwBJZKH0fxm+8HC8bvY=";
};
# boost 1.89 removed the boost_system stub library
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
'FIND_PACKAGE(Boost REQUIRED COMPONENTS system filesystem iostreams program_options unit_test_framework)' \
'FIND_PACKAGE(Boost REQUIRED COMPONENTS filesystem iostreams program_options unit_test_framework)'
'';
nativeBuildInputs = [
cmake
];
+5
View File
@@ -27,6 +27,11 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_minimum_required(VERSION 3.2.2)" \
"cmake_minimum_required(VERSION 3.10)"
# boost 1.89 removed the boost_system stub library
substituteInPlace CMakeLists.txt --replace-fail \
'list(APPEND BOOST_COMPONENTS thread date_time chrono filesystem system program_options)' \
'list(APPEND BOOST_COMPONENTS thread date_time chrono filesystem program_options)'
'';
env.NIX_CFLAGS_COMPILE = "-Wno-error";
+5
View File
@@ -24,6 +24,11 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
sed -i '1i #include <algorithm>' src/fileshelter/ui/ShareCreateFormView.cpp
# boost 1.89 removed the boost_system stub library
substituteInPlace CMakeLists.txt --replace-fail \
'find_package(Boost REQUIRED COMPONENTS system program_options)' \
'find_package(Boost REQUIRED COMPONENTS program_options)'
'';
enableParallelBuilding = true;
+8
View File
@@ -44,6 +44,14 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace CMakeLists.txt \
--replace-fail "cmake_minimum_required (VERSION 3.1)" "cmake_minimum_required(VERSION 3.10)"
# boost 1.89 removed the boost_system stub library
substituteInPlace \
src/general/CMakeLists.txt \
src/test/CMakeLists.txt \
src/gripgen/CMakeLists.txt \
src/grip/CMakeLists.txt \
--replace-fail ' system' ""
'';
meta = {
+5
View File
@@ -37,6 +37,11 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail 'cmake_minimum_required(VERSION 2.8)' 'cmake_minimum_required(VERSION 3.10)'
# boost 1.89 removed the boost_system stub library
substituteInPlace libgrive/CMakeLists.txt --replace-fail \
'find_package(Boost 1.40.0 COMPONENTS program_options filesystem unit_test_framework regex system REQUIRED)' \
'find_package(Boost 1.40.0 COMPONENTS program_options filesystem unit_test_framework regex REQUIRED)'
'';
nativeBuildInputs = [
+14
View File
@@ -27,6 +27,20 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_minimum_required(VERSION 3.2.2)" \
"cmake_minimum_required(VERSION 3.10)"
# boost 1.89 removed the boost_system stub library
substituteInPlace \
curl/CMakeLists.txt \
dynamic_library/CMakeLists.txt \
execution/CMakeLists.txt \
file_util/CMakeLists.txt \
locale/CMakeLists.txt \
logging/CMakeLists.txt \
ruby/CMakeLists.txt \
util/CMakeLists.txt \
windows/CMakeLists.txt \
--replace-fail ' system' ""
substituteInPlace tests/CMakeLists.txt --replace-fail 'system ' ""
'';
env.NIX_CFLAGS_COMPILE = "-Wno-error";
+5
View File
@@ -25,6 +25,11 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace CMakeLists.txt --replace-fail \
"cmake_minimum_required(VERSION 3.2.2)" \
"cmake_minimum_required(VERSION 3.10)"
# boost 1.89 removed the boost_system stub library
substituteInPlace CMakeLists.txt --replace-fail \
'list(APPEND BOOST_COMPONENTS filesystem regex system thread)' \
'list(APPEND BOOST_COMPONENTS filesystem regex thread)'
'';
env.NIX_CFLAGS_COMPILE = "-Wno-error";
+3
View File
@@ -54,6 +54,9 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace ./CMakeLists.txt --replace-fail \
"cmake_minimum_required(VERSION 3.2 FATAL_ERROR)" \
"cmake_minimum_required(VERSION 4.0)"
# boost 1.89 removed the boost_system stub library
substituteInPlace CMakeLists.txt --replace-fail ' system' ""
'';
# causes redefinition of _FORTIFY_SOURCE
+11 -4
View File
@@ -34,10 +34,17 @@ stdenv.mkDerivation {
hash = "sha256-2fQQL0JoV8YukU+VW2iWS4DpBi1j361SfiXRHRmocRg=";
};
postPatch = lib.optional (stdenv.cc.isClang && (lib.versionAtLeast stdenv.cc.version "9")) ''
substituteInPlace cmake_configure.cmake \
--replace-fail 'target_link_libraries(rw_interface INTERFACE "stdc++fs")' ""
'';
postPatch =
lib.optionalString (stdenv.cc.isClang && (lib.versionAtLeast stdenv.cc.version "9")) ''
substituteInPlace cmake_configure.cmake \
--replace-fail 'target_link_libraries(rw_interface INTERFACE "stdc++fs")' ""
''
+ ''
# boost 1.89 removed the boost_system stub library
substituteInPlace CMakeLists.txt --replace-fail \
'find_package(Boost COMPONENTS program_options system REQUIRED)' \
'find_package(Boost COMPONENTS program_options REQUIRED)'
'';
nativeBuildInputs = [
cmake
+7
View File
@@ -20,6 +20,13 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-9caucSIEAjzc4cWShuwbBC+BLs5a3e3y58aT4aLzN5E=";
};
# boost 1.89 removed the boost_system stub library
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
'set( SFCGAL_Boost_COMPONENTS thread system serialization )' \
'set( SFCGAL_Boost_COMPONENTS thread serialization )'
'';
buildInputs = [
cgal
boost
+11
View File
@@ -55,6 +55,17 @@ stdenv.mkDerivation (finalAttrs: {
zeromq
];
# boost 1.89 removed the boost_system stub library
postPatch = ''
substituteInPlace cmake/modules/FindUHD.cmake --replace-fail \
'set(CMAKE_REQUIRED_LIBRARIES uhd boost_program_options boost_system)' \
'set(CMAKE_REQUIRED_LIBRARIES uhd boost_program_options)'
substituteInPlace lib/src/phy/rf/CMakeLists.txt --replace-fail \
'/usr/lib/x86_64-linux-gnu/libboost_system.so' ""
substituteInPlace CMakeLists.txt --replace-fail \
'list(APPEND BOOST_REQUIRED_COMPONENTS "system")' ""
'';
cmakeFlags = [
"-DENABLE_WERROR=OFF"
(lib.cmakeBool "ENABLE_LTE_RATES" enableLteRates)