depends: Do not consider CC environment variable for detecting system #29963

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:240425-guess-cc changing 1 files +1 −1
  1. hebasto commented at 7:01 pm on April 25, 2024: member

    On the master branch @ 3c88eac28e8984893746caebb313dc3b2fca90db, consider the following commands in the depends subdirectory:

    0$ make print-build HOST=i686-pc-linux-gnu CC="clang -m32"
    1build=x86_64-pc-linux-gnu
    2$ make print-host HOST=i686-pc-linux-gnu CC="clang -m32"
    3host=i686-pc-linux-gnu
    

    The printed variable values are expected.

    However, switching the CC variable context from Makefile to the shell environment breaks expectations:

    0$ CC="clang -m32" make print-build HOST=i686-pc-linux-gnu
    1build=i686-pc-linux-gnu
    2$ CC="clang -m32" make print-host HOST=i686-pc-linux-gnu
    3host=i686-pc-linux-gnu
    

    This PR fixes this issue.

  2. hebasto added the label Build system on Apr 25, 2024
  3. DrahtBot commented at 7:01 pm on April 25, 2024: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/29963.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK ryanofsky, sedited

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

    Conflicts

    No conflicts as of last run.

  4. hebasto referenced this in commit 370c4e9161 on Apr 25, 2024
  5. theuni commented at 7:20 pm on April 25, 2024: member
    Where/why is this an issue?
  6. hebasto referenced this in commit 727cc73bcc on Apr 25, 2024
  7. hebasto commented at 7:27 pm on April 25, 2024: member

    Where/why is this an issue?

    I faced this issue during my work on the CMake staging branch when the CC environment variable was defined by the CI – https://github.com/hebasto/bitcoin/actions/runs/8822538616/job/24220973382.

    The log shows no cross-compiling, but it is cross-compiling to i686-pc-linux-gnu.

  8. theuni commented at 9:01 pm on April 25, 2024: member
    Surely this isn’t the only place env vars like this would cause issues? Feels like a cat-and-mouse game.
  9. maflcko commented at 8:11 am on April 26, 2024: member

    The log shows no cross-compiling, but it is cross-compiling to i686-pc-linux-gnu.

    Can you link to the exact lines in the log that show “no cross-compiling”.

  10. hebasto commented at 9:29 am on April 26, 2024: member

    The log shows no cross-compiling, but it is cross-compiling to i686-pc-linux-gnu.

    Can you link to the exact lines in the log that show “no cross-compiling”.

    https://github.com/hebasto/bitcoin/actions/runs/8822538616/job/24220973382#step:14:245:

    0Cross compiling ....................... FALSE
    

    Please note that that was a PR branch from the CMake migration project. That branch detects cross-compiling basing on host and build values when building with depends.

  11. fanquake commented at 9:51 am on April 26, 2024: member

    Surely this isn’t the only place env vars like this would cause issues? Feels like a cat-and-mouse game.

    Yea, as-is this doesn’t seem like a great fix, and may just break other things?

    A better diff might be something like:

     0diff --git a/depends/Makefile b/depends/Makefile
     1index 005d9696fb..091511758d 100644
     2--- a/depends/Makefile
     3+++ b/depends/Makefile
     4@@ -51,7 +51,7 @@ FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
     5 C_STANDARD ?= c11
     6 CXX_STANDARD ?= c++20
     7 
     8-BUILD = $(shell ./config.guess)
     9+BUILD = $(shell CC_FOR_BUILD=$CC ./config.guess)
    10 HOST ?= $(BUILD)
    11 PATCHES_PATH = $(BASEDIR)/patches
    12 BASEDIR = $(CURDIR)
    

    which would at least be using the option that is meant to be used for this.

  12. hebasto force-pushed on Apr 26, 2024
  13. hebasto commented at 10:05 am on April 26, 2024: member

    A better diff might be something like: … which would at least be using the option that is meant to be used for this.

    I agree. Implemented.

    Thanks!

  14. hebasto renamed this:
    depends: Do not consider `CC` environment variable for detecting system
    depends: Use `CC_FOR_BUILD` for `config.guess `
    on Apr 26, 2024
  15. theuni commented at 12:47 pm on April 26, 2024: member

    However, switching the CC variable context from Makefile to the shell environment breaks expectations

    Arguably that’s because this wasn’t intended to be supported :)

    I suppose this fix is reasonable, though supporting env vars like this seems quite brittle.

  16. hebasto referenced this in commit 21bee57cb6 on Apr 30, 2024
  17. hebasto referenced this in commit 516ecf1c8e on May 2, 2024
  18. hebasto referenced this in commit 729632c54f on May 2, 2024
  19. fanquake commented at 3:37 pm on May 31, 2024: member
    Is this still an issue given recent CMake changes?
  20. hebasto commented at 10:10 am on June 3, 2024: member

    Is this still an issue given recent CMake changes?

    Yes. Tested with the master branch @ 80bdd4b6beb878c95478b5623c9f9ff0b948ad57.

    And this PR still fixes it.

  21. DrahtBot added the label CI failed on Jun 18, 2024
  22. DrahtBot removed the label CI failed on Jun 18, 2024
  23. DrahtBot added the label CI failed on Sep 10, 2024
  24. DrahtBot removed the label CI failed on Sep 14, 2024
  25. achow101 requested review from fanquake on Oct 15, 2024
  26. achow101 requested review from theuni on Oct 15, 2024
  27. fanquake commented at 4:03 pm on October 24, 2024: member
    @hebasto can you rebase this?
  28. hebasto force-pushed on Oct 24, 2024
  29. hebasto commented at 4:08 pm on October 24, 2024: member

    @hebasto can you rebase this?

    Rebased.

  30. fanquake added the label DrahtBot Guix build requested on Oct 24, 2024
  31. DrahtBot commented at 9:54 am on October 25, 2024: contributor

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit 74fb19317aec6d5156e12da6be63e59e0cc99770(master) commit 8cf6a3aeaf20437a714b6c2b6f817cd57d8cff09(master and this pull)
    SHA256SUMS.part ad80f9275f7592f5... 60cfbff26d3ac855...
    *-aarch64-linux-gnu-debug.tar.gz e3f077c9e2efe42c... 1611c2fc3615b36a...
    *-aarch64-linux-gnu.tar.gz 84c5837e967a705e... e0db625be9859af1...
    *-arm-linux-gnueabihf-debug.tar.gz 198436220bbb764e... 8115f020abf2acf7...
    *-arm-linux-gnueabihf.tar.gz 8ab9ee456035f028... fb518d26a6936a6c...
    *-arm64-apple-darwin-unsigned.tar.gz 5f3493c8841e7000... 41229727f60b73c3...
    *-arm64-apple-darwin-unsigned.zip 53586205b08dae04... 377fcbf11713b0cb...
    *-arm64-apple-darwin.tar.gz 9bc61a1a9c494690... 19cf2e7611080487...
    *-powerpc64-linux-gnu-debug.tar.gz d736c35074e1ab00... cba9b8d9e094dee0...
    *-powerpc64-linux-gnu.tar.gz dc3411d9d8e023d0... 60d275915f058dbe...
    *-riscv64-linux-gnu-debug.tar.gz 14f550c7e6be73cb... f881035b90972ed6...
    *-riscv64-linux-gnu.tar.gz a5ce20b057de5651... b063b32fa7b6c2d8...
    *-x86_64-apple-darwin-unsigned.tar.gz 0a5aeae59a745fdd... ee329307733e0a36...
    *-x86_64-apple-darwin-unsigned.zip c17d6c147152032f... 3098eb653ffa25a8...
    *-x86_64-apple-darwin.tar.gz eb310f282a01918f... 21a73422bd7b32f1...
    *-x86_64-linux-gnu-debug.tar.gz 788598dd19a44259... c470987123553747...
    *-x86_64-linux-gnu.tar.gz 6b13f937a5601c35... 57a8a8062bb61dc7...
    *.tar.gz d344eb18d56160d8... e059bb50c284f19f...
    guix_build.log baf52e47221c27f4... 57984899bf58d2f5...
    guix_build.log.diff df4e8b61eda9235c...
  32. DrahtBot removed the label DrahtBot Guix build requested on Oct 25, 2024
  33. hebasto commented at 5:00 pm on October 29, 2024: member

    My Guix build:

     0aarch64
     1a2d14a22db6670a4f33aa4a7f9bd04d45cb861993b51670c4c950bf98f68864f  guix-build-707d65ba0d74/output/aarch64-linux-gnu/SHA256SUMS.part
     271d45a6c783b287a3369503b34ef08a42b5c4a2c8c2f636cf4665574e4f2f0ac  guix-build-707d65ba0d74/output/aarch64-linux-gnu/bitcoin-707d65ba0d74-aarch64-linux-gnu-debug.tar.gz
     33f5fb049c4347d25c091ec4412dfb3a9a6488a28aad2cca7bd52d822ff6b5f0f  guix-build-707d65ba0d74/output/aarch64-linux-gnu/bitcoin-707d65ba0d74-aarch64-linux-gnu.tar.gz
     4bb8a6a2aa57ea0d7e26523bd0d9bfd32416c31e3e0f7f1facc237f70c1528b16  guix-build-707d65ba0d74/output/arm-linux-gnueabihf/SHA256SUMS.part
     5abd7c08544aaf6c1c3538a8cdd551eec9e545eac0f2fdaf036d1cf99e6e62933  guix-build-707d65ba0d74/output/arm-linux-gnueabihf/bitcoin-707d65ba0d74-arm-linux-gnueabihf-debug.tar.gz
     6c1a542509b91945b679e520ff398bee9c3d66e94a3a1c356209b88290ae1202e  guix-build-707d65ba0d74/output/arm-linux-gnueabihf/bitcoin-707d65ba0d74-arm-linux-gnueabihf.tar.gz
     7c383ab8414f738ac152cfbc8c273bb224593854d605ecd3317f9d4485c672aa1  guix-build-707d65ba0d74/output/arm64-apple-darwin/SHA256SUMS.part
     89321290cd61e8c11aa46fa68130011362cc2d0a4d6d89520294f255c2de90dde  guix-build-707d65ba0d74/output/arm64-apple-darwin/bitcoin-707d65ba0d74-arm64-apple-darwin-unsigned.tar.gz
     953e9e64ae7f34c19b56528245554a90005ef25af28ef5971eaecb002c821d87c  guix-build-707d65ba0d74/output/arm64-apple-darwin/bitcoin-707d65ba0d74-arm64-apple-darwin-unsigned.zip
    101012af184f40d376e3807ee07f4c12b67a1ccaf43ee469d36b0cb4d2d989a53c  guix-build-707d65ba0d74/output/arm64-apple-darwin/bitcoin-707d65ba0d74-arm64-apple-darwin.tar.gz
    11e725088b69b7f8e1332e488bf0950f1f39ccbb70c632b73dd6548a55861a8efa  guix-build-707d65ba0d74/output/dist-archive/bitcoin-707d65ba0d74.tar.gz
    12881cc54f072595aee80e3e6557ff69d273e212ff5b9dec01eab2b26b15f5ae7a  guix-build-707d65ba0d74/output/powerpc64-linux-gnu/SHA256SUMS.part
    1300937e24253737195ddea04e2305c2e1eebff95152409b23ad39aa645cbd5787  guix-build-707d65ba0d74/output/powerpc64-linux-gnu/bitcoin-707d65ba0d74-powerpc64-linux-gnu-debug.tar.gz
    144fae317645f9b1ea003b6c6002e00bd4700bbe4be5b24d40f831c68d5cacc595  guix-build-707d65ba0d74/output/powerpc64-linux-gnu/bitcoin-707d65ba0d74-powerpc64-linux-gnu.tar.gz
    151db9cd63de6253f01f8ea816847040bf8784c9f8033acc88d52a0b6e5a77dfd4  guix-build-707d65ba0d74/output/riscv64-linux-gnu/SHA256SUMS.part
    16529314421f8301cf3fe88369c647858f73dff06a0f3710bcaa4d9cd4ba54d90b  guix-build-707d65ba0d74/output/riscv64-linux-gnu/bitcoin-707d65ba0d74-riscv64-linux-gnu-debug.tar.gz
    17dbe7d077b7707d04f8b90860064a449b84c0869b8e8ba628e5756e80127153a3  guix-build-707d65ba0d74/output/riscv64-linux-gnu/bitcoin-707d65ba0d74-riscv64-linux-gnu.tar.gz
    1851f2978456c02a6449028a6734e4affcc55002dac2222d546447279eda6aa4ba  guix-build-707d65ba0d74/output/x86_64-apple-darwin/SHA256SUMS.part
    1990f77b77a538820591efc724416936a601ead4a3eba02fd10e119fa8c6ad01da  guix-build-707d65ba0d74/output/x86_64-apple-darwin/bitcoin-707d65ba0d74-x86_64-apple-darwin-unsigned.tar.gz
    20ed0971cf057ccb95712822e39d111bb921e735115a494ae6e0160ec5b84fdb2e  guix-build-707d65ba0d74/output/x86_64-apple-darwin/bitcoin-707d65ba0d74-x86_64-apple-darwin-unsigned.zip
    21a513a1b3cf4a013539a0948e5da007a1574880ccf2df528741ede6107729b465  guix-build-707d65ba0d74/output/x86_64-apple-darwin/bitcoin-707d65ba0d74-x86_64-apple-darwin.tar.gz
    220c2030f3ccfbcbf4c1cb410f854802ad6126e9283a57709e980396b5f7c6241c  guix-build-707d65ba0d74/output/x86_64-linux-gnu/SHA256SUMS.part
    237a0343c42277c10f6bd833c63d6ea1bbfb19ee99e2c77dc06b07b702a7336396  guix-build-707d65ba0d74/output/x86_64-linux-gnu/bitcoin-707d65ba0d74-x86_64-linux-gnu-debug.tar.gz
    247dfc7bc9c6b301e8d51001d8a23077e318ee15d6582d45a0d173bc0269b83eb2  guix-build-707d65ba0d74/output/x86_64-linux-gnu/bitcoin-707d65ba0d74-x86_64-linux-gnu.tar.gz
    2581d60661f8d1bede83b1c2e1784455bdf0356fca6c3b072c1b3bd75a9a8c3b30  guix-build-707d65ba0d74/output/x86_64-w64-mingw32/SHA256SUMS.part
    264a714fafca490232218f2ceb85ff624995f850b71517908e687c6fca0ec6474a  guix-build-707d65ba0d74/output/x86_64-w64-mingw32/bitcoin-707d65ba0d74-win64-debug.zip
    273a47127b553e573d23422917d1c0f13901737089c3c4284c8d8814a196821fa2  guix-build-707d65ba0d74/output/x86_64-w64-mingw32/bitcoin-707d65ba0d74-win64-setup-unsigned.exe
    28b6b3a834a5356034f31564688b1b2d21da2929fe29b6d5c4ae4489b820e2798e  guix-build-707d65ba0d74/output/x86_64-w64-mingw32/bitcoin-707d65ba0d74-win64-unsigned.tar.gz
    29ee775c94af00706762fa29c827baf93afbd68a075298b062213bce391cc2f043  guix-build-707d65ba0d74/output/x86_64-w64-mingw32/bitcoin-707d65ba0d74-win64.zip
    
  34. hebasto commented at 9:42 am on February 10, 2025: member

    @theuni

    However, switching the CC variable context from Makefile to the shell environment breaks expectations

    Arguably that’s because this wasn’t intended to be supported :)

    I suppose this fix is reasonable, though supporting env vars like this seems quite brittle.

    There are testing environments, such as OSS-Fuzz, that rely on a project’s build system to support environment variables.

  35. DrahtBot added the label Needs rebase on Feb 12, 2025
  36. hebasto force-pushed on Feb 12, 2025
  37. hebasto commented at 12:32 pm on February 12, 2025: member
    Rebased to resolve the conflict with the merged bitcoin/bitcoin#30584.
  38. DrahtBot removed the label Needs rebase on Feb 12, 2025
  39. hebasto commented at 3:17 pm on February 12, 2025: member

    My Guix build:

     0aarch64
     1ab623f96d21b9651618ccd3dd1dd547494ecbe199cf1146dfebde4d02cd141a4  guix-build-38d13e68e276/output/aarch64-linux-gnu/SHA256SUMS.part
     21f70c006d53d319ebbfb915a909419d5084489e527c8cf24369f113c96705251  guix-build-38d13e68e276/output/aarch64-linux-gnu/bitcoin-38d13e68e276-aarch64-linux-gnu-debug.tar.gz
     3ae9eb92cdd2eee116bd48199ee9d8093082f58ce158badd47aaaa3cd044d2d9a  guix-build-38d13e68e276/output/aarch64-linux-gnu/bitcoin-38d13e68e276-aarch64-linux-gnu.tar.gz
     431c6976e87e9d1e87759ab3057f2c75eb5ed824e0a986a8317dd7b9bcd0d8fa7  guix-build-38d13e68e276/output/arm-linux-gnueabihf/SHA256SUMS.part
     52a3ac0e4368c9d83419539db88a886e4f49ad93e67bf6bcc78d88c4118ab40c7  guix-build-38d13e68e276/output/arm-linux-gnueabihf/bitcoin-38d13e68e276-arm-linux-gnueabihf-debug.tar.gz
     62a5e990b3c3c236bcfe720d526dbf2a319d15eba81591d280aad15c746511bb9  guix-build-38d13e68e276/output/arm-linux-gnueabihf/bitcoin-38d13e68e276-arm-linux-gnueabihf.tar.gz
     7c5d8de4a45ed34f3cce046a540421fc05ab0f98937479afe279f645522e5d961  guix-build-38d13e68e276/output/arm64-apple-darwin/SHA256SUMS.part
     8f12c6ca851f7f1bc88ed8f31aa87cf10aad84974eceab20e463de91ef3508142  guix-build-38d13e68e276/output/arm64-apple-darwin/bitcoin-38d13e68e276-arm64-apple-darwin-unsigned.tar.gz
     90e03be196c8d5a40e0fd8cfa397e19f0d61f14fb8ff2ab50bf90a06289b2362d  guix-build-38d13e68e276/output/arm64-apple-darwin/bitcoin-38d13e68e276-arm64-apple-darwin-unsigned.zip
    10c3705df317214be53b9360f91ca9a4c1721c6bb4dad75cc348afb19d3f5c3858  guix-build-38d13e68e276/output/arm64-apple-darwin/bitcoin-38d13e68e276-arm64-apple-darwin.tar.gz
    11db57e79fd0d357b99d8d4e762806933ac93d464f19f66b050c9cbe5f52250ab6  guix-build-38d13e68e276/output/dist-archive/bitcoin-38d13e68e276.tar.gz
    12c221715291996b44d6f4b23afb9add05987d50936d0f52fda64d5ee8410b3806  guix-build-38d13e68e276/output/powerpc64-linux-gnu/SHA256SUMS.part
    133c5f3605d0905db76d79fdb84732e0966847c49e0ce0bf676e21c8ba57a1043f  guix-build-38d13e68e276/output/powerpc64-linux-gnu/bitcoin-38d13e68e276-powerpc64-linux-gnu-debug.tar.gz
    14b7766749323a62b282f01de85877921e957db7c1b59a051d2a1b10c17e8c54c0  guix-build-38d13e68e276/output/powerpc64-linux-gnu/bitcoin-38d13e68e276-powerpc64-linux-gnu.tar.gz
    151d2fd609475244b702a3a945f4cf65bbf1ebd1bcabdcd1f8189581255a4ed699  guix-build-38d13e68e276/output/riscv64-linux-gnu/SHA256SUMS.part
    16c4f08e1f730f89084a05c56ff1eca2962ac1ca83add1cc65ef46fc4a93fd0ea2  guix-build-38d13e68e276/output/riscv64-linux-gnu/bitcoin-38d13e68e276-riscv64-linux-gnu-debug.tar.gz
    1712a1f93c3bb5aaff41cd9ecb4bf4fe6e09cb251befa06c2d3832706bc6a87d97  guix-build-38d13e68e276/output/riscv64-linux-gnu/bitcoin-38d13e68e276-riscv64-linux-gnu.tar.gz
    18bc6ab43d9046cccb70fcef4782395bcc71ca0039ab0c63fdd60fbe9de0d0a573  guix-build-38d13e68e276/output/x86_64-apple-darwin/SHA256SUMS.part
    19aa844cf3c1cec314bd7035845cedadc1240aa7dc77b6510f85735d464f5f84d5  guix-build-38d13e68e276/output/x86_64-apple-darwin/bitcoin-38d13e68e276-x86_64-apple-darwin-unsigned.tar.gz
    2043d30e0027c18a7aeb439b13b6761373cb53984500b3e99ebb82cac2d7fb11ca  guix-build-38d13e68e276/output/x86_64-apple-darwin/bitcoin-38d13e68e276-x86_64-apple-darwin-unsigned.zip
    21a4ee31178b1746245f27ed77a61c928f1df39ff916fb83193828666b364a3849  guix-build-38d13e68e276/output/x86_64-apple-darwin/bitcoin-38d13e68e276-x86_64-apple-darwin.tar.gz
    22f01cff25baea72e8a2ddfeab7e1d04023cfc99176072e6446aebd59cb501dc18  guix-build-38d13e68e276/output/x86_64-linux-gnu/SHA256SUMS.part
    239dfcf2c386ea4821425449ff1244aa26b83c70b6fa36767de26be48ff98d069e  guix-build-38d13e68e276/output/x86_64-linux-gnu/bitcoin-38d13e68e276-x86_64-linux-gnu-debug.tar.gz
    24755689356c0838578db1b7fe61f2b0727e8cdddccd015a7f69188174149a981a  guix-build-38d13e68e276/output/x86_64-linux-gnu/bitcoin-38d13e68e276-x86_64-linux-gnu.tar.gz
    25b0f47c75baea43007e7cf8469634121086068cb6658107a46faef2e0b2f7d64c  guix-build-38d13e68e276/output/x86_64-w64-mingw32/SHA256SUMS.part
    26b6a07fc34dc3c50ae4804aebfbfcfdd05f553e80df73dfa9de78790e5f395250  guix-build-38d13e68e276/output/x86_64-w64-mingw32/bitcoin-38d13e68e276-win64-debug.zip
    27154d6cb011f475b21c0941a568662ada35654cff20d05fd0cd4dd28214e8c169  guix-build-38d13e68e276/output/x86_64-w64-mingw32/bitcoin-38d13e68e276-win64-setup-unsigned.exe
    28ca2708afbadea82d840a69885d5b5f6f233b32ff5b512e20b5f34c7e51c18875  guix-build-38d13e68e276/output/x86_64-w64-mingw32/bitcoin-38d13e68e276-win64-unsigned.tar.gz
    29e7c0ece29c932db0747bfa5e7924b9553c1dd18e21f5c066f58d33ecb1e8b5c3  guix-build-38d13e68e276/output/x86_64-w64-mingw32/bitcoin-38d13e68e276-win64.zip
    
  40. theuni commented at 6:55 pm on February 12, 2025: member

    I don’t understand this change. It seems setting CC_FOR_BUILD to CC is exactly the opposite of what we want to do? @hebasto’s original change makes more sense to me:

    0BUILD = $(shell env --unset CC ./config.guess)
    

    That ignores what’s set in CC when detecting the native platform, which seems like the correct behavior to me.

    What was your intention with this patch, @fanquake ?

  41. DrahtBot added the label CI failed on Jul 3, 2025
  42. DrahtBot removed the label CI failed on Jul 3, 2025
  43. hebasto commented at 2:47 pm on October 16, 2025: member

    What was your intention with this patch, @fanquake ? @fanquake

    Can you please follow up here?

  44. fanquake commented at 3:01 pm on October 16, 2025: member

    What was your intention with this patch, @fanquake ?

    At this point I can’t remember.

  45. depends: Do not consider `CC` environment variable when detecting system
    Otherwise, the build system fails to detect cross-compiling mode
    properly in some cases when `CC` is set.
    a8cdc5872e
  46. hebasto force-pushed on Oct 16, 2025
  47. hebasto commented at 3:30 pm on October 16, 2025: member

    I don’t understand this change. It seems setting CC_FOR_BUILD to CC is exactly the opposite of what we want to do?

    @hebasto’s original change makes more sense to me:

    0BUILD = $(shell env --unset CC ./config.guess)
    

    That ignores what’s set in CC when detecting the native platform, which seems like the correct behavior to me.

    Reverted to the initial variant.

  48. maflcko added the label DrahtBot Guix build requested on Oct 17, 2025
  49. DrahtBot commented at 5:19 am on October 18, 2025: contributor

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit e744fd1249bf9577274614eaf3997bf4bbb612ff(master) commit 54dbc5e77ad00e3f7380c38bfae16ad9b658ff82(pull/29963/merge)
    *-aarch64-linux-gnu-debug.tar.gz 32d2b2bff7365b1c... ce61c970b8dc1d60...
    *-aarch64-linux-gnu.tar.gz 3594fcd0903223b0... c7c95543170ed8e4...
    *-arm-linux-gnueabihf-debug.tar.gz 4de5c3cd73bd7eb9... 1a19b67c6b36dabd...
    *-arm-linux-gnueabihf.tar.gz 13f399dfc5a94137... d2948f4a50b0a508...
    *-arm64-apple-darwin-codesigning.tar.gz 0c9523d4eb3ba947... c151d061693ef9de...
    *-arm64-apple-darwin-unsigned.tar.gz f882bd8563b54515... c5017f8707b03ecc...
    *-arm64-apple-darwin-unsigned.zip 3a60151847070008... 025cfb4b4edbae2a...
    *-powerpc64-linux-gnu-debug.tar.gz 8f1f0238de30643b... 255bfcdc5775c810...
    *-powerpc64-linux-gnu.tar.gz 7e7ac48e6be97c65... 10ecdfeec2d83982...
    *-riscv64-linux-gnu-debug.tar.gz e3fd237224b534e3... f3cc48ef19a06439...
    *-riscv64-linux-gnu.tar.gz fbb4391c11fd6b13... 4d975b60e434c347...
    *-x86_64-apple-darwin-codesigning.tar.gz 1f328e37aeebed54... e751d8b18aa1a9aa...
    *-x86_64-apple-darwin-unsigned.tar.gz 45bc90bde841a319... b58bed75699aacbd...
    *-x86_64-apple-darwin-unsigned.zip 0e98d3057136e774... bed415617451a200...
    *-x86_64-linux-gnu-debug.tar.gz df820b76cfc1f8fd... 707cc102e4367aac...
    *-x86_64-linux-gnu.tar.gz 1498128d1e400b9b... 074e090586df1d19...
    *.tar.gz 5a44c21c41738a47... 23a07719c8928b63...
    SHA256SUMS.part ac10442f7b6714bf... f056342587a24108...
    guix_build.log c91f72065087d81c... 32f7c30269b7d917...
    guix_build.log.diff cf719a9200d66db7...
  50. DrahtBot removed the label DrahtBot Guix build requested on Oct 18, 2025
  51. hebasto renamed this:
    depends: Use `CC_FOR_BUILD` for `config.guess `
    depends: Do not consider `CC` environment variable for detecting system
    on Dec 4, 2025
  52. ryanofsky approved
  53. ryanofsky commented at 1:43 pm on December 15, 2025: contributor
    Code review ACK a8cdc5872eaaffd56a8c79c6d371feb0df12431a. Seems good to unset an environment variable intended for cross compilation that is a causing a bad result when calling a native tool.
  54. hebasto commented at 5:53 pm on December 15, 2025: member

    My Guix build:

     0$ uname -m && find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     1aarch64
     27499d3ff76f9fec34c5d18fe5a9b518a96b6a8bed0c4e4981a7d718ca70cd695  guix-build-a8cdc5872eaa/output/aarch64-linux-gnu/SHA256SUMS.part
     36edf8ed2a7548293a3ff2ddd4e6d8ea9b8d26af330a8e5e6b36a699a4f4b4ef3  guix-build-a8cdc5872eaa/output/aarch64-linux-gnu/bitcoin-a8cdc5872eaa-aarch64-linux-gnu-debug.tar.gz
     4bd3b3a35d0a8f458fb750332ffe87fa827623aa2165b771bc5fce68df0a77faf  guix-build-a8cdc5872eaa/output/aarch64-linux-gnu/bitcoin-a8cdc5872eaa-aarch64-linux-gnu.tar.gz
     5836f1dba1a32b7e875dadb2de06645b19a10e57cd6cb7fa83183076783048c58  guix-build-a8cdc5872eaa/output/arm-linux-gnueabihf/SHA256SUMS.part
     617f49dff7a519d4ef6db3346b6c3a85cbd69b5d7eb771278a66901af669fd65c  guix-build-a8cdc5872eaa/output/arm-linux-gnueabihf/bitcoin-a8cdc5872eaa-arm-linux-gnueabihf-debug.tar.gz
     7dbb62bdef08f4a66abbc4df29c6b6f13160eac829a2c57e159501b7b3f2c19f0  guix-build-a8cdc5872eaa/output/arm-linux-gnueabihf/bitcoin-a8cdc5872eaa-arm-linux-gnueabihf.tar.gz
     89b9307b0a4d55095e9e3c51739d68776c3a1ca0af94422157c549b91a2e73452  guix-build-a8cdc5872eaa/output/arm64-apple-darwin/SHA256SUMS.part
     9250af8ba53d39d4ce8a5c16956b064a7b2d82bb72f7097426f1b2477aa6d1c7a  guix-build-a8cdc5872eaa/output/arm64-apple-darwin/bitcoin-a8cdc5872eaa-arm64-apple-darwin-codesigning.tar.gz
    10ee2958eb2ae9c27fb45804cf197c3d5ee13c7706382c7358c8175a17aa935820  guix-build-a8cdc5872eaa/output/arm64-apple-darwin/bitcoin-a8cdc5872eaa-arm64-apple-darwin-unsigned.tar.gz
    11a3dfa546006a9cb118402ada458d9bbf5bafb9c9cf91abdf83492d34aea2f068  guix-build-a8cdc5872eaa/output/arm64-apple-darwin/bitcoin-a8cdc5872eaa-arm64-apple-darwin-unsigned.zip
    12092eeec72bf498d7bd783a532c8874756bd13d6d9bd69a414222ef74a749fc62  guix-build-a8cdc5872eaa/output/dist-archive/bitcoin-a8cdc5872eaa.tar.gz
    13687c8c72f1503e6b0ee54b233bd03d9dd4fb7d5902d91888bb482321b898c0fc  guix-build-a8cdc5872eaa/output/powerpc64-linux-gnu/SHA256SUMS.part
    14cf3a04fcc59b81db4a0da1c970400a2b6f6230a0a89667c2d2ad934c3d48df24  guix-build-a8cdc5872eaa/output/powerpc64-linux-gnu/bitcoin-a8cdc5872eaa-powerpc64-linux-gnu-debug.tar.gz
    15f6b68b8b2270092f4f65bdc66303f2230964838afccec322215bd81f8db90d19  guix-build-a8cdc5872eaa/output/powerpc64-linux-gnu/bitcoin-a8cdc5872eaa-powerpc64-linux-gnu.tar.gz
    16d7b7e4a85940de9b8b77d3dabca47693d235c38bcbe8ce35208fd3a473f688c1  guix-build-a8cdc5872eaa/output/riscv64-linux-gnu/SHA256SUMS.part
    172a53aeb926f648f802e570cfa4e942123baeb75d242ba655478b71ac860ae139  guix-build-a8cdc5872eaa/output/riscv64-linux-gnu/bitcoin-a8cdc5872eaa-riscv64-linux-gnu-debug.tar.gz
    1859b42734415f705f7b55dbf8640ceba81f350a48e15e0d3c5bcac8422ea74302  guix-build-a8cdc5872eaa/output/riscv64-linux-gnu/bitcoin-a8cdc5872eaa-riscv64-linux-gnu.tar.gz
    19e2915d9d12bdcf4d16e69922ac0274bcb5f73ef9c80f12755c6eb710afe937d7  guix-build-a8cdc5872eaa/output/x86_64-apple-darwin/SHA256SUMS.part
    20dc89bdb96c2f40a59f962f04c1fa73aaddcc00945885d05932a9865665476a33  guix-build-a8cdc5872eaa/output/x86_64-apple-darwin/bitcoin-a8cdc5872eaa-x86_64-apple-darwin-codesigning.tar.gz
    21124be6f6f93bd1720caa4e22c5c0b9ee31104fcda1ed5dc5ecf3e454fbbbc445  guix-build-a8cdc5872eaa/output/x86_64-apple-darwin/bitcoin-a8cdc5872eaa-x86_64-apple-darwin-unsigned.tar.gz
    2275ef0b32548755b4dd3e6874449f163e421ad94f4ab282ecbc3b7f14450f83ae  guix-build-a8cdc5872eaa/output/x86_64-apple-darwin/bitcoin-a8cdc5872eaa-x86_64-apple-darwin-unsigned.zip
    239c33d57ae3cdb5d1f8f7f7eb1318d9c6a858be04807492892fdaffbd4bbc810e  guix-build-a8cdc5872eaa/output/x86_64-linux-gnu/SHA256SUMS.part
    24adbb6dda5bedeb6bb074ee7cfe1c25c0143f036314d5cdf76251ea165b66a08e  guix-build-a8cdc5872eaa/output/x86_64-linux-gnu/bitcoin-a8cdc5872eaa-x86_64-linux-gnu-debug.tar.gz
    2587196f4a93e58022dfb35d7dc0324929527ac57410044ccaa33235d0b6068fad  guix-build-a8cdc5872eaa/output/x86_64-linux-gnu/bitcoin-a8cdc5872eaa-x86_64-linux-gnu.tar.gz
    2651d0a2924d37c31605913776b4011f300f4af3e587148faa1777aae1c676fc12  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/SHA256SUMS.part
    277ccd8cb5185a4c1834f76d6e000d2a6f3299324971025d497e969f8b43e10b11  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/bitcoin-a8cdc5872eaa-win64-codesigning.tar.gz
    28e022f885987d0232017810e610f3ebfe57ca81c7f332fead23fc96331282964c  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/bitcoin-a8cdc5872eaa-win64-debug.zip
    297f408eee780c177b31b306ad5833505d9ee6942b82fad31faea1eeb9d9d03e36  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/bitcoin-a8cdc5872eaa-win64-setup-unsigned.exe
    30900619e260c79bffc4a9781a1c998729c97720a8a89ddef6994eb994670bf234  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/bitcoin-a8cdc5872eaa-win64-unsigned.zip
    
  55. ryanofsky commented at 10:06 pm on December 16, 2025: contributor

    Current version of this PR is ok but I do think fanquake’s suggested change #29963 (comment) passing along the requested compiler to config.guess would be an improvement.

    I think his change had a typo because it suggests using CC_FOR_BUILD=$CC when this should probably be CC_FOR_BUILD=$(build_CC) (or CC=$(build_CC) which is equivalent) because if a depends user specifies build_CC it makes sense to have config.guess use it instead of ignoring it and probing for alternate compilers:

    https://github.com/bitcoin/bitcoin/blob/13891a8a685d255cb13dd5018e3d5ccc18b07c34/depends/config.guess#L126-L130

  56. sedited approved
  57. sedited commented at 10:16 pm on January 2, 2026: contributor

    ACK a8cdc5872eaaffd56a8c79c6d371feb0df12431a

    Edit: ryanofsky’s idea above (i.e. propagating build_CC seems like a good addition though.


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-01-08 12:13 UTC

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