build: move util/url to common/url #26294

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:cleanup_event_flags changing 14 files +23 −18
  1. fanquake commented at 8:41 am on October 11, 2022: member

    Move util/url to common/url.

    Also add missing event_* flags to libbitcoin_util. #26293 + the commit dropping boost cppflags from libbitcoin_util shows this issue. i.e:

    0  CXX      util/libbitcoin_util_a-url.o
    1util/url.cpp:7:10: fatal error: 'event2/http.h' file not found
    2#include <event2/http.h>
    3         ^~~~~~~~~~~~~~~
    41 error generated.
    
  2. fanquake added the label Build system on Oct 11, 2022
  3. theuni commented at 6:22 pm on October 11, 2022: member
    Hmm, going by the other conversations about util vs common, doesn’t util/url.cpp belong in common as it’s required by the binaries but not the kernel?
  4. jarolrod commented at 0:12 am on October 12, 2022: member

    guix hashes

    x86:

     028d965c830a9c2d9fae1f1f9ee2d9b9f7bfea0d86f7e6f4b8099d64c0a4146a7  guix-build-44a3fa429f66/output/aarch64-linux-gnu/SHA256SUMS.part
     1e0c3d026aa506e457fa340e98640aefedaa96e1880870bd9a66ad50db8385709  guix-build-44a3fa429f66/output/aarch64-linux-gnu/bitcoin-44a3fa429f66-aarch64-linux-gnu-debug.tar.gz
     2f9d25430009c2c317d15bba6683147b7c01095ff7c83fd9fb1757247e8d7d719  guix-build-44a3fa429f66/output/aarch64-linux-gnu/bitcoin-44a3fa429f66-aarch64-linux-gnu.tar.gz
     37912c71875aab4abd25aebbc06b26e68791d051a64f09fea43ecd4e5ae3ac176  guix-build-44a3fa429f66/output/arm-linux-gnueabihf/SHA256SUMS.part
     47f27d55e4fccc48d040f552eb7b65f6de57e4947f39c2f1f3ed9365e07f94af8  guix-build-44a3fa429f66/output/arm-linux-gnueabihf/bitcoin-44a3fa429f66-arm-linux-gnueabihf-debug.tar.gz
     5200938e720ee9e1241504c454f6d803ef4df33aa49bb2d9516f2b60209c3eadf  guix-build-44a3fa429f66/output/arm-linux-gnueabihf/bitcoin-44a3fa429f66-arm-linux-gnueabihf.tar.gz
     6a57a19f578757c508a5712d901ece3e995089d5247f965037da85022f19652fb  guix-build-44a3fa429f66/output/arm64-apple-darwin/SHA256SUMS.part
     79ddd9164616b03ccef5e828053fb1d71542973490d8fc83fc7c9806890bca6b5  guix-build-44a3fa429f66/output/arm64-apple-darwin/bitcoin-44a3fa429f66-arm64-apple-darwin-unsigned.dmg
     8ec4b7987bf5e31c6ca605ee860ea8a9bb4959651665af3950cae27fa7a10b242  guix-build-44a3fa429f66/output/arm64-apple-darwin/bitcoin-44a3fa429f66-arm64-apple-darwin-unsigned.tar.gz
     98c16da5d2e051b73c53393afed953ed16b34260ffb452f99502242170e31aa37  guix-build-44a3fa429f66/output/arm64-apple-darwin/bitcoin-44a3fa429f66-arm64-apple-darwin.tar.gz
    10fd9973f393314c5f5d30664d30fd886683d63e3e80e2c1eb17852d506ad658a5  guix-build-44a3fa429f66/output/dist-archive/bitcoin-44a3fa429f66.tar.gz
    11fe3fcbbcf07e73a2bb8f61d59f30f5d88ed77d5fa21dd7c49f183f535868b9c9  guix-build-44a3fa429f66/output/powerpc64-linux-gnu/SHA256SUMS.part
    126e6cd1b98397c92ac5344d98fb90ce5bd0dce7b876e928e3cc878c32faabd989  guix-build-44a3fa429f66/output/powerpc64-linux-gnu/bitcoin-44a3fa429f66-powerpc64-linux-gnu-debug.tar.gz
    132c968184cf5a8bd82994e38796e2994ceaf8b3efc30fb7fed685a00179e81175  guix-build-44a3fa429f66/output/powerpc64-linux-gnu/bitcoin-44a3fa429f66-powerpc64-linux-gnu.tar.gz
    147f291d4d595a981976118662cb5a486063e72f3280b80afb5a678f307bac3511  guix-build-44a3fa429f66/output/powerpc64le-linux-gnu/SHA256SUMS.part
    15db38366cd4f8f334e51f9cd0a3ac9bfb17c3f5e63a2771ff577661fe94e4cb2c  guix-build-44a3fa429f66/output/powerpc64le-linux-gnu/bitcoin-44a3fa429f66-powerpc64le-linux-gnu-debug.tar.gz
    16a77d415861ebbb3edd670f3a70cc14c86914a7c8c40640ea6528b47452687911  guix-build-44a3fa429f66/output/powerpc64le-linux-gnu/bitcoin-44a3fa429f66-powerpc64le-linux-gnu.tar.gz
    174cbb51b3e3d507b032ee54fd7172734893f9a89ed68a3ca82828725bd953ee15  guix-build-44a3fa429f66/output/riscv64-linux-gnu/SHA256SUMS.part
    1879e5b38046c1821e233b27e7a8fe2ca768732ad4ddeb70f665379e7ffb658b68  guix-build-44a3fa429f66/output/riscv64-linux-gnu/bitcoin-44a3fa429f66-riscv64-linux-gnu-debug.tar.gz
    19f7974847da0f66f1b826ce984aad477ddbc3923083b5f7bfaabdc18774e30e08  guix-build-44a3fa429f66/output/riscv64-linux-gnu/bitcoin-44a3fa429f66-riscv64-linux-gnu.tar.gz
    2043653df487eeb1a95244e28e3fc935eac1820c9ed71d0a5393218f5641da2eab  guix-build-44a3fa429f66/output/x86_64-apple-darwin/SHA256SUMS.part
    21d6b6d6c086a954f5ba11c38b64b72852162d8279d23f7519aa9c0eefbad05b1e  guix-build-44a3fa429f66/output/x86_64-apple-darwin/bitcoin-44a3fa429f66-x86_64-apple-darwin-unsigned.dmg
    22c2fa5c49c6755aa1b9f2e0fce20b9935a542b5d338375e420936e1f47cdbc8ba  guix-build-44a3fa429f66/output/x86_64-apple-darwin/bitcoin-44a3fa429f66-x86_64-apple-darwin-unsigned.tar.gz
    23d6241df01dd37995bac4afaf2823b9803a58703976f65c0ece57a38d5b093411  guix-build-44a3fa429f66/output/x86_64-apple-darwin/bitcoin-44a3fa429f66-x86_64-apple-darwin.tar.gz
    2446972173f19930f0cb5dd512f4c82b9174d3c519c9f9c2ef079817a2739c3d81  guix-build-44a3fa429f66/output/x86_64-linux-gnu/SHA256SUMS.part
    257ce736910ec767dce94e7de4dc9268f9f9d8479848769782091739ae82952e3d  guix-build-44a3fa429f66/output/x86_64-linux-gnu/bitcoin-44a3fa429f66-x86_64-linux-gnu-debug.tar.gz
    265b5d7e64964bac57dd11e29efab2f4a22b9f55f12ec568e6be999c952a562bee  guix-build-44a3fa429f66/output/x86_64-linux-gnu/bitcoin-44a3fa429f66-x86_64-linux-gnu.tar.gz
    27d02f1ba20d62fd6d86fb0ecd4fbcf79b8a246cc0a95e50f6b4ff55bd20fc9ce9  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/SHA256SUMS.part
    28b7d1bb619a5668b59061d19f5a969db65b07832fe96a7a77c5ea5f8c181152fc  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/bitcoin-44a3fa429f66-win64-debug.zip
    29bada8f9629510b47ede617e04f484002b28b9483c68938e9d8cad69e0e83603a  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/bitcoin-44a3fa429f66-win64-setup-unsigned.exe
    30fbce3735901526f1fad7943326d537639dd9f154bf88f05cb1df98e8072b298b  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/bitcoin-44a3fa429f66-win64-unsigned.tar.gz
    31dd2455b8ff8ecce72aca3d54c44491b905d1898558735a2df469257d8fb7bd5d  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/bitcoin-44a3fa429f66-win64.zip
    

    arm64:

     028d965c830a9c2d9fae1f1f9ee2d9b9f7bfea0d86f7e6f4b8099d64c0a4146a7  guix-build-44a3fa429f66/output/aarch64-linux-gnu/SHA256SUMS.part
     1e0c3d026aa506e457fa340e98640aefedaa96e1880870bd9a66ad50db8385709  guix-build-44a3fa429f66/output/aarch64-linux-gnu/bitcoin-44a3fa429f66-aarch64-linux-gnu-debug.tar.gz
     2f9d25430009c2c317d15bba6683147b7c01095ff7c83fd9fb1757247e8d7d719  guix-build-44a3fa429f66/output/aarch64-linux-gnu/bitcoin-44a3fa429f66-aarch64-linux-gnu.tar.gz
     37912c71875aab4abd25aebbc06b26e68791d051a64f09fea43ecd4e5ae3ac176  guix-build-44a3fa429f66/output/arm-linux-gnueabihf/SHA256SUMS.part
     47f27d55e4fccc48d040f552eb7b65f6de57e4947f39c2f1f3ed9365e07f94af8  guix-build-44a3fa429f66/output/arm-linux-gnueabihf/bitcoin-44a3fa429f66-arm-linux-gnueabihf-debug.tar.gz
     5200938e720ee9e1241504c454f6d803ef4df33aa49bb2d9516f2b60209c3eadf  guix-build-44a3fa429f66/output/arm-linux-gnueabihf/bitcoin-44a3fa429f66-arm-linux-gnueabihf.tar.gz
     6a57a19f578757c508a5712d901ece3e995089d5247f965037da85022f19652fb  guix-build-44a3fa429f66/output/arm64-apple-darwin/SHA256SUMS.part
     79ddd9164616b03ccef5e828053fb1d71542973490d8fc83fc7c9806890bca6b5  guix-build-44a3fa429f66/output/arm64-apple-darwin/bitcoin-44a3fa429f66-arm64-apple-darwin-unsigned.dmg
     8ec4b7987bf5e31c6ca605ee860ea8a9bb4959651665af3950cae27fa7a10b242  guix-build-44a3fa429f66/output/arm64-apple-darwin/bitcoin-44a3fa429f66-arm64-apple-darwin-unsigned.tar.gz
     98c16da5d2e051b73c53393afed953ed16b34260ffb452f99502242170e31aa37  guix-build-44a3fa429f66/output/arm64-apple-darwin/bitcoin-44a3fa429f66-arm64-apple-darwin.tar.gz
    10fd9973f393314c5f5d30664d30fd886683d63e3e80e2c1eb17852d506ad658a5  guix-build-44a3fa429f66/output/dist-archive/bitcoin-44a3fa429f66.tar.gz
    11fe3fcbbcf07e73a2bb8f61d59f30f5d88ed77d5fa21dd7c49f183f535868b9c9  guix-build-44a3fa429f66/output/powerpc64-linux-gnu/SHA256SUMS.part
    126e6cd1b98397c92ac5344d98fb90ce5bd0dce7b876e928e3cc878c32faabd989  guix-build-44a3fa429f66/output/powerpc64-linux-gnu/bitcoin-44a3fa429f66-powerpc64-linux-gnu-debug.tar.gz
    132c968184cf5a8bd82994e38796e2994ceaf8b3efc30fb7fed685a00179e81175  guix-build-44a3fa429f66/output/powerpc64-linux-gnu/bitcoin-44a3fa429f66-powerpc64-linux-gnu.tar.gz
    147f291d4d595a981976118662cb5a486063e72f3280b80afb5a678f307bac3511  guix-build-44a3fa429f66/output/powerpc64le-linux-gnu/SHA256SUMS.part
    15db38366cd4f8f334e51f9cd0a3ac9bfb17c3f5e63a2771ff577661fe94e4cb2c  guix-build-44a3fa429f66/output/powerpc64le-linux-gnu/bitcoin-44a3fa429f66-powerpc64le-linux-gnu-debug.tar.gz
    16a77d415861ebbb3edd670f3a70cc14c86914a7c8c40640ea6528b47452687911  guix-build-44a3fa429f66/output/powerpc64le-linux-gnu/bitcoin-44a3fa429f66-powerpc64le-linux-gnu.tar.gz
    174cbb51b3e3d507b032ee54fd7172734893f9a89ed68a3ca82828725bd953ee15  guix-build-44a3fa429f66/output/riscv64-linux-gnu/SHA256SUMS.part
    1879e5b38046c1821e233b27e7a8fe2ca768732ad4ddeb70f665379e7ffb658b68  guix-build-44a3fa429f66/output/riscv64-linux-gnu/bitcoin-44a3fa429f66-riscv64-linux-gnu-debug.tar.gz
    19f7974847da0f66f1b826ce984aad477ddbc3923083b5f7bfaabdc18774e30e08  guix-build-44a3fa429f66/output/riscv64-linux-gnu/bitcoin-44a3fa429f66-riscv64-linux-gnu.tar.gz
    2043653df487eeb1a95244e28e3fc935eac1820c9ed71d0a5393218f5641da2eab  guix-build-44a3fa429f66/output/x86_64-apple-darwin/SHA256SUMS.part
    21d6b6d6c086a954f5ba11c38b64b72852162d8279d23f7519aa9c0eefbad05b1e  guix-build-44a3fa429f66/output/x86_64-apple-darwin/bitcoin-44a3fa429f66-x86_64-apple-darwin-unsigned.dmg
    22c2fa5c49c6755aa1b9f2e0fce20b9935a542b5d338375e420936e1f47cdbc8ba  guix-build-44a3fa429f66/output/x86_64-apple-darwin/bitcoin-44a3fa429f66-x86_64-apple-darwin-unsigned.tar.gz
    23d6241df01dd37995bac4afaf2823b9803a58703976f65c0ece57a38d5b093411  guix-build-44a3fa429f66/output/x86_64-apple-darwin/bitcoin-44a3fa429f66-x86_64-apple-darwin.tar.gz
    2446972173f19930f0cb5dd512f4c82b9174d3c519c9f9c2ef079817a2739c3d81  guix-build-44a3fa429f66/output/x86_64-linux-gnu/SHA256SUMS.part
    257ce736910ec767dce94e7de4dc9268f9f9d8479848769782091739ae82952e3d  guix-build-44a3fa429f66/output/x86_64-linux-gnu/bitcoin-44a3fa429f66-x86_64-linux-gnu-debug.tar.gz
    265b5d7e64964bac57dd11e29efab2f4a22b9f55f12ec568e6be999c952a562bee  guix-build-44a3fa429f66/output/x86_64-linux-gnu/bitcoin-44a3fa429f66-x86_64-linux-gnu.tar.gz
    27d02f1ba20d62fd6d86fb0ecd4fbcf79b8a246cc0a95e50f6b4ff55bd20fc9ce9  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/SHA256SUMS.part
    28b7d1bb619a5668b59061d19f5a969db65b07832fe96a7a77c5ea5f8c181152fc  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/bitcoin-44a3fa429f66-win64-debug.zip
    29bada8f9629510b47ede617e04f484002b28b9483c68938e9d8cad69e0e83603a  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/bitcoin-44a3fa429f66-win64-setup-unsigned.exe
    30fbce3735901526f1fad7943326d537639dd9f154bf88f05cb1df98e8072b298b  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/bitcoin-44a3fa429f66-win64-unsigned.tar.gz
    31dd2455b8ff8ecce72aca3d54c44491b905d1898558735a2df469257d8fb7bd5d  guix-build-44a3fa429f66/output/x86_64-w64-mingw32/bitcoin-44a3fa429f66-win64.zip
    
  5. fanquake commented at 2:04 pm on October 12, 2022: member

    Hmm, going by the other conversations about util vs common, doesn’t util/url.cpp belong in common as it’s required by the binaries but not the kernel?

    We may ultimately end up moving it there, but I’d rather keep this PR to just adding the adding / consolidating the missing flags (which are touching libs other than common/util), rather than bundling in shuffling too. Happy to discuss / move code in a follow up.

  6. theuni commented at 10:49 pm on October 12, 2022: member

    Ok. I was thinking it would make sense to put them in the right place first, but sure, it also makes sense to fix things as-is and ensure consistency before moving.

    I’m not sure about the need to add EVENT_PTHREADS_LIBS where they’re missing though. I think we only need to link that if we’re calling the evthread_* functions, which are only used in torcontrol.cpp and httpserver.cpp.

  7. theuni commented at 12:50 pm on October 13, 2022: member

    I’m not sure about the need to add EVENT_PTHREADS_LIBS where they’re missing though. I think we only need to link that if we’re calling the evthread_* functions, which are only used in torcontrol.cpp and httpserver.cpp.

    Same for EVENT_PTHREADS_CFLAGS btw.

  8. fanquake renamed this:
    build: fix EVENT_* flags usage
    build: move util/url to common/url
    on Oct 24, 2022
  9. fanquake force-pushed on Oct 24, 2022
  10. fanquake commented at 2:00 am on October 24, 2022: member

    Ok. I was thinking it would make sense to put them in the right place first,

    Doing this now.

  11. fanquake force-pushed on Oct 24, 2022
  12. DrahtBot commented at 11:11 am on October 24, 2022: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #26292 (util: move threadinterrupt into util/ by fanquake)
    • #26082 (RPC/Wallet: Access wallets via interfaces::Wallet by luke-jr)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  13. in build_msvc/libbitcoin_common/libbitcoin_common.vcxproj.in:11 in 558937087a outdated
     7@@ -8,6 +8,7 @@
     8     <ConfigurationType>StaticLibrary</ConfigurationType>
     9   </PropertyGroup>
    10   <ItemGroup>
    11+    <ClCompile Include="..\..\src\common\url.cpp" />
    


    fanquake commented at 8:31 am on October 31, 2022:
    @sipsorcery @hebasto is this correct?

    hebasto commented at 9:31 am on October 31, 2022:

    @sipsorcery @hebasto is this correct?

    Yes, it is. See #26294 (review)

  14. in src/Makefile.am:779 in 558937087a outdated
    773@@ -773,6 +774,7 @@ endif
    774 bitcoin_cli_LDADD = \
    775   $(LIBBITCOIN_CLI) \
    776   $(LIBUNIVALUE) \
    777+  $(LIBBITCOIN_COMMON) \
    


    hebasto commented at 9:31 am on October 31, 2022:

    The same change is required for MSVC builds:

     0--- a/build_msvc/bitcoin-cli/bitcoin-cli.vcxproj
     1+++ b/build_msvc/bitcoin-cli/bitcoin-cli.vcxproj
     2@@ -15,6 +15,9 @@
     3     <ProjectReference Include="..\libbitcoin_cli\libbitcoin_cli.vcxproj">
     4       <Project>{0667528c-d734-4009-adf9-c0d6c4a5a5a6}</Project>
     5     </ProjectReference>
     6+    <ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
     7+      <Project>{7c87e378-df58-482e-aa2f-1bc129bc19ce}</Project>
     8+    </ProjectReference>
     9     <ProjectReference Include="..\libbitcoin_crypto\libbitcoin_crypto.vcxproj">
    10       <Project>{6190199c-6cf4-4dad-bfbd-93fa72a760c1}</Project>
    11     </ProjectReference>
    

    fanquake commented at 9:35 am on October 31, 2022:
    Added.
  15. fanquake force-pushed on Oct 31, 2022
  16. build: add missing event cflags to libbitcoin_util
    The fact that this is missing is currently masked by the inclusion of
    BOOST_CPPFLAGS.
    058eb69ce4
  17. refactor: move url.h/cpp from lib util to lib common 3a0b352c63
  18. in src/Makefile.am:667 in 5b68bd6fc6 outdated
    661@@ -662,6 +662,11 @@ libbitcoin_common_a_SOURCES = \
    662   script/standard.cpp \
    663   warnings.cpp \
    664   $(BITCOIN_CORE_H)
    665+
    666+if USE_LIBEVENT
    667+libbitcoin_common_a_CPPFLAGS += $(EVENT_CFLAGS) $(EVENT_PTHREADS_CFLAGS)
    


    hebasto commented at 10:06 am on October 31, 2022:
    Why $(EVENT_PTHREADS_CFLAGS) is here?

    fanquake commented at 10:17 am on October 31, 2022:
    Removed. There’s no evthread_ usage in the common lib. It’s all in the node lib.
  19. fanquake force-pushed on Oct 31, 2022
  20. sipsorcery commented at 10:24 am on October 31, 2022: member
    Fwiw msvc build works for this PR.
  21. hebasto approved
  22. hebasto commented at 2:11 pm on October 31, 2022: member
    ACK 3a0b352c63db543833e0f919a004cf2c5093fe9c
  23. fanquake requested review from theuni on Oct 31, 2022
  24. ryanofsky approved
  25. ryanofsky commented at 5:39 pm on October 31, 2022: contributor
    Code review ACK 3a0b352c63db543833e0f919a004cf2c5093fe9c
  26. fanquake referenced this in commit 27e76afe24 on Nov 1, 2022
  27. fanquake commented at 10:06 am on November 1, 2022: member
    This has been merged.
  28. fanquake closed this on Nov 1, 2022

  29. fanquake deleted the branch on Nov 1, 2022
  30. sidhujag referenced this in commit fe27d66ef2 on Nov 1, 2022
  31. bitcoin locked this on Nov 1, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me