asio: fix build with boost 1.89

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 [1].

Upstream issue: https://github.com/chriskohlhoff/asio/issues/1716

[1] https://www.boost.org/releases/1.89.0/
This commit is contained in:
Tom Hunze 2026-02-19 19:51:00 +01:00
parent e88108f433
commit cdcd8ed951
No known key found for this signature in database
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