Revert "build: remove some no-longer-needed var unexporting from conf… #25660

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:220721-pkgconfig changing 1 files +8 −0
  1. hebasto commented at 8:22 AM on July 21, 2022: member

    Building with depends implies exporting of the PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR environment variables: https://github.com/bitcoin/bitcoin/blob/d1e42659bbdd8da170542d8c638242cd94f71a7d/depends/config.site.in#L87-L93

    To use --config-cache option, as we do in CI, requires that "they must be unexported at the end of configure.ac".

  2. Revert "build: remove some no-longer-needed var unexporting from configure"
    This reverts commit ee30bf7c01922938bcf861a57cdf2249edb36256.
    df7268cc5a
  3. MarcoFalke added the label Build system on Jul 21, 2022
  4. MarcoFalke added the label DrahtBot Guix build requested on Jul 21, 2022
  5. fanquake commented at 8:40 AM on July 21, 2022: member

    If nothing is currently broken in our repository, why are we reverting this? If it needs reverting at the next subtree update, it could be done then. I can locally build a secp subtree update, using depends or not, without reverting anything, so I think it could be made more clear what the actual problem is, and where it occurs. Which change is it specifically in the secp repo since our last subtree update? Note that we already include https://github.com/bitcoin-core/secp256k1/pull/1090 in our repo.

  6. real-or-random commented at 8:51 AM on July 21, 2022: contributor

    If nothing is currently broken in our repository, why are we reverting this?

    I'd say it's a bug. Running ./configure isn't supposed to change the environment, at least not permanently.

    But I think you're right, we should investigate further, I don't think we have understood what's actually going on here.

    Which change is it specifically in the secp repo since our last subtree update? Note that we already include bitcoin-core/secp256k1#1090 in our repo.

    Yes, we should figure this out. I thought it's bitcoin-core/secp256k1#1090 but you're right, that's already in the subtree here. @dhruv said it's bitcoin-core/secp256k1#1084 but I'm not sure if this is first PR that fails.

  7. real-or-random commented at 9:00 AM on July 21, 2022: contributor

    Oh I think I understand now:

    Here we removed PKG_PROG_PKG_CONFIG in 1090: https://github.com/bitcoin-core/secp256k1/pull/1090/commits/21b2ebaf74222017f85123deb6f30a33c7678513

    And then the not rebased (!) merge of https://github.com/bitcoin-core/secp256k1/pull/1084/commits/2be6ba0fedd0d2d62ba6f346d7ced7abde0d66e4 in 1084 brought that back at another location.

    So we should fix this in secp256k1. I'll open a PR there. (edit: https://github.com/bitcoin-core/secp256k1/pull/1128)

    But I still believe there's a bug here. If configure exports these variables, it should also unset them later? (And if not, we should adjust the comments in config.site.in.)

  8. fanquake commented at 9:20 AM on July 21, 2022: member

    And then the not rebased (!) merge of https://github.com/bitcoin-core/secp256k1/commit/2be6ba0fedd0d2d62ba6f346d7ced7abde0d66e4 in 1084 brought that back at another location. So we should fix this in secp256k1. I'll open a PR there. (edit: https://github.com/bitcoin-core/secp256k1/pull/1128)

    Good to know that was the root cause.

    But I still believe there's a bug here. If configure exports these variables, it should also unset them later? (And if not, we should adjust the comments in config.site.in.)

    Yes I think we can follow up with that here.

  9. hebasto commented at 9:21 AM on July 21, 2022: member

    More details.

    PKG_PROG_PKG_CONFIG uses the AC_ARG_VAR macro for PKG_CONFIG* variables that makes them "precious" and forces configure to check for consistency between two runs.

  10. hebasto commented at 9:28 AM on July 21, 2022: member

    As the secp256k1 has its own correct fix now, I've removed secp256k1 references from the PR description.

    A CI build with the updated secp256k1 subtree -- https://cirrus-ci.com/build/6423701909405696.

  11. real-or-random commented at 9:51 AM on July 21, 2022: contributor
    Without this PR:

    Depends ./configure misbehaves a little bit: config.site.in (only for depends builds) exports variables and they leak into the user's environment.

    With this PR:

    Non-depends ./configure misbehaves a little bit: If the user had set the variables in their environment, then we'll unset them...

    That means either is wrong, because in either case we touch the user's environment. I'd say then we should go with the "solution" with fewer lines code, and this is just doing nothing. Though it may be a good idea to update the comment in config.site.in.

    A clean solution would not touch the environment at all, but this will require larger and uglier hacks (e.g., creating a wrapper script for pkg-config on the fly) and it's totally not worth the hassle.)

  12. fanquake commented at 9:55 AM on July 21, 2022: member

    A clean solution would not touch the environment at all, @real-or-random you might also be interested in #25465, where I'm trying to remove at least some of the additional unsetting.

  13. DrahtBot commented at 6:32 PM on July 21, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25465 (build: remove boost library detection by fanquake)
    • #24897 ([Draft / POC] Silent Payments by w0xlt)
    • #23561 (BIP324: Handshake prerequisites by dhruv)
    • #23432 (BIP324: CPubKey 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.

  14. real-or-random commented at 8:36 AM on July 22, 2022: contributor

    A clean solution would not touch the environment at all, but this will require larger and uglier hacks (e.g., creating a wrapper script for pkg-config on the fly) and it's totally not worth the hassle.)

    Well, we could "just" store the values of PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR (with correct handling of unset) and then reset them at the end... Certainly a bit uglier than what we have now but probably not too bad for a solution that behaves cleanly. What do you think?

  15. DrahtBot commented at 3:02 AM on July 23, 2022: contributor

    <!--9cd9c72976c961c55c7acef8f6ba82cd-->

    Guix builds

    File commit b8067cd435059eedb580975afc62c4e7a6f27321<br>(master) commit 535d5f774c42525b954db32bdf0012222ae33210<br>(master and this pull)
    SHA256SUMS.part 7673e37bbedece31... d6ca5fd50412a22c...
    *-aarch64-linux-gnu-debug.tar.gz c486104e468488a9... 341f72a420d00851...
    *-aarch64-linux-gnu.tar.gz 48ca2d94d32933b6... 4c6e33e7d8830f00...
    *-arm-linux-gnueabihf-debug.tar.gz 6f12b7ffa097cb7e... d9f227cd137ba762...
    *-arm-linux-gnueabihf.tar.gz 20767b2d1f4a39cb... da425e7ca8a339fd...
    *-arm64-apple-darwin-unsigned.dmg 29d530af8ec47d2e... acbf6a063dd33262...
    *-arm64-apple-darwin-unsigned.tar.gz ca230509ae416e7f... 5735633b0b4afc0d...
    *-arm64-apple-darwin.tar.gz a9d9c77ddd805106... 1d53c6243a1d1d94...
    *-powerpc64-linux-gnu-debug.tar.gz ae6271d5ec82f24c... f79cb756bfb6a90a...
    *-powerpc64-linux-gnu.tar.gz 1fe33ac54838cedf... 2fb09c8ee7b3a139...
    *-powerpc64le-linux-gnu-debug.tar.gz 3e143018180eac96... 452ccc9059038b63...
    *-powerpc64le-linux-gnu.tar.gz daaac1e1b4fa9bae... fb9752184752178c...
    *-riscv64-linux-gnu-debug.tar.gz 82e1b018a36ce42c... 87baf751fb1fe07e...
    *-riscv64-linux-gnu.tar.gz b45b60a2c94f9c9c... 5b100d12d22353f3...
    *-win64-debug.zip b15c357ea6ed18b9... 3cabe3e4ca2546dc...
    *-win64-setup-unsigned.exe 2235eddc26bce3ce... bda6339351171caa...
    *-win64-unsigned.tar.gz ea461339fe0f9a10... 45a54fac95c3311a...
    *-win64.zip 18a8c3fcc4497640... 81759a0b4246d766...
    *-x86_64-apple-darwin-unsigned.dmg 7573e0223f7e99b7... c8f4853e4dd7e8eb...
    *-x86_64-apple-darwin-unsigned.tar.gz 5864bc67d5faf71e... ec07243b40b973f4...
    *-x86_64-apple-darwin.tar.gz 49c22339666fa5ad... 4ce86873b992ce22...
    *-x86_64-linux-gnu-debug.tar.gz f68331562688d03f... 783e6cb102779dbd...
    *-x86_64-linux-gnu.tar.gz 77a191a8d3368661... 576c8a266e4c0575...
    *.tar.gz 5f0b8042d7e9a13f... 8252479811fcd53b...
    guix_build.log 8f9948d7f8cb8b77... 42a221445de43931...
    guix_build.log.diff f3a2211c0ac1ca2f...
  16. DrahtBot removed the label DrahtBot Guix build requested on Jul 23, 2022
  17. hebasto commented at 12:07 AM on July 24, 2022: member

    @real-or-random

    A clean solution would not touch the environment at all

    Done in #25687.

  18. hebasto commented at 12:07 AM on July 24, 2022: member

    Closing in favor of #25687.

  19. hebasto closed this on Jul 24, 2022

  20. hebasto deleted the branch on Jul 27, 2022
  21. fanquake referenced this in commit 0043ec4e13 on Aug 2, 2022
  22. bitcoin locked this on Jul 27, 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: 2026-04-24 21:13 UTC

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