Skip to content

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

Open
hebasto wants to merge 1 commit intobitcoin:masterfrom
hebasto:240425-guess-cc
Open

depends: Do not consider CC environment variable for detecting system#29963
hebasto wants to merge 1 commit intobitcoin:masterfrom
hebasto:240425-guess-cc

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Apr 25, 2024

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

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

The printed variable values are expected.

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

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

This PR fixes this issue.

UPDATE 2026-01-20

On the master branch @ 7f5ebef:

$ gmake print-build HOST=i686-pc-linux-gnu CC="clang -m32"
build=i686-pc-linux-gnu
$ gmake print-host HOST=i686-pc-linux-gnu CC="clang -m32"
host=i686-pc-linux-gnu

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 25, 2024

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 sedited, ryanofsky

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.

hebasto added a commit to hebasto/bitcoin that referenced this pull request Apr 25, 2024
A workaround for a bug fixed in bitcoin#29963
@theuni
Copy link
Member

theuni commented Apr 25, 2024

Where/why is this an issue?

hebasto added a commit to hebasto/bitcoin that referenced this pull request Apr 25, 2024
A workaround for a bug fixed in bitcoin#29963
@hebasto
Copy link
Member Author

hebasto commented Apr 25, 2024

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.

@theuni
Copy link
Member

theuni commented Apr 25, 2024

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

@maflcko
Copy link
Member

maflcko commented Apr 26, 2024

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".

@hebasto
Copy link
Member Author

hebasto commented Apr 26, 2024

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:

Cross 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.

@fanquake
Copy link
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:

diff --git a/depends/Makefile b/depends/Makefile
index 005d9696fb..091511758d 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -51,7 +51,7 @@ FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
 C_STANDARD ?= c11
 CXX_STANDARD ?= c++20
 
-BUILD = $(shell ./config.guess)
+BUILD = $(shell CC_FOR_BUILD=$CC ./config.guess)
 HOST ?= $(BUILD)
 PATCHES_PATH = $(BASEDIR)/patches
 BASEDIR = $(CURDIR)

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

@hebasto
Copy link
Member Author

hebasto commented Apr 26, 2024

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!

@hebasto hebasto changed the title depends: Do not consider CC environment variable for detecting system depends: Use CC_FOR_BUILD for config.guess Apr 26, 2024
@theuni
Copy link
Member

theuni commented Apr 26, 2024

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.

hebasto added a commit to hebasto/bitcoin that referenced this pull request Apr 30, 2024
A workaround for a bug fixed in bitcoin#29963
hebasto added a commit to hebasto/bitcoin that referenced this pull request May 2, 2024
A workaround for a bug fixed in bitcoin#29963
@fanquake
Copy link
Member

Is this still an issue given recent CMake changes?

@hebasto
Copy link
Member Author

hebasto commented Jun 3, 2024

Is this still an issue given recent CMake changes?

Yes. Tested with the master branch @ 80bdd4b.

And this PR still fixes it.

@fanquake
Copy link
Member

@hebasto can you rebase this?

@hebasto
Copy link
Member Author

hebasto commented Oct 24, 2024

@hebasto can you rebase this?

Rebased.

@hebasto
Copy link
Member Author

hebasto commented Oct 16, 2025

What was your intention with this patch, @fanquake ?

@fanquake

Can you please follow up here?

@fanquake
Copy link
Member

What was your intention with this patch, @fanquake ?

At this point I can't remember.

@hebasto
Copy link
Member Author

hebasto commented Oct 16, 2025

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:

BUILD = $(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.

@DrahtBot
Copy link
Contributor

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

File commit e744fd1
(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...

@hebasto hebasto changed the title depends: Use CC_FOR_BUILD for config.guess depends: Do not consider CC environment variable for detecting system Dec 4, 2025
Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK a8cdc58. Seems good to unset an environment variable intended for cross compilation that is a causing a bad result when calling a native tool.

@hebasto
Copy link
Member Author

hebasto commented Dec 15, 2025

My Guix build:

$ uname -m && find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
aarch64
7499d3ff76f9fec34c5d18fe5a9b518a96b6a8bed0c4e4981a7d718ca70cd695  guix-build-a8cdc5872eaa/output/aarch64-linux-gnu/SHA256SUMS.part
6edf8ed2a7548293a3ff2ddd4e6d8ea9b8d26af330a8e5e6b36a699a4f4b4ef3  guix-build-a8cdc5872eaa/output/aarch64-linux-gnu/bitcoin-a8cdc5872eaa-aarch64-linux-gnu-debug.tar.gz
bd3b3a35d0a8f458fb750332ffe87fa827623aa2165b771bc5fce68df0a77faf  guix-build-a8cdc5872eaa/output/aarch64-linux-gnu/bitcoin-a8cdc5872eaa-aarch64-linux-gnu.tar.gz
836f1dba1a32b7e875dadb2de06645b19a10e57cd6cb7fa83183076783048c58  guix-build-a8cdc5872eaa/output/arm-linux-gnueabihf/SHA256SUMS.part
17f49dff7a519d4ef6db3346b6c3a85cbd69b5d7eb771278a66901af669fd65c  guix-build-a8cdc5872eaa/output/arm-linux-gnueabihf/bitcoin-a8cdc5872eaa-arm-linux-gnueabihf-debug.tar.gz
dbb62bdef08f4a66abbc4df29c6b6f13160eac829a2c57e159501b7b3f2c19f0  guix-build-a8cdc5872eaa/output/arm-linux-gnueabihf/bitcoin-a8cdc5872eaa-arm-linux-gnueabihf.tar.gz
9b9307b0a4d55095e9e3c51739d68776c3a1ca0af94422157c549b91a2e73452  guix-build-a8cdc5872eaa/output/arm64-apple-darwin/SHA256SUMS.part
250af8ba53d39d4ce8a5c16956b064a7b2d82bb72f7097426f1b2477aa6d1c7a  guix-build-a8cdc5872eaa/output/arm64-apple-darwin/bitcoin-a8cdc5872eaa-arm64-apple-darwin-codesigning.tar.gz
ee2958eb2ae9c27fb45804cf197c3d5ee13c7706382c7358c8175a17aa935820  guix-build-a8cdc5872eaa/output/arm64-apple-darwin/bitcoin-a8cdc5872eaa-arm64-apple-darwin-unsigned.tar.gz
a3dfa546006a9cb118402ada458d9bbf5bafb9c9cf91abdf83492d34aea2f068  guix-build-a8cdc5872eaa/output/arm64-apple-darwin/bitcoin-a8cdc5872eaa-arm64-apple-darwin-unsigned.zip
092eeec72bf498d7bd783a532c8874756bd13d6d9bd69a414222ef74a749fc62  guix-build-a8cdc5872eaa/output/dist-archive/bitcoin-a8cdc5872eaa.tar.gz
687c8c72f1503e6b0ee54b233bd03d9dd4fb7d5902d91888bb482321b898c0fc  guix-build-a8cdc5872eaa/output/powerpc64-linux-gnu/SHA256SUMS.part
cf3a04fcc59b81db4a0da1c970400a2b6f6230a0a89667c2d2ad934c3d48df24  guix-build-a8cdc5872eaa/output/powerpc64-linux-gnu/bitcoin-a8cdc5872eaa-powerpc64-linux-gnu-debug.tar.gz
f6b68b8b2270092f4f65bdc66303f2230964838afccec322215bd81f8db90d19  guix-build-a8cdc5872eaa/output/powerpc64-linux-gnu/bitcoin-a8cdc5872eaa-powerpc64-linux-gnu.tar.gz
d7b7e4a85940de9b8b77d3dabca47693d235c38bcbe8ce35208fd3a473f688c1  guix-build-a8cdc5872eaa/output/riscv64-linux-gnu/SHA256SUMS.part
2a53aeb926f648f802e570cfa4e942123baeb75d242ba655478b71ac860ae139  guix-build-a8cdc5872eaa/output/riscv64-linux-gnu/bitcoin-a8cdc5872eaa-riscv64-linux-gnu-debug.tar.gz
59b42734415f705f7b55dbf8640ceba81f350a48e15e0d3c5bcac8422ea74302  guix-build-a8cdc5872eaa/output/riscv64-linux-gnu/bitcoin-a8cdc5872eaa-riscv64-linux-gnu.tar.gz
e2915d9d12bdcf4d16e69922ac0274bcb5f73ef9c80f12755c6eb710afe937d7  guix-build-a8cdc5872eaa/output/x86_64-apple-darwin/SHA256SUMS.part
dc89bdb96c2f40a59f962f04c1fa73aaddcc00945885d05932a9865665476a33  guix-build-a8cdc5872eaa/output/x86_64-apple-darwin/bitcoin-a8cdc5872eaa-x86_64-apple-darwin-codesigning.tar.gz
124be6f6f93bd1720caa4e22c5c0b9ee31104fcda1ed5dc5ecf3e454fbbbc445  guix-build-a8cdc5872eaa/output/x86_64-apple-darwin/bitcoin-a8cdc5872eaa-x86_64-apple-darwin-unsigned.tar.gz
75ef0b32548755b4dd3e6874449f163e421ad94f4ab282ecbc3b7f14450f83ae  guix-build-a8cdc5872eaa/output/x86_64-apple-darwin/bitcoin-a8cdc5872eaa-x86_64-apple-darwin-unsigned.zip
9c33d57ae3cdb5d1f8f7f7eb1318d9c6a858be04807492892fdaffbd4bbc810e  guix-build-a8cdc5872eaa/output/x86_64-linux-gnu/SHA256SUMS.part
adbb6dda5bedeb6bb074ee7cfe1c25c0143f036314d5cdf76251ea165b66a08e  guix-build-a8cdc5872eaa/output/x86_64-linux-gnu/bitcoin-a8cdc5872eaa-x86_64-linux-gnu-debug.tar.gz
87196f4a93e58022dfb35d7dc0324929527ac57410044ccaa33235d0b6068fad  guix-build-a8cdc5872eaa/output/x86_64-linux-gnu/bitcoin-a8cdc5872eaa-x86_64-linux-gnu.tar.gz
51d0a2924d37c31605913776b4011f300f4af3e587148faa1777aae1c676fc12  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/SHA256SUMS.part
7ccd8cb5185a4c1834f76d6e000d2a6f3299324971025d497e969f8b43e10b11  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/bitcoin-a8cdc5872eaa-win64-codesigning.tar.gz
e022f885987d0232017810e610f3ebfe57ca81c7f332fead23fc96331282964c  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/bitcoin-a8cdc5872eaa-win64-debug.zip
7f408eee780c177b31b306ad5833505d9ee6942b82fad31faea1eeb9d9d03e36  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/bitcoin-a8cdc5872eaa-win64-setup-unsigned.exe
900619e260c79bffc4a9781a1c998729c97720a8a89ddef6994eb994670bf234  guix-build-a8cdc5872eaa/output/x86_64-w64-mingw32/bitcoin-a8cdc5872eaa-win64-unsigned.zip

@ryanofsky
Copy link
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:

for driver in cc gcc c17 c99 c89 ; do
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD=$driver
break
fi

Copy link
Contributor

@sedited sedited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK a8cdc58

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

Otherwise, the build system fails to detect cross-compiling mode
properly in some cases when `CC` is set.
@hebasto
Copy link
Member Author

hebasto commented Jan 20, 2026

Rebased. @fanquake's comment has been addressed.

@hebasto
Copy link
Member Author

hebasto commented Jan 20, 2026

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:

for driver in cc gcc c17 c99 c89 ; do
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD=$driver
break
fi

I agree that using CC_FOR_BUILD is the preferred way to communicate with config.guess. However, it will require non-trivial refactoring of depends/Makefile, as build_CC is evaluated late in depends/builders/default.mk.

@hebasto
Copy link
Member Author

hebasto commented Jan 21, 2026

My Guix build:

$ uname -m && find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
aarch64
8c61dbdc73e273e9f336cdc64c48121037d0aed2a1a7f054184d827ac8499cd7  guix-build-b149a28f6b86/output/aarch64-linux-gnu/SHA256SUMS.part
b3ffed84220353f0ed0b4276e5705c5c4b8b8161e0f40cd45c69310f0ac41ff5  guix-build-b149a28f6b86/output/aarch64-linux-gnu/bitcoin-b149a28f6b86-aarch64-linux-gnu-debug.tar.gz
83989804e95ac165fe08fc6fe39ff529140a4c123dabac670686d8b86bbfa039  guix-build-b149a28f6b86/output/aarch64-linux-gnu/bitcoin-b149a28f6b86-aarch64-linux-gnu.tar.gz
a9e02d7909575292e4e1d5664b1ccaf649344bc940fef6d58f3334893ee0f3c3  guix-build-b149a28f6b86/output/arm-linux-gnueabihf/SHA256SUMS.part
937a9f8fbe5a0dcedd6a4b4480a3b0f31b4bea574150a19a5c7c9df30b91b666  guix-build-b149a28f6b86/output/arm-linux-gnueabihf/bitcoin-b149a28f6b86-arm-linux-gnueabihf-debug.tar.gz
9796fc4a2478b8dab6fadfca32e5f720df90b8c3fdc510855696ee8ab5c60df6  guix-build-b149a28f6b86/output/arm-linux-gnueabihf/bitcoin-b149a28f6b86-arm-linux-gnueabihf.tar.gz
25240da10e175e00ff7144985b60c1a791aa38a728fdf6ade0b478b791df82e5  guix-build-b149a28f6b86/output/arm64-apple-darwin/SHA256SUMS.part
39f0c66407749d1cec3014dc9f92f4550d7e01202e2b9ba074bce711f91c8e1b  guix-build-b149a28f6b86/output/arm64-apple-darwin/bitcoin-b149a28f6b86-arm64-apple-darwin-codesigning.tar.gz
96dcd8518b25904dad4679e40738783ffb387a32c5fb2417801ed5cf9857f959  guix-build-b149a28f6b86/output/arm64-apple-darwin/bitcoin-b149a28f6b86-arm64-apple-darwin-unsigned.tar.gz
b10fdcf921999bfeb2089f38cc73c95b3cd9044941e0b63ea1eada80bbaf78f2  guix-build-b149a28f6b86/output/arm64-apple-darwin/bitcoin-b149a28f6b86-arm64-apple-darwin-unsigned.zip
64d27a1b596be20bfd954d717cb3b0e4cd514af37f28ed020e12e1c11f602a4e  guix-build-b149a28f6b86/output/dist-archive/bitcoin-b149a28f6b86.tar.gz
45eb520337e8a5aab723e56ec48bd1c0fc70b74536f376c645f343a094ea1423  guix-build-b149a28f6b86/output/powerpc64-linux-gnu/SHA256SUMS.part
ee7eb54979168091733f74e6ef94d2b04a777b74323e9bc9d1e6bdee4bcedf1c  guix-build-b149a28f6b86/output/powerpc64-linux-gnu/bitcoin-b149a28f6b86-powerpc64-linux-gnu-debug.tar.gz
81350b0f2fd948dfe7b32d62f1ab9a29a66fa10747778180c7e7159c9ce0c91d  guix-build-b149a28f6b86/output/powerpc64-linux-gnu/bitcoin-b149a28f6b86-powerpc64-linux-gnu.tar.gz
5c1a05c5052168ce6624dcc17affa49fb9934fb14726fb567d3f6e092e4789f7  guix-build-b149a28f6b86/output/riscv64-linux-gnu/SHA256SUMS.part
1f4d807e17fa5519f41963a64f222ba329edd29e4c37404c195c77cc85e4e054  guix-build-b149a28f6b86/output/riscv64-linux-gnu/bitcoin-b149a28f6b86-riscv64-linux-gnu-debug.tar.gz
c028a52b1d516553994fe27d7f4d5ddde16f8e3f9d137acb141070b3786482a2  guix-build-b149a28f6b86/output/riscv64-linux-gnu/bitcoin-b149a28f6b86-riscv64-linux-gnu.tar.gz
1c7e0069aec956a38b3e6b65b2cb3deca31b26f0150779c446e1952f8af50d92  guix-build-b149a28f6b86/output/x86_64-apple-darwin/SHA256SUMS.part
f250735778c89347d920a57c48c1c359eab78b0f36d71298ceebdb2d806225ed  guix-build-b149a28f6b86/output/x86_64-apple-darwin/bitcoin-b149a28f6b86-x86_64-apple-darwin-codesigning.tar.gz
b91f645b3bbfb960315706ca03d80335c1546f1736bad1c157ba466533b5ad35  guix-build-b149a28f6b86/output/x86_64-apple-darwin/bitcoin-b149a28f6b86-x86_64-apple-darwin-unsigned.tar.gz
487a853c611780fc69d8c0661afeacfccb30b73a74d73e2808db0cdad292147e  guix-build-b149a28f6b86/output/x86_64-apple-darwin/bitcoin-b149a28f6b86-x86_64-apple-darwin-unsigned.zip
82e85f8b085d703e765d5c349ea8a3e5fbcaf9e21a734ac4e71c13869dc9e3c8  guix-build-b149a28f6b86/output/x86_64-linux-gnu/SHA256SUMS.part
61e8b2ee7156671ec763b7d3bd9ef61ec606a5757003d714a5f0ea0620e30360  guix-build-b149a28f6b86/output/x86_64-linux-gnu/bitcoin-b149a28f6b86-x86_64-linux-gnu-debug.tar.gz
7f433e6b6f2a6ca5c9c4e2b302a27164c545a80654257adb5be475824c4709b5  guix-build-b149a28f6b86/output/x86_64-linux-gnu/bitcoin-b149a28f6b86-x86_64-linux-gnu.tar.gz
7ed5214baf946578444de8d1201c7de12cb60f8493906da98d3804f227069182  guix-build-b149a28f6b86/output/x86_64-w64-mingw32/SHA256SUMS.part
3024741c291f97078dbf1097a67e73deb67f28e360f4cdbaaee106bae258ecf5  guix-build-b149a28f6b86/output/x86_64-w64-mingw32/bitcoin-b149a28f6b86-win64-codesigning.tar.gz
3c1a64176ddc05f926fa219cfebe58297eea9a918fa269f871cbfb6d0716ebd8  guix-build-b149a28f6b86/output/x86_64-w64-mingw32/bitcoin-b149a28f6b86-win64-debug.zip
67fa2ae79b13f35b7ccfb90a8f25e92362985399c9e0bb3b80119e1b60719f60  guix-build-b149a28f6b86/output/x86_64-w64-mingw32/bitcoin-b149a28f6b86-win64-setup-unsigned.exe
15d9dccd1d104aad970d9269e01d7d37d553a331b3355287294ea36d98205dbe  guix-build-b149a28f6b86/output/x86_64-w64-mingw32/bitcoin-b149a28f6b86-win64-unsigned.zip

hebasto added a commit that referenced this pull request Feb 6, 2026
d79249d ci: add chimera Linux LTO CI job (fanquake)

Pull request description:

  Adds a CI config based on using [Chimera Linux](https://chimera-linux.org/). This might be interesting for any of the following:
  * Chimera is based on LLVM & musl libc - we test both of these in isolation, but not together.
  * No GNU components. I don't think we have an existing Linux CI job that doesn't have a gcc/stdlibc++ install. This exercises the depends logic for a fully LLVM/Clang/lld only build, including building the native tools (related to #33902).
  * We don't currently have a job with LTO enabled (here using CMakes `CMAKE_INTERPROCEDURAL_OPTIMIZATION`, which is `-flto=thin` for LLVM/Clang). I think this is worth having generally (we do use LTO in some other places, like oss-fuzz). If runtime is too much of an issue, then it could also be dropped. (Chimera itself is also compiled with LTO).

  QT in depends doesn't build (#32744), so is excluded for now.

  Chimera has pointed out at least a few quirks, i.e #34390, #34408 and #29963 (comment).

ACKs for top commit:
  maflcko:
    lgtm ACK d79249d
  hebasto:
    ACK d79249d.

Tree-SHA512: 1174a7462bf2e7433a2c27a6cf398e94b05db42bb414629c71cf9f9a297ca269e173ae1b7517b30510b494b4397f918eef706d3c75c4286767c5557aeb6db4c7
CXX_STANDARD ?= c++20

BUILD = $(shell ./config.guess)
BUILD = $(shell unset CC && ./config.guess)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to use a utility for this? Can't we set CC=?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While CC= might work (I haven't test it), it relies on specific behavior in the configure script's implementation, making it a brittle solution.

Copy link
Contributor

@sedited sedited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-ACK b149a28

@DrahtBot
Copy link
Contributor

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

File commit b65ff0e
(master)
commit a959a54
(pull/29963/merge)
*-aarch64-linux-gnu-debug.tar.gz 50e56b382cbc13b2... 40e8269f72a6a198...
*-aarch64-linux-gnu.tar.gz 43a9709bf4519808... 60baf92d9de6a2e1...
*-arm-linux-gnueabihf-debug.tar.gz c6b2888003eabb60... 9b47e2c60dfbc922...
*-arm-linux-gnueabihf.tar.gz 0639e712812b4ed8... e94f92ff8e02e608...
*-arm64-apple-darwin-codesigning.tar.gz 741a0a34d9e32089... ef661adb9061b15a...
*-arm64-apple-darwin-unsigned.tar.gz d5a1828c77b5b255... c16ad6bb5a830e25...
*-arm64-apple-darwin-unsigned.zip 151fc9ef00a4d3a3... 04b43fae177ee7d7...
*-powerpc64-linux-gnu-debug.tar.gz 91559bd33e4040ff... 71ee3cbdcf873102...
*-powerpc64-linux-gnu.tar.gz 6e7c7b88b954aecf... b0538137fc7704e4...
*-riscv64-linux-gnu-debug.tar.gz 07b1754be7cc4559... 1c34b40f3dfa8485...
*-riscv64-linux-gnu.tar.gz ade2633a590f811c... 69f3c772c2a32202...
*-win64-codesigning.tar.gz d414e1a06155de03... 04f4d03331059ef1...
*-win64-debug.zip 306ab33d40746cb3... 6edfbeeffed52dee...
*-win64-setup-unsigned.exe 787eb58220acf4b0... a3eaa2dcddb8b9c7...
*-win64-unsigned.zip 0e3f1df2c7d49e09... 5923604d4de31c18...
*-x86_64-apple-darwin-codesigning.tar.gz 1662e1eb46db4ce6... 60c67eae78429a3f...
*-x86_64-apple-darwin-unsigned.tar.gz e84a353b2fab7ba0... a81f18c7e6774aa8...
*-x86_64-apple-darwin-unsigned.zip 69b7c0a328e2294c... 06652fe5e6f58722...
*-x86_64-linux-gnu-debug.tar.gz b27f5b76cd7a74df... 21a35aede898a41b...
*-x86_64-linux-gnu.tar.gz 845cf140a743928a... f2c9d9be745a9dbd...
*.tar.gz 151010c2f2cf4bbd... da1b46715d991d45...
SHA256SUMS.part 7a5baeba2a6dbb51... f3e9acbaa8e10c41...
guix_build.log f50758d2ddfa1855... 6f56f67cad93042f...
guix_build.log.diff a0932477a7c0d49a...

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK b149a28. env --unset was replaced with unset && since last review. I still think it could be better to write CC=$(build_CC) here even if build_CC may not be defined at this point (#29963 (comment)) because it makes intent of the code more obvious, but current PR is already an improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants