This PR:
- is based on #18297 (already merged)
- drops all of the non-pkg-config paths from the
configurescript
Ref: #17768
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
No conflicts as of last run.
I like this idea, especially the simplification of the autoconf scripts. Concept ACK.
Updated 284418ad2446fec21546e485ec0af0edde2eb773 -> b3b769adf1868b2c3ebdd1d9778fac58125e2b8d (pr18307.01 -> pr18307.02, diff):
Concept ACK, thanks for working on this. Will review the chain.
Rebased b3b769adf1868b2c3ebdd1d9778fac58125e2b8d -> a4535bfd4d47538db47b9787da8922cd06bd6fd7 (pr18307.02 -> pr18307.03) due to the merging of #18297.
<!--a722867cd34abeea1fadc8d60700f111-->
<!--9cd9c72976c961c55c7acef8f6ba82cd-->
1328 | - AC_CHECK_LIB([event_pthreads],[main],EVENT_PTHREADS_LIBS=-levent_pthreads,AC_MSG_ERROR(libevent_pthreads missing)) 1329 | - fi 1330 | +if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench != xnonononono; then 1331 | + PKG_CHECK_MODULES([EVENT], [libevent >= 2.0.21], [use_libevent=yes], [AC_MSG_ERROR(libevent version 2.0.21 or greater not found.)]) 1332 | + if test x$TARGET_OS != xwindows; then 1333 | + PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, AC_MSG_ERROR([libevent_pthreads not found]))
Was removing the version checking for libevent_pthreads intentional?
Was removing the version checking for
libevent_pthreadsintentional?
No, it seems like a rebasing glitch. Going to fix. Thanks!
Concept ACK - This looks pretty good, and is a nice simplification. This should be a no-op for most platforms, besides some reordering of package checks in configure. Obviously Windows is different, and after this PR, should be full pkg-config. This is the main difference I'm seeing in config.log:
# libevent
-EVENT_CFLAGS=''
-EVENT_LIBS='-levent'
+EVENT_CFLAGS='-I/bitcoin/depends/x86_64-w64-mingw32/include'
+EVENT_LIBS='-L/bitcoin/depends/x86_64-w64-mingw32/lib -levent -lws2_32'
# qrencode
-QR_CFLAGS=''
-QR_LIBS='-lqrencode'
+QR_CFLAGS='-I/bitcoin/depends/x86_64-w64-mingw32/include'
+QR_LIBS='-L/bitcoin/depends/x86_64-w64-mingw32/lib -lqrencode -lpthread'
# zeromq
-ZMQ_CFLAGS=' -DZMQ_STATIC'
-ZMQ_LIBS='-lzmq'
+ZMQ_CFLAGS='-I/bitcoin/depends/x86_64-w64-mingw32/include -DZMQ_STATIC'
+ZMQ_LIBS='-L/bitcoin/depends/x86_64-w64-mingw32/lib -lzmq -liphlpapi -lpthread'
liphlpapi was added to libzmqs PKGCFG_LIBS_PRIVATE, when static linking, in https://github.com/zeromq/libzmq/pull/2787.
Updated a4535bfd4d47538db47b9787da8922cd06bd6fd7 -> 4e006b640eb94d0699169b114842aca3b6ce585a (pr18307.03 -> pr18307.05, diff):
Was removing the version checking for
libevent_pthreadsintentional?
Updated 4e006b640eb94d0699169b114842aca3b6ce585a -> 92bc268e4af4ebcbde08567ea00e019ac509a769 (pr18307.05 -> pr18307.06, diff):
ACK 92bc268e4af4ebcbde08567ea00e019ac509a769
Changes look correct, and I checked that there are no remaining matches for use_pkgconfig after this.
1378 | +fi 1379 | + 1380 | +if test "x$use_zmq" = xyes; then 1381 | + dnl Assume libzmq was built for static linking 1382 | + case $host in 1383 | + *mingw*)
It's somewhat unfortunate that this mingw-specific workaround is still ncessary, that the required flag is not passed in through the pkgconfig file in the case of a static build. But I suppose this is an upstream issue.
ACK 92bc268e4af4ebcbde08567ea00e019ac509a769. I re-gitian-built. There are a couple follow-ups that I'll PR shortly. Thanks for addressing my feedback above. I took too long to get back to this.