From 8ae94ada7cf714a453eb62bee26bb16be2206829 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 26 Mar 2020 16:05:35 +0800 Subject: [PATCH] Merge #18397: build: Fix libevent linking for bench_bitcoin binary cd04286825c6512b46bf59ab7b3dfffb0e36d65b build: Fix typo in EVENT_CFLAGS variable (Hennadii Stepanov) f709ad0c907d87d03002455967cc30ae7d704d80 build: Fix libevent linking for bench_bitcoin binary (Hennadii Stepanov) Pull request description: This change fixes `libevent` linking error for the `bench_bitcoin` binary. This PR is an alternative to #18377. Fix #18373. Also fixed a typo in `EVENT_CFLAGS` variable noted by **brakmic**. ACKs for top commit: fanquake: ACK cd04286825c6512b46bf59ab7b3dfffb0e36d65b Tree-SHA512: a62f7457e86b11d3a55d603ea5d83f3a413792e2f28a0c72300e54d12591bd6f0acc1d76a4bd4b591e0223bc6d530e7a4b9a8b939fe2fdbf2dddfda5b1b537be --- configure.ac | 4 ++-- src/Makefile.bench.include | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 08c0452d23..ff5e5e910a 100644 --- a/configure.ac +++ b/configure.ac @@ -1473,7 +1473,7 @@ if test x$use_pkgconfig = xyes; then if test x$use_qr != xno; then BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])]) fi - if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then + if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnononono; then PKG_CHECK_MODULES([EVENT], [libevent >= 2.0.21], [use_libevent=yes], [AC_MSG_ERROR(libevent version 2.0.21 or greater not found.)]) if test x$TARGET_OS != xwindows; then PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads >= 2.0.21],, [AC_MSG_ERROR(libevent_pthreads version 2.0.21 or greater not found.)]) @@ -1493,7 +1493,7 @@ if test x$use_pkgconfig = xyes; then ) else - if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then + if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnonononono; then AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),) AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing)) if test x$TARGET_OS != xwindows; then diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include index 0eb0ce8888..684cdced6f 100644 --- a/src/Makefile.bench.include +++ b/src/Makefile.bench.include @@ -52,7 +52,7 @@ bench_bench_dash_SOURCES = \ nodist_bench_bench_dash_SOURCES = $(GENERATED_BENCH_FILES) -bench_bench_dash_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CLFAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/ +bench_bench_dash_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/ bench_bench_dash_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) bench_bench_dash_LDADD = \ $(LIBBITCOIN_SERVER) \