> Start using libevent 2.1.12-stable in depends. Changelog is available here: https://raw.githubusercontent.com/libevent/libevent/release-2.1.12-stable/ChangeLog. This release basically only contains bug fixes.
>
> Upgrading will also prevent some oss-fuzz reports which are coming from libevent code
Also libevent 2.1.11 seems to be using deprecated glibc stuff that was removed in glibc 2.32
While working on the GUIX build, I got the following error message:
```
FAILED: src/bitcoin-cli
: && /home/pierre/.guix-profile/bin/g++ -m64 -m64 -g -O2 -Wl,--exclude-libs,libstdc++ -static-libstdc++ -Wl,-z,relro -Wl,-z,now -Wl,--wrap=__divmoddi4 -Wl,--wrap=log2f -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=pow -fPIE -pie src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o -o src/bitcoin-cli ../depends/x86_64-linux-gnu/lib/libjemalloc_pic.a src/libcommon.a src/librpcclient.a ../depends/x86_64-linux-gnu/lib/libevent.a src/libbitcoinconsensus.a src/libscript.a src/libcommon.a src/libbitcoinconsensus.a src/libscript.a src/secp256k1/libsecp256k1.a src/libutil.a ../depends/x86_64-linux-gnu/lib/libevent.a src/crypto/libcrypto.a src/crypto/libcrypto_sse4.1.a src/crypto/libcrypto_avx2.a src/crypto/libcrypto_shani.a ../depends/x86_64-linux-gnu/lib/libboost_filesystem-mt-x64.a ../depends/x86_64-linux-gnu/lib/libboost_thread-mt-x64.a src/univalue/libunivalue.a ../depends/x86_64-linux-gnu/lib/libjemalloc_pic.a -lm -pthread && :
ld: ../depends/x86_64-linux-gnu/lib/libevent.a(evutil_rand.o): in function `arc4_stir':
evutil_rand.c:(.text+0x2d2): undefined reference to `sysctl'
collect2: error: ld returned 1 exit status
```
This is a backport of core#21991
------
> build: don't install deprecated libevent headers
>
> We don't use the deprecated headers now, and never should do in the
> future, so there is no need for them to exist in depends.
>
> The headers themselves are just full of includes for the newer headers.
This is a backport of core#24526
-----
> build: prune compat event headers
>
> The *_compat headers are the deprecated / non-threadsafe versions of the
> current headers. There's no need for us to ship them in depends. Prune
> them are save the safe / nuke the possibility of them being used.
This is a backport of core#25918