Re: [Buildroot] [PATCH 1/3] package/bitcoin: Fix static link of libevent

Thomas Perale via buildroot <[email protected]> Fri, 24 Jul 2026 16:14:45 +0200
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
In reply of:
> Buildroot commit fabcd7c8cc44e7e03c68bfcd2b4e2d10331a93f6 bumped the
> package from 28.0 to 30.0 which includes upstream commit
> https://github.com/bitcoin/bitcoin/commit/b619bdc3303217f4415342fe60e586e18fa48308
> that was first included in version 29.0 and changed the linking of
> libevent libraries.
> 
> This causes build errors when linked statically due to the wrong order
> of libraries. To fix the problem we add a patch to change the order of
> the libevent libraries.
> 
> The patch was not sent upstream because libevent support was removed
> from the master branch with upstream commit:
> https://github.com/bitcoin/bitcoin/commit/35d2d0679782581cbbf05babc59f0f28858a9b72
> 
> Fixes:
> https://autobuild.buildroot.org/results/80e05370b6542ba2f5d2908bad7f420f76dc6831/
> 
> The oldest build error of this kind dates back to Dec 2025:
> https://autobuild.buildroot.net/results/6bb/6bbd822d55dfcf3862e8b713323e0f34f65990ee/
> 
> Signed-off-by: Bernd Kuhls <[email protected]>

Applied to 2026.05.x. Thanks

> ---
> Gitlab pipelines passed:
> https://gitlab.com/bkuhls/buildroot/-/commits/8d17d8107a074b94d628061a3c18917987141483
> 
>  .../0001-Fix-static-link-of-libevent.patch    | 36 +++++++++++++++++++
>  1 file changed, 36 insertions(+)
>  create mode 100644 package/bitcoin/0001-Fix-static-link-of-libevent.patch
> 
> diff --git a/package/bitcoin/0001-Fix-static-link-of-libevent.patch b/package/bitcoin/0001-Fix-static-link-of-libevent.patch
> new file mode 100644
> index 0000000000..8c8e95bd0f
> --- /dev/null
> +++ b/package/bitcoin/0001-Fix-static-link-of-libevent.patch
> @@ -0,0 +1,36 @@
> +From 28c3533e5fb350fe1c27cf06dee6928825bc7bf2 Mon Sep 17 00:00:00 2001
> +From: Bernd Kuhls <[email protected]>
> +Date: Sat, 18 Jul 2026 07:46:09 +0200
> +Subject: [PATCH] Fix static link of libevent
> +
> +Change link order to fix build error
> +
> +/home/thomas/autobuild/instance-2/output-1/host/lib/gcc/i686-buildroot-linux-musl/14.3.0/../../../../i686-buildroot-linux-musl/bin/ld:
> + /home/thomas/autobuild/instance-2/output-1/host/i686-buildroot-linux-musl/sysroot/usr/lib/libevent_extra.a(http.o):
> + in function `evhttp_connection_retry':
> +http.c:(.text+0x1f7b): undefined reference to `bufferevent_socket_get_conn_address_'
> +
> +Upstream: Not applicable (libevent support was removed in master branch)
> +
> +Signed-off-by: Bernd Kuhls <[email protected]>
> +---
> + src/CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> +index ad18115bbc..8e2a7bfcce 100644
> +--- a/src/CMakeLists.txt
> ++++ b/src/CMakeLists.txt
> +@@ -355,8 +355,8 @@ if(BUILD_CLI)
> +     bitcoin_cli
> +     bitcoin_common
> +     bitcoin_util
> +-    libevent::core
> +     libevent::extra
> ++    libevent::core
> +   )
> +   install_binary_component(bitcoin-cli HAS_MANPAGE)
> + endif()
> +-- 
> +2.47.3
> +
> -- 
> 2.47.3
> 
> _______________________________________________
> buildroot mailing list
> [email protected]
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot