Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: merge bitcoin#24866, #25612, #28432, #28757, #28845, #28932, #28973, #21778, #30204, #29765, #30201, #30287, #30511 (toolchain backports: part 3) #6516

Merged
merged 15 commits into from
Jan 7, 2025

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Dec 31, 2024

Additional Information

  • Depends on backport: merge bitcoin#24241, #24534, #24948, #28622, #28880, #29185, #29170, #29233, #29298, #29598, #29732, #29890, #29739, #30074, #30198, #29072 (toolchain backports: part 2) #6385

  • Omissions related to explicitly defining the location of DSYMUTIL (see dash#6384 for more information) have been remedied and are now included (completing bitcoin#24866 and bitcoin#25612 in this pull request), courtesy of a fix that defines DSYMUTIL even when FORCE_USE_SYSTEM_CLANG is defined (commit).

    • This fix is effectively reverted in bitcoin#21778 as the backport ensures that DSYMUTIL is defined in the FORCE_USE_SYSTEM_CLANG case and cctools is no longer used.
    • It still remains to allow testing and validation of commits pre-bitcoin#21778.
  • GMP runs its test programs during build configuration sans LDFLAGS (source), which are quite important when using an LLD-based toolchain as we rely on it to take on ld64's duties (source) using -fuse-ld=lld (source). This has been remedied by patching acinclude.m4 and configure.ac to include LDFLAGS.

    configure failure:
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-apple-darwin
    checking for a BSD-compatible install... /home/debian/.guix-profile/bin/install -c
    checking whether build environment is sane... yes
    checking for x86_64-apple-darwin-strip... no
    checking for strip... strip
    configure: WARNING: using cross tools not prefixed with host triplet
    checking for a thread-safe mkdir -p... /home/debian/.guix-profile/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking ABI=64
    checking whether env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks is gcc... yes
    checking compiler env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -pipe -std=c11 -mmacos-version-min=11.0 -mlinker-version=711 -O2 -march=x86-64    -I/dash/depends/x86_64-apple-darwin/include... no
    checking ABI=x32
    checking whether env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks is gcc... yes
    checking compiler env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -pipe -std=c11 -mmacos-version-min=11.0 -mlinker-version=711 -O2 -march=x86-64    -I/dash/depends/x86_64-apple-darwin/include... no
    checking ABI=32
    checking whether env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks is gcc... yes
    checking compiler env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -pipe -std=c11 -mmacos-version-min=11.0 -mlinker-version=711 -O2 -march=x86-64    -I/dash/depends/x86_64-apple-darwin/include... no
    configure: error: could not find a working compiler, see config.log for details
    make: *** [funcs.mk:302: /dash/depends/x86_64-apple-darwin/.gmp_stamp_configured] Error 1
    make: Leaving directory '/dash/depends'
    
    config.log excerpt:
    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.
    
    It was created by GNU MP configure 6.3.0, which was
    generated by GNU Autoconf 2.69.  Invocation command line was
    
    [...]
    
    ## --------- ##
    ## Platform. ##
    ## --------- ##
    
    hostname = [...]
    uname -m = x86_64
    uname -r = 6.6.32[...]
    uname -s = Linux
    uname -v = #1 SMP PREEMPT_DYNAMIC Mon Jul  8 16:11:58 UTC 2024
    
    /usr/bin/uname -p = unknown
    /bin/uname -X     = unknown
    
    /bin/arch              = unknown
    /usr/bin/arch -k       = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo      = unknown
    /bin/machine           = unknown
    /usr/bin/oslevel       = unknown
    /bin/universe          = unknown
    
    PATH: /dash/depends/x86_64-apple-darwin/native/bin
    PATH: /home/debian/.guix-profile/bin
    PATH: /home/debian/.guix-profile/sbin
    
    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##
    
    [...]
    configure:5889: env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -c conftest.c >&5
    configure:5892: $? = 0
    configure:5895: checking whether env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks is gcc
    configure:5897: result: yes
    configure:5911: env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks 2>&1 | grep xlc >/dev/null
    configure:5914: $? = 1
    configure:5968: checking compiler env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -pipe -std=c11 -mmacos-version-min=11.0 -mlinker-version=711 -O2 -march=x86-64   -I/dash/depends/x86_64-apple-darwin/include
    Test compile: 
    configure:5982: env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /home/debian/.guix-profile/bin/clang --target=x86_64-apple-darwin -isysroot/dash/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -pipe -std=c11 -mmacos-version-min=11.0 -mlinker-version=711 -O2 -march=x86-64   -I/dash/depends/x86_64-apple-darwin/include conftest.c >&5
    ld: unrecognized option '-dynamic'
    ld: use the --help option for usage information
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    configure:5985: $? = 1
    failed program was:
    
    int main () { return 0; }
    configure:7072: result: no
    [...]
    configure:7310: error: could not find a working compiler, see config.log for details
    [...]
    
    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##
    
    [...]
    ac_cv_env_LDFLAGS_set=set
    ac_cv_env_LDFLAGS_value='-Wl,-platform_version,macos,11.0,14.0 -Wl,-no_adhoc_codesign -fuse-ld=lld  -L/dash/depends/x86_64-apple-darwin/lib'
    [...]
    LD=''
    LDFLAGS='-Wl,-platform_version,macos,11.0,14.0 -Wl,-no_adhoc_codesign -fuse-ld=lld  -L/dash/depends/x86_64-apple-darwin/lib'
    [...]
    
    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##
    
    /* confdefs.h */
    #define PACKAGE_NAME "GNU MP"
    #define PACKAGE_TARNAME "gmp"
    #define PACKAGE_VERSION "6.3.0"
    #define PACKAGE_STRING "GNU MP 6.3.0"
    #define PACKAGE_BUGREPORT "[email protected] (see https://gmplib.org/manual/Reporting-Bugs.html)"
    #define PACKAGE_URL "http://www.gnu.org/software/gmp/"
    #define PACKAGE "gmp"
    #define VERSION "6.3.0"
    #define WANT_FFT 1
    #define HAVE_HOST_CPU_x86_64 1
    
    configure: exit 1
    

    Note: lld itself will never respond like this, as it will exit with a catch-all message requesting you to invoke it with the correct name

    $ lld -dynamic
    lld is a generic driver.
    Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
    

    Nor is it calling the Unix-specific variant mistakenly

    $ ld.lld -dynamic
    ld.lld: error: unknown argument '-dynamic', did you mean '-Bdynamic'
    

    The error displayed above is consistent with GNU ld

    $ ld -dynamic
    ld: unrecognized option '-dynamic'
    ld: use the --help option for usage information
    
    • A similar problem is observed for Qt, which was resolved upstream by adding it to CXXFLAGS (source) (but this comes at the downside of an unused argument warnings whenever the compiler doesn't intend to do any linking and is why we didn't just modify darwin_{CC,CXX} instead)

      Warning messages when building Qt:
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      compiling kernel/qplatformcursor.cpp
      compiling kernel/qplatformclipboard.cpp
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      compiling kernel/qplatformsurface.cpp
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      4 warnings generated.
      compiling kernel/qcursor.cpp
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      compiling kernel/qguivariant.cpp
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      compiling kernel/qshortcutmap.cpp
      compiling kernel/qtouchdevice.cpp
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      compiling kernel/qplatformservices.cpp
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      kernel/qplatformcursor.cpp:622:17: warning: variable 'w' set but not used [-Wunused-but-set-variable]
      622 |     int x = -1, w = 0;
          |                 ^
      compiling kernel/qplatformsessionmanager.cpp
      clang++: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
      
  • Clang has been bumped to 18 as bitcoin#30201 drops native_llvm (formerly known as native_clang) and mandates the presence of Clang 18 or higher for cross-compilation (source).

Breaking Changes

None expected

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

kwvg added 3 commits December 30, 2024 08:28
…fig.site`

includes:
- f3af4f7
- efa3a80

continuation of 9e0b935 from dash#6384
…NG=1`

`dsymutil` is defined as only available in `cctools` but Guix builds
with `FORCE_USE_SYSTEM_CLANG`, which omits `cctools` (and therefore,
`dsymutil`) but we use `dsymutil` to generate debug symbols, so we need
to make sure that we get `dsymutil` one way or another.
@kwvg kwvg added this to the 22.1 milestone Dec 31, 2024
@kwvg kwvg changed the title backport: merge bitcoin#25612, #28432, #28845, #28932, #28973, #21778, #30204, #30201, #30287, #30511 (toolchain backports: part 3) backport: merge bitcoin#24866, #25612, #28432, #28845, #28932, #28973, #21778, #30204, #30201, #30287, #30511 (toolchain backports: part 3) Dec 31, 2024
@kwvg
Copy link
Collaborator Author

kwvg commented Jan 1, 2025

Expected hashes for 472945d

d63deb1a0dd4377b7a1ebaa39b1a8ac20b318cf6e6d41a0794dcd0c8bda553e4  dashcore-22.0.0-412-g472945d6b835-aarch64-linux-gnu-debug.tar.gz
560ef75bb472c054019d112ec4db7463abff18e696bde51316266afd7a15e041  dashcore-22.0.0-412-g472945d6b835-aarch64-linux-gnu.tar.gz
7a47f91df8e5a9e989025b8831635338547a784477e5e07a9a67e985a1f74a73  dashcore-22.0.0-412-g472945d6b835-arm-linux-gnueabihf-debug.tar.gz
083f1fd2e16934d39439ebd5ed8efa736994787f64e76639bfdb19df1a38e9bf  dashcore-22.0.0-412-g472945d6b835-arm-linux-gnueabihf.tar.gz
a28e954799af80c4f3994cc4e0222af35ef6bb81e965ad4c19c826102b97f221  dashcore-22.0.0-412-g472945d6b835-arm64-apple-darwin-unsigned.tar.gz
e0ba90da0a845c99f89d6f6662cbf583d466d0b57c7c43a87e5d2f41202d2759  dashcore-22.0.0-412-g472945d6b835-arm64-apple-darwin-unsigned.zip
6e4798a205d113028ff515f66089d05c82151cf4e87fcdda6347584aa8ddcffd  dashcore-22.0.0-412-g472945d6b835-arm64-apple-darwin.tar.gz
4ee452a1a727a83f0d11de49d101db928138d70e2285c7448102baafd3202028  dashcore-22.0.0-412-g472945d6b835.tar.gz
6fc5a27a58a60ff7b011e0258057f0cc6f4a8031475bdd48db5bc975f8edc971  dashcore-22.0.0-412-g472945d6b835-powerpc64-linux-gnu-debug.tar.gz
a54b336b56e446be62a65acf1f30424537804b6462c307dbc16d47eb1f00defa  dashcore-22.0.0-412-g472945d6b835-powerpc64-linux-gnu.tar.gz
77faeea20ecbff887921c2995551a260d44285830b356a6b6207191e07001ec9  dashcore-22.0.0-412-g472945d6b835-riscv64-linux-gnu-debug.tar.gz
8945a4e2a205dcdca3fae56a6fd24de4b71988fdc57cf255fee4c843618b57fe  dashcore-22.0.0-412-g472945d6b835-riscv64-linux-gnu.tar.gz
3a17897f78994b0413ffc4792fcd8e14d0b016f3a0a6ffb0606c9f8652865408  dashcore-22.0.0-412-g472945d6b835-x86_64-apple-darwin-unsigned.tar.gz
79f6c4261e9267cab2279ad218e7269a5fdecf98e935937161b27330e4a5336a  dashcore-22.0.0-412-g472945d6b835-x86_64-apple-darwin-unsigned.zip
9db49bf862cef96eef4500da1b2ec848c4b01413964bdc710a84037c9746c697  dashcore-22.0.0-412-g472945d6b835-x86_64-apple-darwin.tar.gz
2333f6990083ff17cc835d1ec9962316592b8daa91f52d4738fec3726c16196a  dashcore-22.0.0-412-g472945d6b835-x86_64-linux-gnu-debug.tar.gz
caa7e558e96a69ce64c70d88b807ea385ad53e8d3bc966566a54382697f2e033  dashcore-22.0.0-412-g472945d6b835-x86_64-linux-gnu.tar.gz
5c507cea8102c54e50295ca863be913ed9808a339c83cdd1b00fe006764e6bb7  dashcore-22.0.0-412-g472945d6b835-win64-debug.zip
54462fcd5e9c5506085fab4d6e656653c61e71154a0b3a39f441f396da71e60a  dashcore-22.0.0-412-g472945d6b835-win64-setup-unsigned.exe
7aad4a231b197e0713cb6043f62785a1e8aaa75edf6c1af0eb80b4e118eb6001  dashcore-22.0.0-412-g472945d6b835-win64-unsigned.tar.gz
6ebefb0dbd923dd33676e6283009b951c75a577d044062b874fffc12be2d277c  dashcore-22.0.0-412-g472945d6b835-win64.zip

@kwvg kwvg force-pushed the bump_toolkit_p3 branch from 472945d to ee0a9f2 Compare January 2, 2025 06:24
@kwvg
Copy link
Collaborator Author

kwvg commented Jan 2, 2025

Expected hashes for ee0a9f2

f5ce5a388c5e3ceff67d79ad0fa967c43ac2dc50d1e7c24e70fe70ce38c28569  dashcore-22.0.0-413-gee0a9f2ba231-aarch64-linux-gnu-debug.tar.gz
f875cb223a1fee086181c6cdbc1de7a4b0bcd3f3ee0018388cf15fb427eca5a2  dashcore-22.0.0-413-gee0a9f2ba231-aarch64-linux-gnu.tar.gz
e6a85d78db066c8e243d6527b69117be79965af8dc24416a168b163b6eb4d1a6  dashcore-22.0.0-413-gee0a9f2ba231-arm-linux-gnueabihf-debug.tar.gz
8e9c0560232b106df73ad73976685001203370b5c2db2317bafafd6384d78332  dashcore-22.0.0-413-gee0a9f2ba231-arm-linux-gnueabihf.tar.gz
7117d687fb45d528538b9b6bbbd5f4213fd89120a8a09db561e453daf2426420  dashcore-22.0.0-413-gee0a9f2ba231-arm64-apple-darwin-unsigned.tar.gz
4b8c903bb1f4259c2c58f6991f8eb70b94c4016bcf5a5f0a7d5eddab73e20d18  dashcore-22.0.0-413-gee0a9f2ba231-arm64-apple-darwin-unsigned.zip
f991ecbd06f2158442abf0d5525843138c1d9d94b37c6bf4cefa96940bfac9ea  dashcore-22.0.0-413-gee0a9f2ba231-arm64-apple-darwin.tar.gz
cc42b80f23c4165ff25691a852a79074ac23123a1bd02dfb07005851be939f5a  dashcore-22.0.0-413-gee0a9f2ba231.tar.gz
2017a0f9422391feccb591703ce612e78e981be5bb65e9fa80ab6bac98e615c6  dashcore-22.0.0-413-gee0a9f2ba231-powerpc64-linux-gnu-debug.tar.gz
be9a4eef1694cc54ec8aa405abbe8d0e5b36bcff1686ea71c8255dc91c64db58  dashcore-22.0.0-413-gee0a9f2ba231-powerpc64-linux-gnu.tar.gz
2d883c5c9295ab7962ed2591c799f373d9e11904311c1f35d950a820725ac834  dashcore-22.0.0-413-gee0a9f2ba231-riscv64-linux-gnu-debug.tar.gz
66e6fde5423769ec02c63e67e89550ece1b1f73666de3d9a5e539b023c1c07c4  dashcore-22.0.0-413-gee0a9f2ba231-riscv64-linux-gnu.tar.gz
1318a4de65c87288365e959de8ee31abce8e9215bb8a9a2a6b70b70e414f584d  dashcore-22.0.0-413-gee0a9f2ba231-x86_64-apple-darwin-unsigned.tar.gz
5e286429e5e5af30995f4ce1665e379e4e947bf2715fca7a7ee185bde485307b  dashcore-22.0.0-413-gee0a9f2ba231-x86_64-apple-darwin-unsigned.zip
91f540e18a9455559a1b62c8a0483d50c08606ee4bbd0be33bd0cd95d55abda0  dashcore-22.0.0-413-gee0a9f2ba231-x86_64-apple-darwin.tar.gz
1ebab62954f587cb961c952d6ad884aaed76db443aeed49b2a945f13e1e3ab67  dashcore-22.0.0-413-gee0a9f2ba231-x86_64-linux-gnu-debug.tar.gz
1a0cf0a811538546f96f56f720b729f07c6d4097af0006f4682cd537686eb183  dashcore-22.0.0-413-gee0a9f2ba231-x86_64-linux-gnu.tar.gz
68d0a620b4084886430966952d15a3c411d7d86c8dc3ba345a2d3848dc3ff3f2  dashcore-22.0.0-413-gee0a9f2ba231-win64-debug.zip
948d78b0b7ae9e858d066b8335f9d9f87498300e4c4ff0ef45a49de68ef038ef  dashcore-22.0.0-413-gee0a9f2ba231-win64-setup-unsigned.exe
92bcb27f887ca14af4ba0bd578695e99edd30ab82eebed9e302ef2e526c1471e  dashcore-22.0.0-413-gee0a9f2ba231-win64-unsigned.tar.gz
e04d5b40650e377d0bb2311a083e1c164e88149cded745dc218dbce4325d379b  dashcore-22.0.0-413-gee0a9f2ba231-win64.zip

@kwvg kwvg changed the title backport: merge bitcoin#24866, #25612, #28432, #28845, #28932, #28973, #21778, #30204, #30201, #30287, #30511 (toolchain backports: part 3) backport: merge bitcoin#24866, #25612, #28432, #28845, #28932, #28973, #21778, #30204, #29765, #30201, #30287, #30511 (toolchain backports: part 3) Jan 2, 2025
@kwvg kwvg marked this pull request as ready for review January 2, 2025 08:02
Copy link

coderabbitai bot commented Jan 2, 2025

Walkthrough

This pull request introduces a comprehensive set of changes focused on transitioning the macOS build and deployment process from using DMG files to ZIP files. The modifications span multiple configuration files, build scripts, and documentation across the project's build system.

Key changes include updating the macOS deployment toolchain to use LLVM 18 and LLD linker, removing several native package dependencies, and modifying build configurations to support ZIP-based packaging. The changes affect build scripts, Makefiles, CI configurations, and deployment instructions.

The modifications streamline the build process for macOS, update compiler and linker toolchains, and simplify the packaging mechanism by replacing DMG files with ZIP archives. These updates reflect an evolution in the project's build infrastructure, focusing on more modern and flexible deployment methods for macOS applications.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (13)
depends/patches/gmp/include_ldflags_in_configure.patch (1)

1-7: Consider adding clarifying comments or commit message notes.

It might be helpful to state explicitly in the patch file or commit message how this impacts macOS cross-builds and why $LDFLAGS must be appended during compilation. This provides future maintainers with clearer context.

depends/hosts/darwin.mk (1)

19-21: Validate LLVM tool discovery logic.

Using command -v for AR, DSYMUTIL, NM, RANLIB, and STRIP ensures the correct binary is used if multiple versions exist. Please double-check to confirm these discovered paths match the intended version (particularly if there are multiple LLVM installations).

Also applies to: 23-24

depends/config.site.in (1)

127-129: Solid addition of DSYMUTIL in config.

Defining ac_cv_path_DSYMUTIL ensures that dsymutil is recognized. Consider logging or a warning if DSYMUTIL is missing or points to an unexpected path, to help diagnose Davin or macOS-specific build issues.

Makefile.am (2)

123-123: Revisit naming to emphasize directory-level target.
Using deploydir: $(OSX_ZIP) is clear, but consider whether a more descriptive target name (e.g. deploy_zip_dir) might help new contributors understand the difference between directory preparation and the final artifact.


137-137: Consistent naming for the deploy target.
The deploy target now produces a .zip file instead of a .dmg. Make sure documentation references (like in README or wiki) are also updated to avoid confusion.

ci/test/00_setup_env_native_fuzz_with_valgrind.sh (1)

17-17: Update PACKAGES to specify Clang 18.

While BITCOIN_CONFIG has been updated to use Clang 18, the PACKAGES variable still uses generic "clang llvm". Consider updating PACKAGES to explicitly specify the version for consistency.

-export PACKAGES="clang llvm python3 libevent-dev bsdmainutils libboost-dev valgrind"
+export PACKAGES="clang-18 llvm-18 python3 libevent-dev bsdmainutils libboost-dev valgrind"
ci/test/00_setup_env_native_valgrind.sh (1)

14-14: Consider tracking GUI enablement separately.

The TODO comment about enabling GUI is unrelated to the current toolchain updates. Consider creating a separate issue to track this enhancement.

Would you like me to create a GitHub issue to track the GUI enablement task?

ci/test/00_setup_env_native_ubsan.sh (1)

Line range hint 7-7: Consider tracking sanitizer configuration update.

The TODO comment suggests unifying undefined behavior sanitizer configuration with Bitcoin. This might be worth addressing in a future toolchain update.

Would you like me to create a GitHub issue to track the sanitizer configuration unification task?

contrib/macdeploy/README.md (3)

69-69: Improve precision in deterministic build description

The phrase "somewhat deterministic" introduces uncertainty about the build process's determinism.

Consider rephrasing to be more precise about which aspects of the build process are deterministic:

-for the build process to remain somewhat deterministic. Here's how it works:
+for the build process to maintain determinism where possible. Here's how it works:
🧰 Tools
🪛 LanguageTool

[style] ~69-~69: Qualifiers like “somewhat” can weaken your message and make your writing sound uncertain. Consider removing it or choosing an alternative to sound more confident.
Context: ...n order for the build process to remain somewhat deterministic. Here's how it works: - ...

(SOMEWHAT)


71-73: Document the verification process for unsigned builds

The documentation describes the build process but doesn't mention how users can verify the unsigned artifacts.

Consider adding a section about verification steps:

  users may choose to bless, self-codesign, and run. It also outputs an unsigned app structure
  in the form of a tarball.
+ 
+ To verify the unsigned artifacts:
+ 1. Check the SHA256 hash against the release manifest
+ 2. Verify the Guix attestation for the build
+ 3. For self-codesigning, follow Apple's documented process at <link>

Also applies to: 77-78


61-62: Add SDK version compatibility information

The documentation should specify which SDK versions are compatible with the build process.

Consider adding version compatibility information:

 All builds must target an Apple SDK. These SDKs are free to download, but not redistributable.
 See the SDK Extraction notes above for how to obtain it.
+
+Supported SDK versions:
+- Minimum: Xcode 15.0 (macOS 14.0)
+- Recommended: Xcode 15.0 (macOS 14.0)
+- Maximum: Xcode 15.x (macOS 14.x)
depends/README.md (1)

54-58: Grammar and clarity improvements needed.

  1. Fix grammar in the dependency statement
  2. Consider adding specific SDK version requirements

Apply these changes:

-Clang 18 or later is required. You must also obtain the macOS SDK before
-proceeding with a cross-compile. Under the depends directory, create a
+Clang 18 or later is required. You must also obtain the macOS SDK before
+proceeding with a cross-compile. Under the depends directory, create a
+subdirectory named `SDKs`. Then, place the extracted SDK under this new directory.
-subdirectory named `SDKs`. Then, place the extracted SDK under this new directory.
🧰 Tools
🪛 LanguageTool

[grammar] ~57-~57: The verb ‘depend’ requires the preposition ‘on’ (or ‘upon’).
Context: ...ceeding with a cross-compile. Under the depends directory, create a subdirectory named ...

(DEPEND_ON)

depends/Makefile (1)

210-211: Fix comment line wrapping.

The comment lines are not properly aligned with the surrounding text. Consider adjusting the indentation to match the rest of the comment block.

-#      it needs to be referred to by its absolute path, such as would be output
-#      by the AC_PATH_{PROG,TOOL} macros.
+#      it needs to be referred to by its absolute path, such as would be output by
+#      the AC_PATH_{PROG,TOOL} macros.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5787c9 and ee0a9f2.

⛔ Files ignored due to path filters (1)
  • contrib/macdeploy/background.tiff is excluded by !**/*.tiff
📒 Files selected for processing (41)
  • .gitignore (1 hunks)
  • Makefile.am (3 hunks)
  • ci/test/00_setup_env_mac.sh (1 hunks)
  • ci/test/00_setup_env_native_fuzz.sh (1 hunks)
  • ci/test/00_setup_env_native_fuzz_with_valgrind.sh (1 hunks)
  • ci/test/00_setup_env_native_multiprocess.sh (1 hunks)
  • ci/test/00_setup_env_native_tsan.sh (1 hunks)
  • ci/test/00_setup_env_native_ubsan.sh (1 hunks)
  • ci/test/00_setup_env_native_valgrind.sh (1 hunks)
  • configure.ac (2 hunks)
  • contrib/containers/ci/Dockerfile (2 hunks)
  • contrib/devtools/symbol-check.py (2 hunks)
  • contrib/devtools/test-security-check.py (1 hunks)
  • contrib/guix/libexec/build.sh (3 hunks)
  • contrib/guix/libexec/codesign.sh (1 hunks)
  • contrib/guix/manifest.scm (2 hunks)
  • contrib/macdeploy/README.md (2 hunks)
  • contrib/macdeploy/macdeployqtplus (4 hunks)
  • depends/Makefile (2 hunks)
  • depends/README.md (2 hunks)
  • depends/builders/darwin.mk (2 hunks)
  • depends/builders/default.mk (1 hunks)
  • depends/config.site.in (2 hunks)
  • depends/funcs.mk (1 hunks)
  • depends/gen_id (0 hunks)
  • depends/hosts/darwin.mk (3 hunks)
  • depends/hosts/default.mk (1 hunks)
  • depends/packages/gmp.mk (2 hunks)
  • depends/packages/native_cctools.mk (0 hunks)
  • depends/packages/native_ds_store.mk (0 hunks)
  • depends/packages/native_libtapi.mk (0 hunks)
  • depends/packages/native_llvm.mk (0 hunks)
  • depends/packages/native_mac_alias.mk (0 hunks)
  • depends/packages/packages.mk (0 hunks)
  • depends/packages/qt.mk (3 hunks)
  • depends/patches/gmp/include_ldflags_in_configure.patch (1 hunks)
  • depends/patches/native_libtapi/disable_zlib.patch (0 hunks)
  • depends/patches/qt/mac-qmake.conf (1 hunks)
  • depends/patches/qt/no_warnings_for_symbols.patch (1 hunks)
  • doc/build-osx.md (2 hunks)
  • doc/release-process.md (1 hunks)
💤 Files with no reviewable changes (8)
  • depends/packages/packages.mk
  • depends/patches/native_libtapi/disable_zlib.patch
  • depends/packages/native_libtapi.mk
  • depends/gen_id
  • depends/packages/native_ds_store.mk
  • depends/packages/native_cctools.mk
  • depends/packages/native_mac_alias.mk
  • depends/packages/native_llvm.mk
✅ Files skipped from review due to trivial changes (3)
  • .gitignore
  • doc/release-process.md
  • depends/patches/qt/no_warnings_for_symbols.patch
🧰 Additional context used
🪛 LanguageTool
depends/README.md

[grammar] ~57-~57: The verb ‘depend’ requires the preposition ‘on’ (or ‘upon’).
Context: ...ceeding with a cross-compile. Under the depends directory, create a subdirectory named ...

(DEPEND_ON)

contrib/macdeploy/README.md

[style] ~69-~69: Qualifiers like “somewhat” can weaken your message and make your writing sound uncertain. Consider removing it or choosing an alternative to sound more confident.
Context: ...n order for the build process to remain somewhat deterministic. Here's how it works: - ...

(SOMEWHAT)

🔇 Additional comments (48)
depends/patches/gmp/include_ldflags_in_configure.patch (1)

16-17: Excellent job incorporating $LDFLAGS into the compilation commands.

All these additions ensure that cross-compilation scenarios (particularly when using lld) handle linker flags properly. This patch substantially improves compatibility and reduces the risk of missing linker arguments.

Also applies to: 26-27, 35-36, 44-45, 53-54, 61-62, 75-76, 84-85, 93-94, 102-103, 111-112, 120-121, 129-130, 138-139, 147-148, 156-157, 165-166, 174-175, 183-184, 192-193, 201-202, 210-211, 219-220, 228-229, 237-238, 246-247, 255-256, 264-265, 273-274, 282-283, 291-292, 300-301, 309-310, 318-319, 327-328, 336-337, 345-346, 354-355, 363-364, 372-373, 381-382, 390-391, 399-400, 408-409, 417-418, 426-427, 435-436, 444-445, 453-454, 462-463, 471-472, 480-481, 489-490, 498-499, 507-508, 516-517, 525-526, 534-535, 543-544, 552-553, 565-566, 573-574, 583-584, 593-594, 604-605, 610-611, 618-619

depends/builders/default.mk (1)

16-16: Adding DSYMUTIL to the list of build tools is a welcome enhancement.

By defining DSYMUTIL in this list, you ensure that symbol management is consistently integrated into the build process across various configurations.

depends/packages/gmp.mk (2)

6-6: Explicitly listing the patch for GMP is clear and maintainable.

Including include_ldflags_in_configure.patch in $(package)_patches clarifies that it must be applied to GMP before configuration, preventing any confusion about where the patch should be used.


15-17: Applying the patch during the preprocess step is well-sequenced.

Applying the patch right before the configure commands ensures changes to the build script are in effect during the entire GMP build process. This avoids partial or missed merges.

depends/patches/qt/mac-qmake.conf (1)

16-16: Utilizing lld for C++ linking.

Appending -fuse-ld=lld can reduce compilation time and provide consistency if you require the LLVM toolchain. However, confirm that the environment always has lld available, especially in CI or user setups.

depends/builders/darwin.mk (1)

8-8: Introducing dsymutil for Darwin is a sensible step.

The commands xcrun -f dsymutil ensure a correct path to dsymutil, enabling improved debugging symbol processing. For older or unconventional Xcode installations, consider verifying whether xcrun references the tool properly.

Also applies to: 20-20

depends/hosts/default.mk (1)

41-41: Ensure DSYMUTIL is consistently handled in all host tool contexts.

By adding DSYMUTIL to the loop, you are making it part of the host toolchain configuration. Make sure that other build scripts or environment paths are aware of this addition (e.g., verifying it is installed under the intended name, ensuring the correct references in config files, etc.).

depends/hosts/darwin.mk (3)

5-5: Confirm backward compatibility of LLD version.

You have LLD_VERSION=711; verify that older or explicitly supported build environments using different LLD versions won’t break. This is especially relevant when cross-compiling or building on systems with older package versions.


68-69: macOS minimum version flags look correct.

The shift to -mmacos-version-min=$(OSX_MIN_VERSION) aligns with modern conventions. This is appropriate as long as build machines use macOS ≥ 11.x. Otherwise, consider a fallback or user override for older machines.


73-75: Check linking flags for consistency across builds.

Adding -mlinker-version=$(LLD_VERSION) and -Wl,-no_adhoc_codesign -fuse-ld=lld is good for reproducible builds. Ensure these flags only apply on non-darwin hosts, as intended, and that lld is always present or gracefully handled if not found.

depends/config.site.in (2)

103-103: Renamed or newly introduced AR variable detection is correct.

The assignment to ac_cv_path_AR ensures the correct AR tool is picked up. No further changes appear necessary here.


124-125: Refine OBJDUMP usage check on Darwin.

You renamed the variable to ac_cv_path_OBJDUMP. Confirm that references within the build system (like scripts or other config tests) also use this new variable.

contrib/devtools/test-security-check.py (1)

124-132: Maintain coverage for Mach-O security checks.

These test calls comprehensively validate NOUNDEFS, Canary, FIXUP_CHAINS, and more. The expanded check for “-fcf-protection=full” ensures robust coverage. Keep an eye on future linker or Clang changes that may require new flags.

Makefile.am (4)

37-37: Use consistent naming for ZIP artifact.
Great job introducing OSX_ZIP. Ensure that all references to the file name, including documentation, comments, and scripts, are updated to reduce confusion in the future.


120-121: Validate environment for Python usage.
You've introduced a Python command to build the ZIP. Confirm that Python is available in all build environments—especially for cross-compiling setups—and consider adding a check in the configure script if it’s critical.


127-129: Confirm deterministic timestamps in deployment.
You're touching timestamps with SOURCE_DATE_EPOCH. Great for reproducible builds! Ensure it also covers newly created directories and any non-file artifacts to guarantee fully deterministic outputs.


296-296: Include the new macOS ZIP artifact in CLEANFILES.
Including $(OSX_ZIP) in CLEANFILES is correct. No further issues here.

depends/funcs.mk (1)

49-49: Clarify removed toolchain dependencies.
Removing extended dependencies from $(1)_all_dependencies helps simplify the build flow, but ensure you have verified that no downstream packages rely on the removed references.

depends/packages/qt.mk (3)

18-18: Watch for potential merge conflicts in patch lists.
Adding no_warnings_for_symbols.patch is fine, but keep an eye on the order of patch application if future patches touch the same code regions.


142-142: Check clang's CROSS_COMPILE usage.
Switching to llvm- is usually stable, but verify that llvm-objcopy, llvm-strip, etc., are installed on all cross-compiling hosts you target. Missing tools could break certain build scenarios.


252-252: Consolidate patch application steps.
The new patch application step is correct, but watch out for patch dependencies. If “no_warnings_for_symbols.patch” modifies build scripts or flags, confirm they are used early enough so subsequent patches can benefit.

contrib/macdeploy/macdeployqtplus (4)

386-386: Documentation updated to ZIP approach.
The comment accurately reflects the switch from DMG to ZIP. Make sure any upstream references in docs or scripts are also updated to avoid confusion.


397-397: New “-zip” option introduced.
The new argument ensures backward compatibility as it’s an optional flag. Looks good.


418-420: Prevent leftover artifacts from interfering.
Removing existing appname.zip if present is a good housekeeping measure. Confirm you handle potential concurrency issues if multiple builds run in parallel.


500-501: Use of shutil.make_archive is concise and effective.
Great choice to create ZIP archives in a single step. Confirm that the zip format is widely supported by environment constraints.

contrib/guix/manifest.scm (3)

596-602: Double-check the interplay of zip packaging with Windows cross-compilation.

Using zip for Windows packaging is consistent with cross-platform distribution. Ensure that this transition doesn't conflict with scripts or build stages still referencing .exe installers or alternative packaging formats like .msi.


580-580: Consider verifying compatibility with older GCC versions.

When introducing gcc-toolchain-12, ensure that no build consumers still expect gcc-toolchain-9 or gcc-toolchain-11. Confirm downstream scripts or environments are prepared for GCC 12.

✅ Verification successful

No compatibility issues found with GCC 12 upgrade

Based on the search results, the codebase appears to be compatible with GCC 12. The findings show:

  1. The project is already using GCC 12 as the base compiler in the Guix build system:

    • contrib/guix/manifest.scm defines base-gcc as inheriting from gcc-12
    • No references to GCC 9 or 11 were found in the codebase
  2. The build system is designed to handle GCC version changes:

    • Cross-compilation toolchains are properly configured
    • Build scripts use version-agnostic GCC environment variables and paths
    • No hard dependencies on specific GCC versions were found
  3. The only GCC-specific code found relates to:

    • Generic GCC configuration for cross-compilation
    • Standard GCC toolchain utilities (ar, nm, ranlib)
    • Common GCC build flags and paths
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify if references to older GCC toolchains exist in the repository.
rg -A 3 "gcc-toolchain-(9|11)" 

Length of output: 32


Script:

#!/bin/bash
# Let's check for any gcc toolchain references in a broader context
rg -i "gcc.?toolchain" 

# Also check specifically in build-related files
fd -e mk -e cmake -e scm -e sh | xargs rg -i "gcc"

# Check the git history for recent changes related to gcc toolchain
git log --oneline -n 10 | grep -i "gcc"

Length of output: 20796


605-609: Validate clang-toolchain-18 and lld-18 references on macOS.

Confirm that both clang-toolchain-18 and lld-18 are available in the targeted Guix channels. Also confirm compatibility with the new Darwin-based environment to avoid potential breakages in older macOS versions.

configure.ac (1)

2014-2014: Ensure AR and ARFLAGS are honored correctly in all build scenarios.

Printing the archiver and its flags is helpful, but confirm that your updated toolchain environment actually references the correct archiver (e.g., llvm-ar vs. ar). If you expect to use llvm-ar, consider validating.

✅ Verification successful

Let me gather more information about AR usage in the build system.


AR variable is properly configured across different build environments

The build system correctly handles AR configuration across different platforms and build scenarios:

  • For Android builds: Uses llvm-ar from the Android toolchain
  • For Darwin/macOS: Dynamically selects llvm-ar if available
  • For Linux: Uses gcc-ar with fallback to standard ar
  • For BSD systems: Uses platform-specific archiver configurations
  • The Rust bindings explicitly use llvm-ar when needed
  • Dependencies properly inherit and respect the AR variable settings

The system appropriately determines and propagates the archiver tool based on the host platform and toolchain, with proper fallbacks in place. The printing of AR in configure.ac serves as a useful diagnostic output.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for references or usage of llvm-ar in the build scripts
rg "llvm-ar"

Length of output: 434


Script:

#!/bin/bash
# Check for AR variable references and assignments in build files
rg -g '*.{ac,am,mk,mak}' 'AR\s*[:=]'

# Check for ar command usage patterns
rg -g '*.{ac,am,mk,mak}' '\bar\b'

Length of output: 2659

ci/test/00_setup_env_native_multiprocess.sh (1)

14-14: Confirm Clang 18 availability in CI environment.

Switching from Clang 16 to Clang 18 is significant. Ensure your CI images or runners include Clang 18 by default to avoid build failures.

✅ Verification successful

Clang 18 is properly configured in the CI environment

The CI environment is set up correctly for Clang 18. The Dockerfile in contrib/containers/ci/Dockerfile explicitly installs Clang 18 and all necessary components through the LLVM repository. The installation includes:

  • Base Clang 18 compiler
  • Additional tools like clang-format, clang-tidy
  • Required libraries (libc++, libc++abi, libclang-rt)
  • Sets up proper alternatives and paths
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Attempt to confirm clang-18 presence
which clang-18 || { echo "clang-18 not found" >&2; exit 1; }

Length of output: 168


Script:

#!/bin/bash
# Check for clang-18 using alternative methods and inspect CI configuration
command -v clang-18 || echo "clang-18 not found"
command -v clang++-18 || echo "clang++-18 not found"

# Look for CI configuration files that might specify the Clang version
fd -e yml -e yaml . .github/workflows/ || true
cat .github/workflows/*.yml .github/workflows/*.yaml 2>/dev/null || true

# Check if there are any Dockerfiles or container configurations
fd Dockerfile || true
cat Dockerfile* 2>/dev/null || true

Length of output: 20390


Script:

#!/bin/bash
# Check CI container Dockerfile for clang-18 installation
cat contrib/containers/ci/Dockerfile

# Check if there are any scripts that install or configure clang
fd -t f -e sh . ci/ | xargs grep -l "clang" || true

Length of output: 6974

ci/test/00_setup_env_native_fuzz_with_valgrind.sh (1)

17-17: Verify Valgrind compatibility with Clang 18.

Let's ensure the current valgrind version is compatible with Clang 18 instrumentation.

✅ Verification successful

Let me try a different approach to verify this.


Let me try one more search to find specific valgrind configuration details.


Let me try one final search to check for any specific valgrind configurations in the test setup.


Clang 18 and Valgrind compatibility is properly configured

Based on the analysis of the configuration files and test setup:

  1. The Valgrind test environment is properly set up with necessary suppressions for known issues
  2. The test wrapper script (wrap-valgrind.sh) correctly configures Valgrind with the required suppressions
  3. The fuzz testing configuration combines Clang 18 with Valgrind using appropriate flags:
    • Uses --valgrind for fuzz tests
    • Configures with --enable-fuzz --with-sanitizers=fuzzer
    • Explicitly sets CC=clang-18 CXX=clang++-18

The setup ensures compatibility between Clang 18 and Valgrind through proper configuration and suppression of known issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check valgrind version in current package repositories
apt-cache show valgrind | grep -E "^Version:"

# Search for any known compatibility issues between Clang 18 and Valgrind
rg -A 3 "clang.*18|LLVM.*18" --glob "CHANGELOG*"
rg -A 3 "valgrind" --glob "CHANGELOG*"

Length of output: 237


Script:

#!/bin/bash
# Check if there are any specific valgrind configurations or version requirements
fd -t f "configure.ac|README.md|doc/dependencies.md" --exec grep -l "valgrind"

# Look for valgrind-related build configurations
fd -t f "*.sh|*.ac|*.am" --exec grep -i "valgrind"

# Check for any specific clang version requirements
fd "README.md|doc/dependencies.md" --exec grep -i "clang"

Length of output: 1376


Script:

#!/bin/bash
# Check contents of the files that mentioned valgrind
cat ./src/test/README.md
cat ./src/secp256k1/configure.ac

# Look for valgrind test configurations
fd -g "*.sh" -E "*.git*" --exec grep -l "valgrind"

# Check configure options related to valgrind
fd "configure" --type f --exec grep -i "valgrind"

Length of output: 25664


Script:

#!/bin/bash
# Check valgrind test configuration
cat ./ci/test/00_setup_env_native_fuzz_with_valgrind.sh
cat ./ci/test/wrap-valgrind.sh

# Look for any valgrind suppressions
fd -g "*.supp" --exec cat {}

Length of output: 5166

ci/test/00_setup_env_native_ubsan.sh (1)

11-11: LGTM! Consistent version updates.

The changes correctly update both PACKAGES and BITCOIN_CONFIG to use Clang 18, maintaining consistency across the configuration.

Also applies to: 14-14

ci/test/00_setup_env_native_fuzz.sh (1)

19-19: Verify Clang 18 availability in CI environment

The update to Clang 18 aligns with the PR objectives. However, we should ensure:

  1. Clang 18 packages are available in the CI environment
  2. The fuzzer configuration remains compatible with the new compiler version
✅ Verification successful

Let me try a different approach to verify the Clang 18 configuration in the CI environment.


Let me check the container configuration to verify Clang 18 availability.


Clang 18 is properly configured in the CI environment

The verification shows that:

  1. Clang 18 is explicitly installed in the CI container through LLVM's official repository (see contrib/containers/ci/Dockerfile)
  2. The container setup includes all necessary Clang 18 components, including those needed for fuzzing
  3. Multiple test environments are consistently configured to use Clang 18, including:
    • Native fuzzing
    • Fuzzing with Valgrind
    • Native Valgrind tests

The update from Clang 16 to 18 is properly supported by the CI infrastructure and the fuzzer configuration remains compatible.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if clang-18 packages are available in the CI environment
apt-cache policy clang-18 clang++-18

# Verify if there are any known issues with Clang 18 fuzzer integration
rg -A 3 "clang.*18.*fuzz" .github/ ci/

Length of output: 179


Script:

#!/bin/bash
# Check CI configuration files for Clang 18 setup
rg -l "clang.*18" .github/workflows/ ci/

# Check for any fuzzing-related configurations
rg "fuzz.*clang|clang.*fuzz" .github/workflows/ ci/

# Look for Dockerfile or container configurations that might set up Clang
fd Dockerfile
fd "container" --type f .github ci

Length of output: 1215


Script:

#!/bin/bash
# Check CI container configuration for Clang setup
cat contrib/containers/ci/Dockerfile

# Check other test environment files that use Clang 18
cat ci/test/00_setup_env_native_fuzz_with_valgrind.sh
cat ci/test/00_setup_env_native_valgrind.sh

Length of output: 8118

ci/test/00_setup_env_native_tsan.sh (2)

10-11: Verify completeness of package dependencies

The package list has been updated for Clang 18, but we should ensure all required LLVM components are included for ThreadSanitizer functionality.

✅ Verification successful

Let me try another verification approach to check the package dependencies.


Package dependencies for TSAN build are complete and correct

Based on the verification results, the package list in 00_setup_env_native_tsan.sh is complete and correctly specified for ThreadSanitizer functionality with Clang 18:

  • The current packages include all essential components:
    • clang-18 and llvm-18 for the base toolchain
    • libclang-rt-18-dev which provides the runtime libraries including TSAN
    • libc++abi-18-dev and libc++-18-dev for C++ standard library support
    • python3-zmq for testing infrastructure

Comparing with other sanitizer configurations in the codebase and the developer documentation, this setup provides all necessary dependencies for ThreadSanitizer functionality. The TSAN-specific runtime is included via libclang-rt-18-dev package, which is correctly versioned to match Clang 18.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if all required TSAN dependencies are available
apt-cache depends clang-18 llvm-18 libclang-rt-18-dev | grep "Depends:"

# Verify if any additional LLVM components are typically required for TSAN
rg -l "ThreadSanitizer" $(fd -t f . ./doc)

Length of output: 4111


Script:

#!/bin/bash
# Search for other TSAN setup files in the codebase
rg -l "TSAN|ThreadSanitizer" $(fd -t f "*.sh" ./ci)

# Look for any other package dependencies in similar setup files
rg "PACKAGES.*clang" $(fd -t f "*.sh" ./ci)

# Check the developer notes for TSAN requirements
rg -A 5 -B 5 "ThreadSanitizer|TSAN" ./doc/developer-notes.md

Length of output: 3527


15-15: Ensure TSAN compatibility with Clang 18

The configuration updates the compiler but maintains existing sanitizer settings. Let's verify ThreadSanitizer compatibility with Clang 18.

✅ Verification successful

ThreadSanitizer configuration is properly set up for Clang 18

The verification shows that the TSAN configuration is properly maintained:

  • The CI environment correctly sets up TSAN with Clang 18 including required packages (libclang-rt-18-dev, libc++abi-18-dev, libc++-18-dev)
  • ThreadSanitizer suppressions are properly configured via TSAN_OPTIONS
  • The build configuration correctly specifies thread sanitizer with --with-sanitizers=thread
  • The compiler flags and settings are consistent with other sanitizer configurations in the CI
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any known TSAN issues with Clang 18
rg -A 3 "thread.*sanitizer.*clang-18|tsan.*clang-18" ./doc ./ci

# Check if there are any specific TSAN flags needed for Clang 18
ast-grep --pattern 'CXXFLAGS.*-fsanitize=thread' 

Length of output: 282


Script:

#!/bin/bash
# Let's check for any TSAN-related configurations and flags in CI files
rg -i "tsan|thread.*sanitizer" ./ci

# Check the current compiler configurations in CI
rg "clang-18" ./ci

# Look for any sanitizer-related build configurations
rg "with-sanitizers" ./ci

Length of output: 3497

contrib/guix/libexec/codesign.sh (1)

81-82: LGTM! Verify ZIP file contents match DMG contents.

The change from DMG to ZIP packaging looks correct. The implementation properly handles paths and maintains error handling.

Let's verify that all required files are included in the ZIP:

✅ Verification successful

Let me gather more information about the DMG packaging to ensure we're not missing any files.


Let me check one more thing to understand what files are being signed before packaging.


Based on the gathered information, I can now provide the final response:

ZIP packaging correctly includes all required files from dist/

The change from DMG to ZIP is correctly implemented and maintains all necessary files:

  • The dist/Dash-Qt.app is properly code-signed before packaging
  • The zip command captures all contents from the dist/ directory, which matches the previous DMG contents
  • The packaging process maintains the same workflow: signing -> packaging -> output

The implementation follows the same pattern used in the existing macdeployqtplus script, which also creates ZIP archives from the same dist/Dash-Qt.app content, confirming that the ZIP format is a suitable replacement for DMG.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Compare files included in ZIP vs previously included in DMG
# Look for any references to DMG contents in the codebase to ensure we're not missing files
rg -A 5 "\.dmg" --glob '!*.{md,txt}'

Length of output: 6208


Script:

#!/bin/bash
# Check for DMG creation and packaging logic in the codebase
rg -A 10 "create.*dmg|make.*dmg" --glob '!*.{md,txt}'

# Check the directory where dist/* files are created
fd -t f "^codesign.sh$" --exec grep -A 10 "dist/"

Length of output: 542


Script:

#!/bin/bash
# Check what files are being signed and included in the package
rg -B 5 -A 5 "Dash-Qt.app" --glob '!*.{md,txt}'

# Also check if there are any other files that should be included
fd -t f "^codesign.sh$" --exec grep -B 5 -A 5 "mkdir.*dist"

Length of output: 3440

depends/README.md (2)

48-51: LGTM! Common dependencies are well organized.

The new common dependencies section improves clarity by separating shared requirements from platform-specific ones.


69-69: LGTM! Dependencies simplified.

The linux dependencies have been appropriately streamlined to essential packages.

contrib/containers/ci/Dockerfile (2)

58-58: LGTM! LLVM version update and installation method.

The update to LLVM 18 and the installation method using the official script is correct.

Also applies to: 61-61


166-166: LGTM! Added zip package for macOS packaging.

The addition of the zip package aligns with the transition from DMG to ZIP packaging.

contrib/devtools/symbol-check.py (2)

254-256: LGTM: Function updated to check for LLD version.

The function has been correctly renamed from check_MACHO_ld64 to check_MACHO_lld and updated to verify LLD version 18.1.6, which aligns with the PR's objective of updating to Clang 18.


298-298: LGTM: CHECKS dictionary updated consistently.

The CHECKS dictionary entry has been updated to use the new check_MACHO_lld function name, maintaining consistency with the function rename.

doc/build-osx.md (2)

216-217: LGTM: Updated deployment format documentation.

Documentation correctly reflects the change from DMG to ZIP packaging format and clearly states the Python requirement.


286-286: LGTM: Added ZIP deployment command example.

Clear documentation of the make deploy command for creating ZIP packages.

depends/Makefile (1)

226-226: LGTM: Added DSYMUTIL variable substitution.

The addition of DSYMUTIL variable substitution in config.site generation is consistent with other tool variables and correctly implements the PR's objective of ensuring proper DSYMUTIL definition.

contrib/guix/libexec/build.sh (3)

138-138: LGTM! Clean consolidation of RPATH configuration.

The consolidation of GUIX_LD_WRAPPER_DISABLE_RPATH export improves maintainability while preserving the same functionality.


307-307: LGTM! Transition from DMG to ZIP for macOS builds.

The change from DMG to ZIP format for macOS builds aligns with the PR objectives and simplifies the build process.

Let's ensure the documentation is updated to reflect this change:


183-183: Verify toolchain compatibility after FORCE_USE_SYSTEM_CLANG removal.

The removal of FORCE_USE_SYSTEM_CLANG aligns with the toolchain updates mentioned in the PR objectives. However, let's verify there are no unintended consequences.

Run this script to check for any remaining references to system Clang:

✅ Verification successful

Let me check the remaining reference in the lint script to understand the context better.


Let me check for any other Clang-related configurations or dependencies in the build system.


Toolchain compatibility verified after FORCE_USE_SYSTEM_CLANG removal

The removal of FORCE_USE_SYSTEM_CLANG is safe and compatible with the current toolchain setup. Here's why:

  • The only remaining Clang reference is in ci/lint/04_install.sh which is specifically for code formatting tools (clang-format-9) and doesn't affect the build toolchain
  • The build system in contrib/guix/ correctly handles toolchain selection:
    • Uses GCC toolchain for Linux builds (x86_64-linux-gnu-gcc/g++)
    • Uses Clang toolchain 18 specifically for Darwin/macOS builds through proper Guix package management
    • All compiler flags and environment variables are properly configured for each target platform

The removal aligns well with the structured toolchain management in the Guix build system.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining references to system Clang that might need updating

# Search for system Clang references in build scripts
rg -l "FORCE_USE_SYSTEM_CLANG|/usr/bin/clang|/usr/local/bin/clang"

# Search for Clang-related configuration
ast-grep --pattern 'FORCE_USE_SYSTEM_CLANG'

Length of output: 300


Script:

#!/bin/bash
# Check the context of the remaining reference in the lint script
rg -A 5 -B 5 "FORCE_USE_SYSTEM_CLANG|/usr/bin/clang|/usr/local/bin/clang" ci/lint/04_install.sh

Length of output: 619


Script:

#!/bin/bash
# Check for Clang-related configurations in build scripts
rg -A 3 -B 3 "clang|CLANG" contrib/guix/

# Also check for any compiler-related configurations that might be affected
rg -A 3 -B 3 "CC=|CXX=|CFLAGS|CXXFLAGS" contrib/guix/

Length of output: 5044

ci/test/00_setup_env_mac.sh Show resolved Hide resolved
contrib/containers/ci/Dockerfile Outdated Show resolved Hide resolved
@DashCoreAutoGuix
Copy link

Guix Automation has began to build this PR tagged as v22.1.0-devpr6516.ee0a9f2b. A new comment will be made when the image is pushed.

@DashCoreAutoGuix
Copy link

Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v22.1.0-devpr6516.ee0a9f2b. The image should be on dockerhub soon.

UdjinM6
UdjinM6 previously approved these changes Jan 2, 2025
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

LGTM, hashes match, utACK ee0a9f2

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

LGTM, but let's add some release notes describing the distributed binaries changes

.gitignore Show resolved Hide resolved
@kwvg
Copy link
Collaborator Author

kwvg commented Jan 3, 2025

Expected hashes for ee04e1f

679c0304e745902a4e5e878e247001dbf39518c8e64e6545c5dafbc339ecfe4c  dashcore-22.0.0-414-gee04e1f5e96f-aarch64-linux-gnu-debug.tar.gz
8699c2d7ca668c4277b7f4545dfb5cfab179571c0309e7fb47825e0fa108946b  dashcore-22.0.0-414-gee04e1f5e96f-aarch64-linux-gnu.tar.gz
e533bde1b0fba871ea0543f8864984291ac379c2f0f2902f37e50446ffb166c4  dashcore-22.0.0-414-gee04e1f5e96f-arm-linux-gnueabihf-debug.tar.gz
49a106ba14e91d90035662d9bba45d5f0ca2a97d1df9aae622b741c34342f6e8  dashcore-22.0.0-414-gee04e1f5e96f-arm-linux-gnueabihf.tar.gz
6b4bb031fe0d2c06bdafe648c7078e0b9b25ee44f33ec152ae7d1b9f4c61855f  dashcore-22.0.0-414-gee04e1f5e96f-arm64-apple-darwin-unsigned.tar.gz
2e269239f6ab5df3e019683ecef9d7e57d4da06be5ef3f71038a4c696bf03864  dashcore-22.0.0-414-gee04e1f5e96f-arm64-apple-darwin-unsigned.zip
55260c1075076543e0657e535e23f8b559dedab589d07f4b33e35547caab13cb  dashcore-22.0.0-414-gee04e1f5e96f-arm64-apple-darwin.tar.gz
f5208b934709a1aa19e811988fcaadb3a1b26aaf01feb8ce0fbc3b85bce80318  dashcore-22.0.0-414-gee04e1f5e96f.tar.gz
81360327bf12c3203304731bb0272fb89c23fe36ca053577e7c76bf2e316e50f  dashcore-22.0.0-414-gee04e1f5e96f-powerpc64-linux-gnu-debug.tar.gz
36a5d336973d3e20c1d18280c441619d1ded927ae7ba93d6048729dac59269b0  dashcore-22.0.0-414-gee04e1f5e96f-powerpc64-linux-gnu.tar.gz
4c667a3fa82bd88dc2c05becebe9111b4e98b1905a737d8815d16d28df9f190f  dashcore-22.0.0-414-gee04e1f5e96f-riscv64-linux-gnu-debug.tar.gz
89ee7cf3e396f1d9be94d0a6b6cd1b449cb79b7888e582a6c9a562ea7c50b0cb  dashcore-22.0.0-414-gee04e1f5e96f-riscv64-linux-gnu.tar.gz
6d51d35300a5e9fe9dd017bd9a66775cfb063219567fe7398b60af37fc126938  dashcore-22.0.0-414-gee04e1f5e96f-x86_64-apple-darwin-unsigned.tar.gz
e75e8cb7656c41814f6f0728f59d47fd8050f2e6abe10862c7e9ffeaccc4a234  dashcore-22.0.0-414-gee04e1f5e96f-x86_64-apple-darwin-unsigned.zip
3b42b172ad06da3c3b6930e5537e4885b808aafc6dd3112915835efd34794187  dashcore-22.0.0-414-gee04e1f5e96f-x86_64-apple-darwin.tar.gz
51a31b8398949befa4027169d4c941c52ac16887830da858f5888458295f450f  dashcore-22.0.0-414-gee04e1f5e96f-x86_64-linux-gnu-debug.tar.gz
878d089099587da06a92d9d4be391d7c68d5ab6fa093b31a5000aa657feb312d  dashcore-22.0.0-414-gee04e1f5e96f-x86_64-linux-gnu.tar.gz
688a23c4633b32dd638219fcd9daecd206b4c1f1866ad515ad0f5d5b36c80a20  dashcore-22.0.0-414-gee04e1f5e96f-win64-debug.zip
6e082bef04595f49f40aab877b9eef315f3a42e535a75351019a0ebace62ad9a  dashcore-22.0.0-414-gee04e1f5e96f-win64-setup-unsigned.exe
c22eae54df772baac446a8d8640e323a0994283b51c695ec08a0cd9d61bb39c8  dashcore-22.0.0-414-gee04e1f5e96f-win64-unsigned.tar.gz
b0233d6c0e3ff64e0a9172bcfe587dd99c397b9cde312c2e5929078de8406316  dashcore-22.0.0-414-gee04e1f5e96f-win64.zip

@kwvg kwvg changed the title backport: merge bitcoin#24866, #25612, #28432, #28845, #28932, #28973, #21778, #30204, #29765, #30201, #30287, #30511 (toolchain backports: part 3) backport: merge bitcoin#24866, #25612, #28432, #28757, #28845, #28932, #28973, #21778, #30204, #29765, #30201, #30287, #30511 (toolchain backports: part 3) Jan 3, 2025
@DashCoreAutoGuix
Copy link

Guix Automation has began to build this PR tagged as v22.1.0-devpr6516.ee04e1f5. A new comment will be made when the image is pushed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (5)
depends/patches/gmp/include_ldflags_in_configure.patch (1)

1-621: Consider adding test cases for macOS cross-compilation.

While the changes look correct, it would be beneficial to have specific test cases that verify the patch works as intended for macOS cross-compilation scenarios.

Consider adding:

  1. Test cases that specifically exercise the macOS cross-compilation path
  2. Verification steps in the build process to ensure lld is being used correctly
  3. Documentation for cross-compilation setup and requirements
depends/funcs.mk (1)

Line range hint 214-234: Review CMAKE cross-compilation configuration

The CMAKE configuration block correctly handles cross-compilation settings, which is crucial for the Clang 18 update mentioned in the PR. However, consider adding a comment explaining the CMAKE cross-compilation flags for better maintainability.

Add documentation above the CMAKE cross-compilation block:

 ifeq ($($(1)_type),build)
 $(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"
 else
+# Configure CMAKE for cross-compilation when host differs from build
 ifneq ($(host),$(build))
 $(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system)
 $(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host)
 $(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host)
 endif
 endif
contrib/macdeploy/README.md (1)

57-69: Improve clarity in deterministic build description

Consider removing the word "somewhat" as it introduces uncertainty. The build process is either deterministic or not.

-for the build process to remain somewhat deterministic. Here's how it works:
+for the build process to remain deterministic. Here's how it works:
🧰 Tools
🪛 LanguageTool

[style] ~69-~69: Qualifiers like “somewhat” can weaken your message and make your writing sound uncertain. Consider removing it or choosing an alternative to sound more confident.
Context: ...n order for the build process to remain somewhat deterministic. Here's how it works: - ...

(SOMEWHAT)

depends/README.md (1)

56-58: Fix grammar in SDK instructions

The preposition is missing in the directory reference.

-proceeding with a cross-compile. Under the depends directory, create a
+proceeding with a cross-compile. Under the depends/ directory, create a
🧰 Tools
🪛 LanguageTool

[grammar] ~57-~57: The verb ‘depend’ requires the preposition ‘on’ (or ‘upon’).
Context: ...ceeding with a cross-compile. Under the depends directory, create a subdirectory named ...

(DEPEND_ON)

contrib/macdeploy/macdeployqtplus (1)

500-501: Consider improving the ZIP creation logic.

  1. Add error handling around the make_archive call to gracefully handle potential failures.
  2. Consider making the output app name configurable instead of hardcoding 'Dash-Qt.app'.
 if config.zip is not None:
-    shutil.make_archive('{}'.format(appname), format='zip', root_dir='dist', base_dir='Dash-Qt.app')
+    try:
+        output_app = os.getenv('OUTPUT_APP_NAME', 'Dash-Qt.app')
+        shutil.make_archive('{}'.format(appname), format='zip', root_dir='dist', base_dir=output_app)
+    except Exception as e:
+        sys.stderr.write(f"Error creating ZIP archive: {str(e)}\n")
+        sys.exit(1)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee0a9f2 and ee04e1f.

⛔ Files ignored due to path filters (1)
  • contrib/macdeploy/background.tiff is excluded by !**/*.tiff
📒 Files selected for processing (40)
  • .gitignore (1 hunks)
  • Makefile.am (3 hunks)
  • ci/test/00_setup_env_mac.sh (1 hunks)
  • ci/test/00_setup_env_native_fuzz.sh (1 hunks)
  • ci/test/00_setup_env_native_fuzz_with_valgrind.sh (1 hunks)
  • ci/test/00_setup_env_native_multiprocess.sh (1 hunks)
  • ci/test/00_setup_env_native_tsan.sh (1 hunks)
  • ci/test/00_setup_env_native_ubsan.sh (1 hunks)
  • ci/test/00_setup_env_native_valgrind.sh (1 hunks)
  • configure.ac (2 hunks)
  • contrib/containers/ci/Dockerfile (2 hunks)
  • contrib/devtools/symbol-check.py (2 hunks)
  • contrib/devtools/test-security-check.py (1 hunks)
  • contrib/guix/libexec/build.sh (3 hunks)
  • contrib/guix/libexec/codesign.sh (1 hunks)
  • contrib/guix/manifest.scm (2 hunks)
  • contrib/macdeploy/README.md (2 hunks)
  • contrib/macdeploy/macdeployqtplus (4 hunks)
  • depends/Makefile (2 hunks)
  • depends/README.md (2 hunks)
  • depends/builders/darwin.mk (2 hunks)
  • depends/config.site.in (2 hunks)
  • depends/funcs.mk (1 hunks)
  • depends/gen_id (0 hunks)
  • depends/hosts/darwin.mk (3 hunks)
  • depends/packages/gmp.mk (2 hunks)
  • depends/packages/native_cctools.mk (0 hunks)
  • depends/packages/native_ds_store.mk (0 hunks)
  • depends/packages/native_libtapi.mk (0 hunks)
  • depends/packages/native_llvm.mk (0 hunks)
  • depends/packages/native_mac_alias.mk (0 hunks)
  • depends/packages/packages.mk (0 hunks)
  • depends/packages/qt.mk (3 hunks)
  • depends/patches/gmp/include_ldflags_in_configure.patch (1 hunks)
  • depends/patches/native_libtapi/disable_zlib.patch (0 hunks)
  • depends/patches/qt/mac-qmake.conf (1 hunks)
  • depends/patches/qt/no_warnings_for_symbols.patch (1 hunks)
  • doc/build-osx.md (2 hunks)
  • doc/release-notes-6516.md (1 hunks)
  • doc/release-process.md (1 hunks)
💤 Files with no reviewable changes (8)
  • depends/patches/native_libtapi/disable_zlib.patch
  • depends/gen_id
  • depends/packages/native_libtapi.mk
  • depends/packages/native_cctools.mk
  • depends/packages/packages.mk
  • depends/packages/native_ds_store.mk
  • depends/packages/native_mac_alias.mk
  • depends/packages/native_llvm.mk
✅ Files skipped from review due to trivial changes (1)
  • doc/release-notes-6516.md
🚧 Files skipped from review as they are similar to previous changes (22)
  • doc/release-process.md
  • ci/test/00_setup_env_mac.sh
  • ci/test/00_setup_env_native_fuzz_with_valgrind.sh
  • ci/test/00_setup_env_native_multiprocess.sh
  • depends/patches/qt/no_warnings_for_symbols.patch
  • .gitignore
  • ci/test/00_setup_env_native_valgrind.sh
  • depends/packages/gmp.mk
  • contrib/devtools/test-security-check.py
  • contrib/devtools/symbol-check.py
  • ci/test/00_setup_env_native_fuzz.sh
  • ci/test/00_setup_env_native_ubsan.sh
  • depends/builders/darwin.mk
  • depends/config.site.in
  • depends/patches/qt/mac-qmake.conf
  • depends/Makefile
  • ci/test/00_setup_env_native_tsan.sh
  • contrib/guix/manifest.scm
  • Makefile.am
  • contrib/guix/libexec/build.sh
  • depends/hosts/darwin.mk
  • configure.ac
🧰 Additional context used
🪛 LanguageTool
contrib/macdeploy/README.md

[style] ~69-~69: Qualifiers like “somewhat” can weaken your message and make your writing sound uncertain. Consider removing it or choosing an alternative to sound more confident.
Context: ...n order for the build process to remain somewhat deterministic. Here's how it works: - ...

(SOMEWHAT)

depends/README.md

[grammar] ~57-~57: The verb ‘depend’ requires the preposition ‘on’ (or ‘upon’).
Context: ...ceeding with a cross-compile. Under the depends directory, create a subdirectory named ...

(DEPEND_ON)

🔇 Additional comments (19)
contrib/containers/ci/Dockerfile (5)

68-69: LGTM: Required LLVM runtime packages

The addition of libclang-rt and lld packages is necessary for the complete toolchain setup.


73-78: Great: Addressed previous feedback about llvm-cov

The update-alternatives configuration now includes llvm-cov as suggested in the previous review. The additional LLD symlinks are also properly configured.


166-166: LGTM: Package updates align with build system changes

The addition of the zip package aligns with the PR objectives of transitioning from DMG to ZIP files for macOS packaging.


58-61: LGTM: LLVM upgrade and installation method

The upgrade to LLVM 18 and the use of the official llvm.sh installation script is a good improvement.

Let's verify the LLVM installation script's integrity:

✅ Verification successful

LLVM 18 installation script verified and supported

The LLVM installation script has been verified:

  • LLVM version 18 is officially supported by the script
  • The script includes proper version pattern matching for LLVM 18 (LLVM_VERSION_PATTERNS[18]="-18")
  • The installation method follows the recommended approach using the official apt.llvm.org script
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the LLVM installation script's integrity and contents
curl -sL https://apt.llvm.org/llvm.sh | sha256sum
curl -sL https://apt.llvm.org/llvm.sh | grep -A 5 "LLVM_VERSION_PATTERN"

Length of output: 996


Line range hint 58-166: Verify the complete toolchain setup

The changes create a comprehensive build environment. Let's verify the complete toolchain setup:

✅ Verification successful

Toolchain setup is properly configured and integrated

The verification results show that the LLVM toolchain (clang, clang++, lld, and other LLVM utilities) is well-integrated into the build system:

  • The tools are referenced in key build configuration files (configure.ac, Makefile.am)
  • Multiple components across the codebase use these tools, including:
    • Core build system (configure.ac, depends/*)
    • Test infrastructure (ci/test/*)
    • Development tools (contrib/devtools/*)
    • Various source components (src/*)

The specific version pinning in the Dockerfile (LLVM 18) aligns with the toolchain requirements found in the codebase, and the environment setup (LD_LIBRARY_PATH, alternatives) ensures proper tool resolution.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the complete toolchain setup
# Check if all required tools are available with correct versions

# Check LLVM tools versions
echo "Checking LLVM tools versions..."
for tool in clang clang++ lld llvm-ar llvm-nm llvm-objdump llvm-ranlib llvm-strip llvm-cov; do
  rg -l "${tool}(-[0-9]+)?" | grep -v "contrib/containers/ci/Dockerfile"
done

# Check build system dependencies on these tools
echo "Checking build system dependencies..."
rg -g 'configure.ac' -g 'Makefile.am' "zip|lld|llvm" 

Length of output: 11068

depends/patches/gmp/include_ldflags_in_configure.patch (2)

1-6: LGTM! Clear and informative patch description.

The patch description effectively explains:

  • The purpose: Including LDFLAGS in test program compilation
  • The use case: macOS cross-compilation with lld
  • The rationale: Avoiding unused argument warnings

8-556: LGTM! Systematic and consistent changes to acinclude.m4.

The changes consistently add $LDFLAGS to all compilation commands in various test scenarios. This ensures that linker flags are properly propagated throughout the build process.

Let's verify the consistency of the changes:

✅ Verification successful

All compilation commands now properly include LDFLAGS

The patch systematically adds $LDFLAGS to all compilation commands in both acinclude.m4 and configure files. The verification shows:

  1. All gmp_compile commands now include $LDFLAGS
  2. All gmp_cxxcompile commands now include $LDFLAGS
  3. All compiler test commands (CC/CXX) now include $LDFLAGS
  4. The changes are consistent across both test compilations and actual build commands

The patch correctly implements the needed changes to support macOS cross-compilation with lld linker by ensuring linker flags are properly propagated.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all compilation commands include LDFLAGS

# Check if any compilation commands were missed
rg -U 'gmp_compile="[^"]*"' acinclude.m4 | rg -v '\$LDFLAGS'

Length of output: 115


Script:

#!/bin/bash
# Let's check both acinclude.m4 and configure files for any missed LDFLAGS
# First, find the files
fd -t f "acinclude.m4|configure$"

# Then check their content for compilation commands without LDFLAGS
echo "=== Checking compilation commands without LDFLAGS ==="
fd -t f "acinclude.m4|configure$" -x rg -U 'gmp_compile="[^"]*"' {} | rg -v '\$LDFLAGS'

# Also check for any other compilation-related variables
echo -e "\n=== Checking other compilation variables ==="
fd -t f "acinclude.m4|configure$" -x rg -U '(gmp_cxxcompile|cc_for_build|gmp_compile)="[^"]*"' {} | rg -v '\$LDFLAGS'

Length of output: 471


Script:

#!/bin/bash
# Let's check the patch file directly since we're not finding the source files
echo "=== Checking the patch file ==="
fd -t f "include_ldflags_in_configure.patch" -x cat {}

# Also let's check if we can find any compilation commands that might have been missed
echo -e "\n=== Checking for potentially missed compilation commands ==="
fd -t f "include_ldflags_in_configure.patch" -x rg -U '([^L]CC|[^X]CXX)[= ].*(-c|-o)' {}

Length of output: 26989

depends/packages/qt.mk (4)

Line range hint 1-300: LGTM: Overall Qt package configuration

The Qt package configuration is well-structured with appropriate build options, dependencies, and platform-specific configurations. The changes align with the PR objectives of updating the toolchain and improving the build process.


18-18: Verify the purpose and impact of symbol warning suppression

The addition of no_warnings_for_symbols.patch suggests there are symbol-related warnings being suppressed. While this might clean up the build output, we should verify that no critical warnings are being hidden.


142-142: Verify LLVM toolchain availability for Darwin builds

The change from $(host)- to llvm- for CROSS_COMPILE aligns with the PR's objective of supporting an LLD-based toolchain, but requires verification of LLVM tools availability.

✅ Verification successful

LLVM toolchain configuration is correctly handled for Darwin builds

The change from $(host)- to llvm- for CROSS_COMPILE in Qt's configuration is correct and properly supported by the build system. The depends/hosts/darwin.mk file explicitly configures all necessary LLVM tools through variables like darwin_AR, darwin_NM, darwin_RANLIB, etc., which are set using command -v to locate the LLVM tools at build time. While our sandbox environment doesn't have these tools, the actual build system:

  • Properly detects LLVM tools availability at build time
  • Falls back appropriately for native Darwin builds
  • Configures cross-compilation correctly with explicit LLVM toolchain for non-Darwin builds
  • Aligns with the project's move towards an LLD-based toolchain
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify LLVM tools availability in the toolchain
# Expected: All required LLVM tools should be present

# Check for essential LLVM tools
for tool in llvm-ar llvm-ranlib llvm-nm llvm-objcopy llvm-strip; do
  if ! command -v $tool &> /dev/null; then
    echo "Missing required LLVM tool: $tool"
  fi
done

Length of output: 875


Script:

#!/bin/bash
# Let's check the build system configuration to understand how LLVM tools are handled
# First, check if there are any variables or configurations related to LLVM tools
rg -l "llvm-" depends/

# Then check specifically for Darwin/macOS related configurations
rg "darwin|DARWIN|macos|MACOS" depends/packages/qt.mk

# Also check for any host toolchain related configurations
rg "CROSS_COMPILE|HOST" depends/packages/qt.mk

Length of output: 1704


Script:

#!/bin/bash
# Let's check how the Darwin host is configured and if it handles LLVM tools differently
cat depends/hosts/darwin.mk

# Also check if there are any relevant variables set in the Android host config
# since it also showed up in the LLVM search
cat depends/hosts/android.mk

Length of output: 3947


Line range hint 252-259: Verify patch application order and dependencies

The new patches are properly added to the preprocessing commands. However, we should verify that there are no conflicts between patches and that they apply cleanly, especially with the Clang 18 update.

✅ Verification successful

Let me try a different approach to locate and examine the patches.


Let me check the content of these patches to verify their dependencies and potential conflicts.


Patches are compatible and correctly ordered

After analyzing the patches and their modifications, I can confirm that:

  1. The patches modify different files or different sections of code, avoiding any direct conflicts
  2. The order is appropriate:
    • no_warnings_for_symbols.patch modifies build configuration
    • clang_18_libpng.patch fixes Clang 18 compatibility
    • Other patches handle specific optimizations and features

The patches are independent of each other and can be safely applied in the specified order.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check patch dependencies and application order
# Expected: Patches should apply without conflicts

# List all patches in application order
echo "=== Patch application order ==="
for patch in no_warnings_for_symbols.patch clang_18_libpng.patch rcc_hardcode_timestamp.patch duplicate_lcqpafonts.patch utc_from_string_no_optimize.patch fast_fixed_dtoa_no_optimize.patch guix_cross_lib_path.patch windows_lto.patch; do
  if [ -f "$(package)_patch_dir/$patch" ]; then
    echo "Found: $patch"
  else
    echo "Missing: $patch"
  fi
done

Length of output: 3892


Script:

#!/bin/bash
# Find all patch files in the repository
echo "=== Finding patch files ==="
fd -e patch

# Check the content of depends/patches directory if it exists
echo -e "\n=== Checking depends/patches directory ==="
if [ -d "depends/patches" ]; then
  ls -la depends/patches
fi

# Look for patch files specifically in Qt-related directories
echo -e "\n=== Looking for Qt patches ==="
fd -e patch -p depends/patches/qt

Length of output: 4026


Script:

#!/bin/bash
# Check the content of the relevant patches
echo "=== Checking clang_18_libpng.patch ==="
cat depends/patches/qt/clang_18_libpng.patch

echo -e "\n=== Checking no_warnings_for_symbols.patch ==="
cat depends/patches/qt/no_warnings_for_symbols.patch

echo -e "\n=== Checking utc_from_string_no_optimize.patch ==="
cat depends/patches/qt/utc_from_string_no_optimize.patch

echo -e "\n=== Checking fast_fixed_dtoa_no_optimize.patch ==="
cat depends/patches/qt/fast_fixed_dtoa_no_optimize.patch

# List modified files in each patch to check for overlaps
echo -e "\n=== Files modified by each patch ==="
for patch in depends/patches/qt/*.patch; do
  echo -e "\nPatch: $(basename $patch)"
  grep "^+++ " "$patch" | cut -f2- -d' ' | sort -u
done

Length of output: 13948

depends/funcs.mk (2)

Line range hint 166-169: LGTM: Comprehensive LDFLAGS handling

The LDFLAGS configuration is thorough and correct:

  • Properly accumulates flags from different sources (release type, host arch, host OS)
  • Correctly passed to both autoconf and CMAKE builds
  • Handles the GMP build requirements mentioned in the PR objectives

Also applies to: 191-194


49-49: Verify removal of native toolchain dependencies

The removal of native toolchain and binutils dependencies from $(1)_all_dependencies could impact packages that implicitly relied on these tools. While this change aligns with the toolchain backports, we should verify that all packages explicitly declare their toolchain requirements.

Run the following script to identify packages that might be affected:

✅ Verification successful

Removal of native toolchain dependencies is safe

Based on the analysis of the codebase:

  1. The change to $(1)_all_dependencies only affects explicit dependency resolution, not the actual toolchain usage.
  2. Each package properly defines its own toolchain variables through int_vars function, which sets CC, CXX, AR, etc., from the package's type-specific values.
  3. Build tools are properly configured in builders/default.mk and passed to packages through the build system.
  4. Packages that need compilation tools (like qt, libnatpmp, miniupnpc) explicitly set their build environment with the correct toolchain variables.
  5. No package directly depends on native_toolchain or native_binutils in their dependency declarations.

The removal of implicit native toolchain dependencies is safe as the build system correctly handles toolchain configuration through the type-specific variables and builder configurations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for packages that might need explicit toolchain dependencies
# Look for packages using compiler/linker tools without declaring dependencies

# Find all package makefiles
echo "Checking package definitions..."
fd -e mk . packages/ -x sh -c '
  # Extract package name from filename
  pkg=$(basename {} .mk)
  
  # Look for compiler/linker tool usage without corresponding dependencies
  if grep -q "CC\|CXX\|LD\|AR\|RANLIB" {} && ! grep -q "dependencies.*native_toolchain\|dependencies.*native_binutils" {}; then
    echo "Package $pkg uses build tools but may need explicit toolchain dependencies"
    echo "Referenced tools:"
    grep -h "CC=\|CXX=\|LD=\|AR=\|RANLIB=" {}
  fi
'

Length of output: 641


Script:

#!/bin/bash
# First, let's check if the packages directory exists with a different name or location
echo "Finding package definitions..."
fd -t f -e mk . depends/

# Now let's examine the funcs.mk to understand the dependency resolution
echo -e "\nChecking funcs.mk for dependency handling..."
cat depends/funcs.mk

# Let's also check if there are any other makefiles that might define toolchain dependencies
echo -e "\nChecking other makefiles for toolchain references..."
rg -l "native_toolchain|native_binutils" depends/

Length of output: 15877


Script:

#!/bin/bash
# Let's check how dependencies are defined in package makefiles
echo "Checking package dependency definitions..."
rg "dependencies.*=.*" depends/packages/

# Let's also check how toolchain-related variables are used
echo -e "\nChecking toolchain variable usage..."
rg "(CC|CXX|AR|RANLIB|OBJC|OBJCXX).*=.*" depends/packages/

# Finally, let's check the builders directory for toolchain configuration
echo -e "\nChecking builder configurations..."
cat depends/builders/default.mk

Length of output: 4871

contrib/macdeploy/README.md (2)

9-9: LGTM: Clear output format specification

The change from DMG to ZIP format is clearly documented.


71-78: Verify build process steps

The documented build process steps look correct, but let's verify the repository links and build artifacts.

✅ Verification successful

Let me gather more information about the build process and scripts.


Build process steps and repository links are accurate

The verification confirms that:

  • The detached signatures repository (dashpay/dash-detached-sigs) exists and is actively maintained
  • The build process steps align with the documented release process in doc/release-process.md
  • The codesigning workflow is properly implemented with:
    • contrib/guix/libexec/codesign.sh for handling signatures
    • Support for detached signatures integration via DETACHED_SIGS_REPO in the Guix build
  • The process correctly describes the flow: Guix build → detached signature creation → final deterministic build
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence and accessibility of the detached signatures repository
gh repo view dashpay/dash-detached-sigs --json url,description,isArchived

# Check for any references to DMG files that might have been missed
rg -i "\.dmg" --type md

Length of output: 746


Script:

#!/bin/bash
# Check for Guix build related files and scripts
fd -e scm -e sh guix

# Look for codesigning related scripts
fd -g "*sign*.sh"

# Check for any references to detached signatures in the codebase
rg "detached.*sig" --type md

Length of output: 1823

contrib/guix/libexec/codesign.sh (1)

81-86: LGTM: Robust deterministic ZIP creation

The implementation ensures deterministic ZIP creation through:

  • Safe filename handling with null-terminated strings
  • Consistent timestamps using SOURCE_DATE_EPOCH
  • Sorted file order for reproducible archives
depends/README.md (1)

54-57: Verify Clang version requirement

Let's verify the Clang version requirement and its availability.

🧰 Tools
🪛 LanguageTool

[grammar] ~57-~57: The verb ‘depend’ requires the preposition ‘on’ (or ‘upon’).
Context: ...ceeding with a cross-compile. Under the depends directory, create a subdirectory named ...

(DEPEND_ON)

doc/build-osx.md (1)

216-217: LGTM! Documentation accurately reflects the new deployment format.

The changes correctly document the transition from .dmg to .zip format for macOS deployment.

Also applies to: 286-286

contrib/macdeploy/macdeployqtplus (1)

386-386: LGTM! Clean transition from DMG to ZIP format.

The argument parser and file checks are correctly updated to handle ZIP files instead of DMG files.

Also applies to: 397-397, 418-420

@DashCoreAutoGuix
Copy link

Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v22.1.0-devpr6516.ee04e1f5. The image should be on dockerhub soon.

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK ee04e1f

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK ee04e1f

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.

4 participants