asio: fix build with boost 1.89 (#492215)

This commit is contained in:
Aleksana
2026-02-20 14:48:42 +00:00
committed by GitHub
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
diff --git a/src/examples/cpp11/Makefile.am b/src/examples/cpp11/Makefile.am
index a132a469f..65eb90a6d 100644
--- a/src/examples/cpp11/Makefile.am
+++ b/src/examples/cpp11/Makefile.am
@@ -289,9 +289,9 @@ endif
if HAVE_BOOST_COROUTINE
spawn_echo_server_SOURCES = spawn/echo_server.cpp
-spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
+spawn_echo_server_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono
spawn_parallel_grep_SOURCES = spawn/parallel_grep.cpp
-spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono -lboost_system
+spawn_parallel_grep_LDADD = $(LDADD) -lboost_coroutine -lboost_context -lboost_thread -lboost_chrono
endif
EXTRA_DIST = \

View File

@@ -29,6 +29,14 @@ stdenv.mkDerivation (finalAttrs: {
sourceRoot = "${finalAttrs.src.name}/asio";
patches = [
# Linking against `boost_system` fails because the stub compiled library
# of Boost.System, which has been a header-only library since 1.69, was
# removed in 1.89.
# Upstream issue: https://github.com/chriskohlhoff/asio/issues/1716
./boost-1.89.patch
];
nativeBuildInputs = [
autoreconfHook
pkg-config