depends: Unset SOURCE_DATE_EPOCH in gen_id script #34228

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:260108-depends-clang-epoch changing 1 files +5 −0
  1. hebasto commented at 8:35 am on January 8, 2026: member

    When performing Guix builds for {x86_64,arm64}-apple-darwin hosts across different commits, all packages in depends are rebuilt even if there are no changes in either the depends or contrib/guix subdirectories.

    This occurs because the SOURCE_DATE_EPOCH environment variable enables Clang’s -source-date-epoch option, which then appears in the output of clang -v -E -xc -o /dev/null - < /dev/null. For example:

     0$ SOURCE_DATE_EPOCH=1767855465 clang -v -E -xc++ -o /dev/null - < /dev/null
     1clang version 21.1.7 (Fedora 21.1.7-1.fc43)
     2Target: x86_64-redhat-linux-gnu
     3Thread model: posix
     4InstalledDir: /usr/bin
     5Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg
     6System configuration file directory: /etc/clang/
     7Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/14
     8Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/15
     9Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/15
    10Candidate multilib: .;@m64
    11Candidate multilib: 32;@m32
    12Selected multilib: .;@m64
    13 (in-process)
    14 "/usr/bin/clang-21" -cc1 -triple x86_64-redhat-linux-gnu -E -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model static -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/hebasto -v -fcoverage-compilation-dir=/home/hebasto -resource-dir /usr/bin/../lib/clang/21 -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15 -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/x86_64-redhat-linux -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/backward -internal-isystem /usr/bin/../lib/clang/21/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../x86_64-redhat-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -source-date-epoch 1767855465 -fdeprecated-macro -ferror-limit 19 -fmessage-length=180 -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /dev/null -x c++ -
    15clang -cc1 version 21.1.7 based upon LLVM 21.1.7 default target x86_64-redhat-linux-gnu
    16ignoring nonexistent directory "/usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../x86_64-redhat-linux/include"
    17ignoring nonexistent directory "/include"
    18#include "..." search starts here:
    19#include <...> search starts here:
    20 /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15
    21 /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/x86_64-redhat-linux
    22 /usr/bin/../lib/gcc/x86_64-redhat-linux/15/../../../../include/c++/15/backward
    23 /usr/bin/../lib/clang/21/include
    24 /usr/local/include
    25 /usr/include
    26End of search list.
    

    As a result, each package id differs between builds, which causes the script to treat the toolchain as changed and triggers unnecessary rebuilds.

    This PR resolves this issue by unsetting SOURCE_DATE_EPOCH in a subshell before collecting toolchain details.

  2. depends: Unset `SOURCE_DATE_EPOCH` in `gen_id` script 3b8f57c2f5
  3. hebasto added the label Build system on Jan 8, 2026
  4. DrahtBot commented at 8:35 am on January 8, 2026: 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/34228.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.


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-09 09:13 UTC

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