What changed, and why it matters
This commit removes the libevent dependency from Bitcoin Core's build system ('depends'). It deletes the build recipe, patches, and references to libevent in makefiles and documentation. There is no direct code change to Bitcoin Core's runtime behavior, and nothing in the commit indicates a security vulnerability or fix. It is a build-maintenance change.
No security action required. Treat as routine build-system cleanup. Reviewers may verify that libevent is no longer required by any build configuration.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit a0ca249f3fc8a678855925a83d508073916e0f79 removes libevent from the depends build system: deletes depends/packages/libevent.mk and three libevent patches, removes libevent from depends/packages/packages.mk and depends/Makefile, and updates depends/README.md to drop the NO_LIBEVENT option. The diff shows only deletions of build/packaging metadata. No source code changes, no bug fix, no security patch, and no vendor disclosure of security relevance are present.
Changed components
depends/Makefiledepends/README.mddepends/packages/libevent.mkdepends/packages/packages.mkdepends/patches/libevent/cmake_fixups.patchdepends/patches/libevent/netbsd_fixup.patchdepends/patches/libevent/winver_fixup.patchInspect captured patch +1 / −211
diff --git a/depends/Makefile b/depends/Makefile
index c377187b..b55ac440 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -35,7 +35,6 @@ WORK_PATH = $(BASEDIR)/work
BASE_CACHE ?= $(BASEDIR)/built
SDK_PATH ?= $(BASEDIR)/SDKs
NO_BOOST ?=
-NO_LIBEVENT ?=
NO_QT ?=
NO_QR ?=
NO_WALLET ?=
@@ -154,8 +153,6 @@ $(host_arch)_$(host_os)_id:=$(shell env CC='$(host_CC)' C_STANDARD='$(C_STANDARD
boost_packages_$(NO_BOOST) = $(boost_packages)
-libevent_packages_$(NO_LIBEVENT) = $(libevent_packages)
-
qrencode_packages_$(NO_QR) = $(qrencode_$(host_os)_packages)
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_)
@@ -167,7 +164,7 @@ zmq_packages_$(NO_ZMQ) = $(zmq_packages)
ipc_packages_$(NO_IPC) = $(ipc_packages)
usdt_packages_$(NO_USDT) = $(usdt_$(host_os)_packages)
-packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(boost_packages_) $(libevent_packages_) $(qt_packages_) $(wallet_packages_) $(usdt_packages_)
+packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(boost_packages_) $(qt_packages_) $(wallet_packages_) $(usdt_packages_)
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) $(qt_native_packages_)
ifneq ($(zmq_packages_),)
diff --git a/depends/README.md b/depends/README.md
index b12df135..b7d7d226 100644
--- a/depends/README.md
+++ b/depends/README.md
@@ -90,7 +90,6 @@ The following can be set when running make: `make FOO=bar`
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++20`.
- `NO_BOOST`: Don't download/build/cache Boost
-- `NO_LIBEVENT`: Don't download/build/cache Libevent
- `NO_QT`: Don't download/build/cache Qt and its dependencies
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk
deleted file mode 100644
index 33eeed55..00000000
--- a/depends/packages/libevent.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-package=libevent
-$(package)_version=2.1.12-stable
-$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)/
-$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
-$(package)_patches=cmake_fixups.patch
-$(package)_patches += netbsd_fixup.patch
-$(package)_patches += winver_fixup.patch
-$(package)_build_subdir=build
-
-# When building for Windows, we set _WIN32_WINNT to target the same Windows
-# version as we do in releases. Due to quirks in libevents build system, this
-# is also required to enable support for ipv6. See #19375.
-define $(package)_set_vars
- $(package)_config_opts=-DCMAKE_BUILD_TYPE=None -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_OPENSSL=ON
- $(package)_config_opts+=-DEVENT__DISABLE_SAMPLES=ON -DEVENT__DISABLE_REGRESS=ON
- $(package)_config_opts+=-DEVENT__DISABLE_TESTS=ON -DEVENT__LIBRARY_TYPE=STATIC
- $(package)_cflags += -fdebug-prefix-map=$($(package)_extract_dir)=/usr -fmacro-prefix-map=$($(package)_extract_dir)=/usr
- $(package)_cppflags += -D_GNU_SOURCE -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
- $(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0A00
-endef
-
-define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \
- patch -p1 < $($(package)_patch_dir)/netbsd_fixup.patch && \
- patch -p1 < $($(package)_patch_dir)/winver_fixup.patch
-endef
-
-define $(package)_config_cmds
- $($(package)_cmake) -S .. -B .
-endef
-
-define $(package)_build_cmds
- $(MAKE)
-endef
-
-define $(package)_stage_cmds
- $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
-
-define $(package)_postprocess_cmds
- rm -rf bin lib/pkgconfig && \
- rm include/ev*.h && \
- rm include/event2/*_compat.h && \
- rm lib/libevent.a
-endef
diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk
index 22ae4787..a5384331 100644
--- a/depends/packages/packages.mk
+++ b/depends/packages/packages.mk
@@ -2,8 +2,6 @@ packages:=
boost_packages = boost
-libevent_packages = libevent
-
qrencode_linux_packages = qrencode
qrencode_freebsd_packages = qrencode
qrencode_darwin_packages = qrencode
diff --git a/depends/patches/libevent/cmake_fixups.patch b/depends/patches/libevent/cmake_fixups.patch
deleted file mode 100644
index a8812afd..00000000
--- a/depends/patches/libevent/cmake_fixups.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-cmake: set minimum version to 3.5
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -19,7 +19,7 @@
- # start libevent.sln
- #
-
--cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
-+cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
- if (POLICY CMP0054)
- cmake_policy(SET CMP0054 NEW)
diff --git a/depends/patches/libevent/netbsd_fixup.patch b/depends/patches/libevent/netbsd_fixup.patch
deleted file mode 100644
index 21d96aaf..00000000
--- a/depends/patches/libevent/netbsd_fixup.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Improve portability on NetBSD
-
-According to GCC documentation, "the various `-std` options disable
-certain keywords".
-This change adheres to GCC's recommendation by replacing the `typeof`
-keyword with its alternative, `__typeof__`.
-
-See https://github.com/libevent/libevent/commit/1759485e9a59147a47a674f5132fcfe764e7748c.
-
-
---- a/kqueue.c
-+++ b/kqueue.c
-@@ -52,8 +52,8 @@
- * intptr_t, whereas others define it as void*. There doesn't seem to be an
- * easy way to tell them apart via autoconf, so we need to use OS macros. */
- #if defined(__NetBSD__)
--#define PTR_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(x))
--#define INT_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(intptr_t)(x))
-+#define PTR_TO_UDATA(x) ((__typeof__(((struct kevent *)0)->udata))(x))
-+#define INT_TO_UDATA(x) ((__typeof__(((struct kevent *)0)->udata))(intptr_t)(x))
- #elif defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__)
- #define PTR_TO_UDATA(x) ((intptr_t)(x))
- #define INT_TO_UDATA(x) ((intptr_t)(x))
diff --git a/depends/patches/libevent/winver_fixup.patch b/depends/patches/libevent/winver_fixup.patch
deleted file mode 100644
index 4995c356..00000000
--- a/depends/patches/libevent/winver_fixup.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-Cherry-picked from a14ff91254f40cf36e0fee199e26fb11260fab49.
-
-move _WIN32_WINNT defintions before first #include
-
-_WIN32_WINNT and WIN32_LEAN_AND_MEAN need to be defined
-before the windows.h is included for the first time.
-Avoid the confusion of indirect #include by defining
-before any.
-
-diff --git a/event_iocp.c b/event_iocp.c
-index 6b2a2e15..4955e426 100644
---- a/event_iocp.c
-+++ b/event_iocp.c
-@@ -23,12 +23,14 @@
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
--#include "evconfig-private.h"
-
- #ifndef _WIN32_WINNT
- /* Minimum required for InitializeCriticalSectionAndSpinCount */
- #define _WIN32_WINNT 0x0403
- #endif
-+
-+#include "evconfig-private.h"
-+
- #include <winsock2.h>
- #include <windows.h>
- #include <process.h>
-diff --git a/evthread_win32.c b/evthread_win32.c
-index 2ec80560..8647f72b 100644
---- a/evthread_win32.c
-+++ b/evthread_win32.c
-@@ -23,18 +23,21 @@
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
--#include "event2/event-config.h"
--#include "evconfig-private.h"
-
- #ifdef _WIN32
- #ifndef _WIN32_WINNT
- /* Minimum required for InitializeCriticalSectionAndSpinCount */
- #define _WIN32_WINNT 0x0403
- #endif
--#include <winsock2.h>
- #define WIN32_LEAN_AND_MEAN
-+#endif
-+
-+#include "event2/event-config.h"
-+#include "evconfig-private.h"
-+
-+#ifdef _WIN32
-+#include <winsock2.h>
- #include <windows.h>
--#undef WIN32_LEAN_AND_MEAN
- #include <sys/locking.h>
- #endif
-
-diff --git a/evutil.c b/evutil.c
-index 9817f086..8537ffe8 100644
---- a/evutil.c
-+++ b/evutil.c
-@@ -24,6 +24,14 @@
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-+#ifdef _WIN32
-+#ifndef _WIN32_WINNT
-+/* For structs needed by GetAdaptersAddresses */
-+#define _WIN32_WINNT 0x0501
-+#endif
-+#define WIN32_LEAN_AND_MEAN
-+#endif
-+
- #include "event2/event-config.h"
- #include "evconfig-private.h"
-
-@@ -31,15 +39,10 @@
- #include <winsock2.h>
- #include <winerror.h>
- #include <ws2tcpip.h>
--#define WIN32_LEAN_AND_MEAN
- #include <windows.h>
--#undef WIN32_LEAN_AND_MEAN
- #include <io.h>
- #include <tchar.h>
- #include <process.h>
--#undef _WIN32_WINNT
--/* For structs needed by GetAdaptersAddresses */
--#define _WIN32_WINNT 0x0501
- #include <iphlpapi.h>
- #include <netioapi.h>
- #endif
-diff --git a/listener.c b/listener.c
-index f5c00c9c..d1080e76 100644
---- a/listener.c
-+++ b/listener.c
-@@ -24,16 +24,19 @@
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-+#ifdef _WIN32
-+#ifndef _WIN32_WINNT
-+/* Minimum required for InitializeCriticalSectionAndSpinCount */
-+#define _WIN32_WINNT 0x0403
-+#endif
-+#endif
-+
- #include "event2/event-config.h"
- #include "evconfig-private.h"
-
- #include <sys/types.h>
-
- #ifdef _WIN32
--#ifndef _WIN32_WINNT
--/* Minimum required for InitializeCriticalSectionAndSpinCount */
--#define _WIN32_WINNT 0x0403
--#endif
- #include <winsock2.h>
- #include <winerror.h>
- #include <ws2tcpip.h>
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.