build: remove boost library detection #25465

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:uncrazy_libsecp changing 2 files +7 −62
  1. fanquake commented at 4:20 pm on June 24, 2022: member

    We no longer link against any Boost libraries, so don’t need to detect them, or set any Boost related LDFLAGS. Removing this from the macro also allows cleaning up some code in our configure.

    Guix Build:

     0e1ca070d085115767415121f3be8d8fa29547c9df633f9782b168a00753e995a  guix-build-db648e8ccc69/output/aarch64-linux-gnu/SHA256SUMS.part
     1fb4d229a71d64aef9de4a0301fad3d9ee5937025807a0e101f4cc0e20cf942b2  guix-build-db648e8ccc69/output/aarch64-linux-gnu/bitcoin-db648e8ccc69-aarch64-linux-gnu-debug.tar.gz
     25241bb543617df5e64584741b402117a3b9e7015a423507fd6c529ad397b13a5  guix-build-db648e8ccc69/output/aarch64-linux-gnu/bitcoin-db648e8ccc69-aarch64-linux-gnu.tar.gz
     3eb4ba0914e9a38b3804c062ffd47f4d49dc996ea249c5cdbf64a349f73f59555  guix-build-db648e8ccc69/output/arm-linux-gnueabihf/SHA256SUMS.part
     4497d1c0d03d52cc6469acf4c61f224e7567c2601b64df3fe5888374e3416d868  guix-build-db648e8ccc69/output/arm-linux-gnueabihf/bitcoin-db648e8ccc69-arm-linux-gnueabihf-debug.tar.gz
     586daab76f41581b752a5a786c5be1b094c14b25cdc8f4090f323b914118884ff  guix-build-db648e8ccc69/output/arm-linux-gnueabihf/bitcoin-db648e8ccc69-arm-linux-gnueabihf.tar.gz
     6e8e2c58948a29b0286d17d7dfb89c81234ab28b98f44c2e1d70034da5ce9b8fc  guix-build-db648e8ccc69/output/arm64-apple-darwin/SHA256SUMS.part
     7d8f0e791cce42db0741afbb7ec23e251a40ec30f8e1e7fef0d1afc364ce32e9b  guix-build-db648e8ccc69/output/arm64-apple-darwin/bitcoin-db648e8ccc69-arm64-apple-darwin-unsigned.dmg
     8ee85b5b7942dc3361a3b05a395e271d54215f76fb67fc3c30144b089da374cd7  guix-build-db648e8ccc69/output/arm64-apple-darwin/bitcoin-db648e8ccc69-arm64-apple-darwin-unsigned.tar.gz
     972efbe40e3d033165871a8e8b4719c73a085ffc17a3198bf1191e5d22dec8c3a  guix-build-db648e8ccc69/output/arm64-apple-darwin/bitcoin-db648e8ccc69-arm64-apple-darwin.tar.gz
    100d86d3a303669235b91b4edbd6a5248dff65e31af3f3830cc8bdc116a2637e64  guix-build-db648e8ccc69/output/dist-archive/bitcoin-db648e8ccc69.tar.gz
    110f2371e331d97df50c65714ada6918565d8698637a78c7c97ba254dd5b3cc4b3  guix-build-db648e8ccc69/output/powerpc64-linux-gnu/SHA256SUMS.part
    121447777f7adababc6fddad3349ac435744abef35cd30b673c62621718441ca01  guix-build-db648e8ccc69/output/powerpc64-linux-gnu/bitcoin-db648e8ccc69-powerpc64-linux-gnu-debug.tar.gz
    133bf1e90df4d7fab18159ffd039dd1fa7e5251b0bdca020afd851fb7cd189cfd2  guix-build-db648e8ccc69/output/powerpc64-linux-gnu/bitcoin-db648e8ccc69-powerpc64-linux-gnu.tar.gz
    1467ebc32843eb83a08468496c24750ab56bfdb259eb9004732be13427da5dbbc1  guix-build-db648e8ccc69/output/powerpc64le-linux-gnu/SHA256SUMS.part
    150da5fad78ab854f62db57a2f44b6ffecbf2b3e9de34b81681c66e28100a209ae  guix-build-db648e8ccc69/output/powerpc64le-linux-gnu/bitcoin-db648e8ccc69-powerpc64le-linux-gnu-debug.tar.gz
    16e96a41287040d13da4738dde43dd7283356b8af10b535b15b212da702aa7f0af  guix-build-db648e8ccc69/output/powerpc64le-linux-gnu/bitcoin-db648e8ccc69-powerpc64le-linux-gnu.tar.gz
    17b54a48e03e76672008445a174078e92a149dd9e4ce0c896b013162a6221b3abe  guix-build-db648e8ccc69/output/riscv64-linux-gnu/SHA256SUMS.part
    18b7fea8fe4c1baecff28c45fa514ec34338a7f0e04a7f58b8cb5493932242c221  guix-build-db648e8ccc69/output/riscv64-linux-gnu/bitcoin-db648e8ccc69-riscv64-linux-gnu-debug.tar.gz
    19775d406d4a2b1fa1750ae1924cf2f67de7d89dbf0044dc7ab08d3908812fff2e  guix-build-db648e8ccc69/output/riscv64-linux-gnu/bitcoin-db648e8ccc69-riscv64-linux-gnu.tar.gz
    20a1dcd8c95517e8b98d8584eed00b561582b74a68a1b3d06efd86d5322186b21e  guix-build-db648e8ccc69/output/x86_64-apple-darwin/SHA256SUMS.part
    21952ea47428b9bcadb809fb02a56347a9f8b29f09eba4edf67a157f7cc4ec9a57  guix-build-db648e8ccc69/output/x86_64-apple-darwin/bitcoin-db648e8ccc69-x86_64-apple-darwin-unsigned.dmg
    22adb226a702e24962d263edf2e95100508d6728b4dd93a5d6098c37a5721c2bcc  guix-build-db648e8ccc69/output/x86_64-apple-darwin/bitcoin-db648e8ccc69-x86_64-apple-darwin-unsigned.tar.gz
    23fd389c11cce919c53e4aeccb0e5d1ee1d12b1d9f6987a3317c4b254c3ca03387  guix-build-db648e8ccc69/output/x86_64-apple-darwin/bitcoin-db648e8ccc69-x86_64-apple-darwin.tar.gz
    24c76314a9194733790533bbfefa7e6a234307aaa252989c2b3fd19191ae286c57  guix-build-db648e8ccc69/output/x86_64-linux-gnu/SHA256SUMS.part
    255e2b023b62b77709f30d545705a61826e96ddcfea4c24cde83fe2b98010262e1  guix-build-db648e8ccc69/output/x86_64-linux-gnu/bitcoin-db648e8ccc69-x86_64-linux-gnu-debug.tar.gz
    26a3e9dcb58aa8554cdeb211461976087b724cd81157517a9f1e00b1a73d74ab9b  guix-build-db648e8ccc69/output/x86_64-linux-gnu/bitcoin-db648e8ccc69-x86_64-linux-gnu.tar.gz
    27d6733313b8f262b214c28d44d8ee644a2435cb4da90555b30e20dbf3807b6660  guix-build-db648e8ccc69/output/x86_64-w64-mingw32/SHA256SUMS.part
    28bc4b269f5b89200537d7175492ae31ab87eb4a1da86c1ade968a7bbdc472c5bf  guix-build-db648e8ccc69/output/x86_64-w64-mingw32/bitcoin-db648e8ccc69-win64-debug.zip
    29ccd83eb4c9ab0df288935ab655cd71b00525b57f82c8b9d7a4d1a08325d26aac  guix-build-db648e8ccc69/output/x86_64-w64-mingw32/bitcoin-db648e8ccc69-win64-setup-unsigned.exe
    3091ee20dfbaa923066379ea22f3e3a85a52f5b323877b44c19ccec6300d25cd41  guix-build-db648e8ccc69/output/x86_64-w64-mingw32/bitcoin-db648e8ccc69-win64-unsigned.tar.gz
    31595baf193e0955436c4f2e5047e6842434bb4273b03c9d74e5c90972dde812f4  guix-build-db648e8ccc69/output/x86_64-w64-mingw32/bitcoin-db648e8ccc69-win64.zip
    
  2. fanquake added the label Build system on Jun 24, 2022
  3. fanquake added the label DrahtBot Guix build requested on Jun 24, 2022
  4. DrahtBot commented at 3:41 am on June 25, 2022: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK TheCharlatan
    Concept ACK hebasto

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #24897 ([Draft / POC] Silent Payments by w0xlt)
    • #24545 (BIP324: Enable v2 P2P encrypted transport by dhruv)
    • #23561 (BIP324: Handshake prerequisites by dhruv)
    • #23432 (BIP324: CKey encode/decode to elligator-swift by dhruv)

    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.

  5. DrahtBot removed the label DrahtBot Guix build requested on Jun 25, 2022
  6. in configure.ac:2002 in 20802cc70d outdated
    1973@@ -1974,21 +1974,6 @@ AC_CONFIG_LINKS([test/fuzz/test_runner.py:test/fuzz/test_runner.py])
    1974 AC_CONFIG_LINKS([test/util/test_runner.py:test/util/test_runner.py])
    1975 AC_CONFIG_LINKS([test/util/rpcauth-test.py:test/util/rpcauth-test.py])
    1976 
    1977-dnl boost's m4 checks do something really nasty: they export these vars. As a
    1978-dnl result, they leak into secp256k1's configure and crazy things happen.
    1979-dnl Until this is fixed upstream and we've synced, we'll just un-export them.
    


    laanwj commented at 8:37 pm on June 26, 2022:

    Any idea which commit fixed this?

    Edit: I still see the export CPPFLAGS and export LDFLAGS in ax_boost_base.m4, do they somehow not get triggered anymore since we use headers only?


    fanquake commented at 7:38 pm on July 5, 2022:
    I’ve modified this to drop the LDFLAGS related code entirely, given we no-longer use it.
  7. Slavo77AssMiner approved
  8. fanquake force-pushed on Jul 4, 2022
  9. fanquake force-pushed on Jul 4, 2022
  10. fanquake force-pushed on Jul 5, 2022
  11. fanquake renamed this:
    build: remove unneeded var exporting
    build: remove boost library detection
    on Jul 5, 2022
  12. fanquake added the label DrahtBot Guix build requested on Jul 5, 2022
  13. fanquake marked this as ready for review on Jul 7, 2022
  14. DrahtBot removed the label DrahtBot Guix build requested on Jul 9, 2022
  15. fanquake requested review from hebasto on Jul 13, 2022
  16. hebasto commented at 4:19 pm on July 13, 2022: member

    Concept ACK.

    Could such a modification of AX_BOOST_BASE make more burden to incorporate future changes from upstream? It won’t hurt to keep third-party code as it is, I guess.

  17. fanquake commented at 4:24 pm on July 13, 2022: member

    Could such a modification of AX_BOOST_BASE make more burden to incorporate future changes from upstream?

    I doubt it. These macros change infrequently, and the fact that we don’t need most of the code here, means we’re even less likely to even need to incorporate any new upstream changes. In any case a diff is going to clearly show what has changed.

    It won’t hurt to keep third-party code as it is, I guess.

    The point of removing this is so that it’s no-longer muddling with *FLAGS / setting vars we don’t even use, such that we can drop work-arounds for that behaviour from our own build, i.e 92d506644b1057376aeea6d63f58985c6e0b4c72, which would otherwise disrupt the libsecp256k1 configure.

  18. hebasto commented at 7:48 pm on July 15, 2022: member
    The first commit 06ce8c0c84e65e3843d34b3d731082ad735c7c9f differs from that what I can actually see in https://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_boost_base.m4
  19. fanquake commented at 7:52 pm on July 15, 2022: member

    The first commit 06ce8c0 differs

    In what way? Iirc I took the change from the autoconf archive on GitHub, and that may have diverged from that repository.

  20. hebasto commented at 8:21 pm on July 15, 2022: member

    In what way?

     0--- a/build-aux/m4/ax_boost_base.m4
     1+++ b/build-aux/m4/ax_boost_base.m4
     2@@ -11,7 +11,7 @@
     3 #   Test for the Boost C++ libraries of a particular version (or newer)
     4 #
     5 #   If no path to the installed boost library is given the macro searchs
     6-#   under /usr, /usr/local, /opt, /opt/local and /opt/homebrew and evaluates the
     7+#   under /usr, /usr/local, /opt and /opt/local and evaluates the
     8 #   $BOOST_ROOT environment variable. Further documentation is available at
     9 #   <http://randspringer.de/boost/index.html>.
    10 #
    11@@ -151,7 +151,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
    12         else
    13             search_libsubdirs="$multiarch_libsubdir $libsubdirs"
    14         fi
    15-        for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local /opt/homebrew; do
    16+        for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
    17             if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
    18                 for libsubdir in $search_libsubdirs ; do
    19                     if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
    20@@ -227,7 +227,7 @@ AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
    21             fi
    22         else
    23             if test "x$cross_compiling" != "xyes" ; then
    24-                for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local /opt/homebrew; do
    25+                for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
    26                     if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
    27                         for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
    28                             _version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
    
  21. fanquake commented at 8:22 pm on July 15, 2022: member
    Thats expected. We’ve already modified this macro.
  22. fanquake referenced this in commit 85f0f933b4 on Sep 4, 2022
  23. fanquake force-pushed on Sep 4, 2022
  24. fanquake commented at 9:18 am on September 4, 2022: member
    Rebased on #26002.
  25. fanquake referenced this in commit 92b6b16990 on Sep 5, 2022
  26. fanquake force-pushed on Sep 5, 2022
  27. fanquake referenced this in commit a9049dd296 on Sep 9, 2022
  28. fanquake referenced this in commit ae4e6c088b on Sep 9, 2022
  29. fanquake force-pushed on Sep 9, 2022
  30. fanquake force-pushed on Sep 9, 2022
  31. fanquake commented at 8:23 am on September 9, 2022: member
    Rebased for #26002. The boost base macro modifications are now contained to just removing the boost lib/ldflags components.
  32. sidhujag referenced this in commit 86a56a4b0a on Sep 11, 2022
  33. fanquake requested review from theuni on Sep 20, 2022
  34. theuni commented at 7:02 pm on September 21, 2022: member

    Hmm, just throwing this out there, maybe more trouble than it’s worth…

    Rather than hacking the boost m4, most of which we don’t really require anymore now that we don’t need to link, I wonder if we can just steal the --with-boost machinery and drop the m4 entirely. Then a user can effectively set BOOST_CPPFLAGS themselves, then we can test some of the headers we need ourselves. That would drop some of the self-discovery stuff we have now and may force some users to specify a path where they didn’t have to before, but that may actually eliminate some surprises (like /opt/homebrew being checked).

    Feel free to tell me that I’m oversimplifying :)

  35. fanquake force-pushed on Dec 8, 2022
  36. build: remove Boost lib detection from ax_boost_base
    We don't use / link against Boost libraries, so there is no reason for
    us to try and detect them / muddle with LDFLAGS.
    14afc71a61
  37. build: remove unneeded var exporting db648e8ccc
  38. DrahtBot added the label Needs rebase on Jan 13, 2023
  39. fanquake force-pushed on Jan 13, 2023
  40. fanquake commented at 10:47 am on January 13, 2023: member

    Hmm, just throwing this out there, maybe more trouble than it’s worth…

    I think the difference between us stealing the --with-boost machinery, and reducing the boost m4 down to mostly the --with-boost machinery is marginal, and I somewhat prefer keeping the boost detection separated (at least for now)

  41. DrahtBot removed the label Needs rebase on Jan 13, 2023
  42. fanquake requested review from TheCharlatan on Jan 25, 2023
  43. TheCharlatan approved
  44. TheCharlatan commented at 8:59 pm on January 26, 2023: contributor

    ACK db648e8ccc699d629455a9d0555e5f2920b70393

    Rationale and changes makes sense to me. Obviously no linker flags should be populated that are never used. I tried cutting away some more of the detection content, but did not land on anything workable.

  45. bitcoin deleted a comment on Jan 27, 2023
  46. bitcoin deleted a comment on Jan 27, 2023
  47. maflcko added the label DrahtBot Guix build requested on Jan 27, 2023
  48. fanquake commented at 12:03 pm on January 27, 2023: member
    Added a Guix build to op.
  49. DrahtBot commented at 5:20 pm on January 27, 2023: contributor

    Guix builds

    File commit 835212cd1d8f8fc7f19775f5ff8cc21c099122b2(master) commit 2201c36c728c057b0b10378df83822508d9f4854(master and this pull)
    SHA256SUMS.part 8e93112f89342607... a16e01b6a64dbb40...
    *-aarch64-linux-gnu-debug.tar.gz 7e09e3256034b5f8... 13abc2313c70d1dd...
    *-aarch64-linux-gnu.tar.gz 0881c03dc85ae62c... 33ea41a12704b4ec...
    *-arm-linux-gnueabihf-debug.tar.gz 530448c21453c8a9... 5660dfbc2c1dda3d...
    *-arm-linux-gnueabihf.tar.gz a3dbdc686bacd07e... 7a3c830132bfb5c2...
    *-arm64-apple-darwin-unsigned.dmg d1254f3bc399a892... 0ded88149e9831cd...
    *-arm64-apple-darwin-unsigned.tar.gz 4644fc0dcba90fa4... 7e9ef29799ee91a5...
    *-arm64-apple-darwin.tar.gz d34fb6988f4acd50... 5799c48e4c1c8a4e...
    *-powerpc64-linux-gnu-debug.tar.gz e25d8d8e0fa20eb3... c4cf175747e3149a...
    *-powerpc64-linux-gnu.tar.gz d787647f4571e583... 35e528fc38a32798...
    *-powerpc64le-linux-gnu-debug.tar.gz 807be923719c67c7... 55b5ca31ce1235e0...
    *-powerpc64le-linux-gnu.tar.gz c5a5e5656ff4f34b... 358fe3e982b4b25a...
    *-riscv64-linux-gnu-debug.tar.gz fa19718457f58d5e... 87ec2e61e87bd466...
    *-riscv64-linux-gnu.tar.gz d9303166cb931fdf... 83d8043b7fa87e60...
    *-win64-debug.zip fd73f911955dff52... c197235bdb329243...
    *-win64-setup-unsigned.exe 5556579c3a3130fc... 6ba6b20dfe9cf46c...
    *-win64-unsigned.tar.gz 2c0a0d2083ddc9c1... 348e1315a4c5e1c7...
    *-win64.zip 04a335a60c3dd226... 3e21ef5ca32b39aa...
    *-x86_64-apple-darwin-unsigned.dmg 55778b32627aae0a... 7c7de2cc109a0b9a...
    *-x86_64-apple-darwin-unsigned.tar.gz 3185dd9ef320e2f3... 48c01940a67bee46...
    *-x86_64-apple-darwin.tar.gz 89ecf2e2228569a4... c4169e7d92e6f8c6...
    *-x86_64-linux-gnu-debug.tar.gz 6fe60fd3c2d96be2... f79429fccfb52187...
    *-x86_64-linux-gnu.tar.gz 078ce6c1d92878b1... a219ef85c98f38b4...
    *.tar.gz 39f042f85d306ed0... 840a75b653558d3e...
    guix_build.log a9d33451bd311321... 137eca5ab849acb8...
    guix_build.log.diff 77a03212f85537b3...
  50. DrahtBot removed the label DrahtBot Guix build requested on Jan 27, 2023
  51. fanquake merged this on Jan 28, 2023
  52. fanquake closed this on Jan 28, 2023

  53. fanquake deleted the branch on Jan 28, 2023
  54. sidhujag referenced this in commit 472d34a97b on Jan 30, 2023
  55. bitcoin locked this on Jan 28, 2024

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-07-01 10:13 UTC

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