Merge pull request #5064 from knst/ubuntu-22.10

fix: build on ubuntu 22.10 due to new gcc 12
This commit is contained in:
PastaPastaPasta 2022-11-02 10:25:01 -05:00 committed by GitHub
commit 1443b6fd31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 83 deletions

View File

@ -1338,6 +1338,11 @@ AX_BOOST_FILESYSTEM
AX_BOOST_THREAD AX_BOOST_THREAD
if test x$suppress_external_warnings != xno; then if test x$suppress_external_warnings != xno; then
dnl Prevent use of std::unary_function, which was removed in C++17,
dnl and will generate warnings with newer compilers.
dnl See: https://github.com/boostorg/container_hash/issues/22.
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"
BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS) BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS)
fi fi

View File

@ -1,19 +1,12 @@
package=libevent package=libevent
$(package)_version=2.1.8 $(package)_version=2.1.11-stable
$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-$($(package)_version)-stable $(package)_download_path=https://github.com/libevent/libevent/archive/
$(package)_file_name=$(package)-$($(package)_version)-stable.tar.gz $(package)_file_name=release-$($(package)_version).tar.gz
$(package)_sha256_hash=965cc5a8bb46ce4199a47e9b2c9e1cae3b137e8356ffdad6d94d3b9069b71dc2 $(package)_sha256_hash=229393ab2bf0dc94694f21836846b424f3532585bac3468738b7bf752c03901e
$(package)_patches=fix_android_arc4random_addrandom.patch
ifneq (,$(findstring android,$(host))) define $(package)_preprocess_cmds
define $(package)_preprocess_cmds ./autogen.sh
./autogen.sh && patch -p1 < $($(package)_patch_dir)/fix_android_arc4random_addrandom.patch endef
endef
else
define $(package)_preprocess_cmds
./autogen.sh
endef
endif
define $(package)_set_vars define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples $(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples

View File

@ -5,9 +5,14 @@ $(package)_file_name=$(package)-$($(package)_version).tar.xz
$(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b $(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b
$(package)_dependencies=libxcb $(package)_dependencies=libxcb
# This package explicitly enables -Werror=array-bounds, which causes build failures
# with GCC 12.1+. Work around that by turning errors back into warnings.
# This workaround would be dropped if the package was updated, as that would require
# a different build system (Meson)
define $(package)_set_vars define $(package)_set_vars
$(package)_config_opts = --enable-option-checking --disable-dependency-tracking $(package)_config_opts = --enable-option-checking --disable-dependency-tracking
$(package)_config_opts += --disable-static --disable-docs $(package)_config_opts += --disable-static --disable-docs
$(package)_cflags += -Wno-error=array-bounds
endef endef
define $(package)_preprocess_cmds define $(package)_preprocess_cmds

View File

@ -1,68 +0,0 @@
From cadae3ab7abf45e61ecae8aac39d97d1f3cbd336 Mon Sep 17 00:00:00 2001
From: Lawrence Nahum <lawrence@greenaddress.it>
Date: Sun, 3 Dec 2017 22:56:09 +0100
Subject: [PATCH] fixup
---
configure.ac | 1 +
evutil_rand.c | 3 +++
include/event2/util.h | 4 ++--
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7528d37..3bb2121 100644
--- a/configure.ac
+++ b/configure.ac
@@ -341,6 +341,7 @@ dnl Checks for library functions.
AC_CHECK_FUNCS([ \
accept4 \
arc4random \
+ arc4random_addrandom \
arc4random_buf \
eventfd \
epoll_create1 \
diff --git a/evutil_rand.c b/evutil_rand.c
index 046a14b..3f0bf2c 100644
--- a/evutil_rand.c
+++ b/evutil_rand.c
@@ -191,6 +191,7 @@ evutil_secure_rng_get_bytes(void *buf, size_t n)
{
ev_arc4random_buf(buf, n);
}
+#ifdef HAVE_ARC4RANDOM_ADDRANDOM
void
evutil_secure_rng_add_bytes(const char *buf, size_t n)
@@ -199,6 +200,8 @@ evutil_secure_rng_add_bytes(const char *buf, size_t n)
n>(size_t)INT_MAX ? INT_MAX : (int)n);
}
+#endif
+
void
evutil_free_secure_rng_globals_(void)
{
diff --git a/include/event2/util.h b/include/event2/util.h
index dd4bbb6..a9a169d 100644
--- a/include/event2/util.h
+++ b/include/event2/util.h
@@ -841,7 +841,7 @@ int evutil_secure_rng_init(void);
*/
EVENT2_EXPORT_SYMBOL
int evutil_secure_rng_set_urandom_device_file(char *fname);
-
+#ifdef HAVE_ARC4RANDOM_ADDRANDOM
/** Seed the random number generator with extra random bytes.
You should almost never need to call this function; it should be
@@ -858,7 +858,7 @@ int evutil_secure_rng_set_urandom_device_file(char *fname);
*/
EVENT2_EXPORT_SYMBOL
void evutil_secure_rng_add_bytes(const char *dat, size_t datlen);
-
+#endif
#ifdef __cplusplus
}
#endif
--
2.14.3

View File

@ -23,4 +23,6 @@ deadlock:src/qt/test/*
# External libraries # External libraries
deadlock:libdb deadlock:libdb
race:libzmq race:libzmq
race:epoll_ctl # https://github.com/bitcoin/bitcoin/pull/20218
# https://github.com/bitcoin/bitcoin/pull/20218, https://github.com/bitcoin/bitcoin/pull/20745
race:epoll_ctl