build: use UCRT runtime for Windows (release) binaries #30210

issue fanquake openend this issue on May 31, 2024
  1. fanquake commented at 8:56 am on May 31, 2024: member

    Switching to the modern runtime would be good, because the old runtime is missing features, which has meant writing workarounds for Windows in our code: i.e #29014/#29357.

    Mingw-w64 12.0.0 has been released, which now defaults to the UCRT runtime, over MSVCRT. See https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-doc/howto-build/ucrt-vs-msvcrt.txt for more details. This makes using it somewhat easier, because we can just use 12.0.0 verbatim, rather than having to configure an older mingw-w64 for the newer runtime.

  2. fanquake added the label Windows on May 31, 2024
  3. fanquake added the label Build system on May 31, 2024
  4. jeandudey commented at 10:32 am on July 4, 2024: none

    I’ve sent a patchset a while ago when working on cross-base updating MinGW to 12.0.0: https://issues.guix.gnu.org/71630.

    Using UCRT will likely need a new target triplet for Guix though like MSYS2 does, e.g. x86_64-w64-ucrt-mingw32.

  5. fanquake referenced this in commit 156bf3630f on Jul 16, 2024
  6. fanquake commented at 11:04 am on July 16, 2024: member

    I’ve sent a patchset a while ago

    Thanks. That has now landed, so we’ll bump the time machine to get things started here. See #30452.

  7. fanquake referenced this in commit 77ce657d53 on Jul 18, 2024
  8. fanquake referenced this in commit 314407a2fb on Jul 18, 2024
  9. fanquake referenced this in commit 641c7c44c0 on Jul 19, 2024
  10. fanquake referenced this in commit 1653d78cf3 on Jul 19, 2024
  11. fanquake referenced this in commit 2401a24387 on Jul 31, 2024
  12. hebasto commented at 6:51 am on October 30, 2024: member

    Here is another reason to switch to UCRT.

    UPD. Switching to UCRT does not actually resolve the issue mentioned in the referenced comment.

  13. hebasto commented at 10:02 am on October 30, 2024: member

    FWIW, here is a way to cross-build UCRT-linked Windows binaries on Fedora 41:

    0$ sudo dnf install ucrt64-gcc-c++
    1$ make -C depends HOST=x86_64-w64-mingw32ucrt mingw32_CC=/usr/bin/x86_64-w64-mingw32ucrt-gcc mingw32_CXX=/usr/bin/x86_64-w64-mingw32ucrt-g++
    2$ cmake -B build --toolchain depends/x86_64-w64-mingw32ucrt/toolchain.cmake
    3$ cmake --build build
    
  14. fanquake commented at 2:07 pm on January 21, 2025: member
    Inconsistency in the binaries leading to more workarounds/disabling test code: #31410.
  15. hebasto commented at 8:54 pm on February 1, 2025: member
    • Add CI to cover new runtime.

    I’ve added a nightly build with UCRT to https://github.com/hebasto/bitcoin-core-nightly.

    Inconsistency in the binaries leading to more workarounds/disabling test code: #31410.

    It seems that the mentioned issue requires further investigation, as the fix is still needed.

  16. PastaPastaPasta referenced this in commit 7ab40aecc6 on May 14, 2025
  17. PastaPastaPasta referenced this in commit 7f29288798 on May 16, 2025
  18. PastaPastaPasta referenced this in commit 7711ffb649 on May 19, 2025
  19. hebasto commented at 8:33 am on May 28, 2025: member

    @jeandudey

    I’ve sent a patchset a while ago when working on cross-base updating MinGW to 12.0.0: https://issues.guix.gnu.org/71630.

    Using UCRT will likely need a new target triplet for Guix though like MSYS2 does, e.g. x86_64-w64-ucrt-mingw32.

    Trying to build mingw-w64 with the deleted --with-default-msvcrt=msvcrt configure option results in a linker error:

    0x86_64-w64-mingw32-ld: src/.libs/libwinpthread_la-thread.o: in function `pthread_create_wrapper':
    1/tmp/guix-build-mingw-w64-x86_64-winpthreads-12.0.0.drv-0/mingw-w64-v12.0.0/mingw-w64-libraries/winpthreads/src/thread.c:1544: undefined reference to `__intrinsic_setjmpex'
    2collect2: error: ld returned 1 exit status
    3make[4]: *** [Makefile:706: libwinpthread.la] Error 1
    

    Any ideas on how to resolve this?

  20. PastaPastaPasta referenced this in commit 6a56facac6 on May 28, 2025
  21. DashCoreAutoGuix referenced this in commit 4d0d51c99c on May 30, 2025
  22. PastaPastaPasta referenced this in commit c9571b7b2a on May 31, 2025
  23. PastaPastaPasta referenced this in commit e417fec39c on May 31, 2025
  24. DashCoreAutoGuix referenced this in commit 7cbe6ab0a5 on May 31, 2025
  25. PastaPastaPasta referenced this in commit 563db57988 on Jun 1, 2025
  26. PastaPastaPasta referenced this in commit bf3e468056 on Jun 2, 2025
  27. fanquake referenced this in commit be853e9f7a on Nov 3, 2025
  28. fanquake referenced this in commit 9bcdd81636 on Nov 4, 2025
  29. fanquake referenced this in commit 701fb7c8e2 on Nov 4, 2025
  30. fanquake referenced this in commit 8649f7dcf7 on Nov 5, 2025
  31. fanquake referenced this in commit 5b51244f21 on Nov 6, 2025
  32. fanquake referenced this in commit 6efb234510 on Nov 10, 2025
  33. fanquake referenced this in commit ce204ecace on Nov 10, 2025
  34. fanquake referenced this in commit 746c540845 on Nov 11, 2025
  35. fanquake referenced this in commit 4568773763 on Nov 11, 2025
  36. fanquake referenced this in commit 0716bb53f0 on Nov 11, 2025
  37. fanquake referenced this in commit 94b5b3816c on Nov 11, 2025
  38. hebasto commented at 6:13 pm on November 11, 2025: member
    • Any other documentation / Windows release build configuration updates.

    See: #33857.

  39. fanquake referenced this in commit 86fffd9380 on Nov 12, 2025
  40. fanquake referenced this in commit 2b6e451075 on Nov 12, 2025
  41. fanquake referenced this in commit e40362b4ff on Nov 13, 2025
  42. fanquake referenced this in commit 81be7e5bef on Nov 14, 2025
  43. fanquake referenced this in commit ce6769c0e3 on Nov 14, 2025
  44. fanquake referenced this in commit 26c6dd1ca5 on Nov 14, 2025
  45. fanquake referenced this in commit 680f587b10 on Nov 17, 2025
  46. fanquake referenced this in commit f21d5bd923 on Nov 17, 2025
  47. fanquake referenced this in commit 59304910cb on Nov 17, 2025
  48. fanquake referenced this in commit 5b4c9a1b3b on Nov 19, 2025
  49. fanquake referenced this in commit 9351c2be9b on Nov 20, 2025
  50. fanquake referenced this in commit 61a8f3840a on Nov 20, 2025
  51. fanquake referenced this in commit 23c1c4636d on Nov 25, 2025
  52. fanquake referenced this in commit c767125efa on Nov 25, 2025
  53. fanquake referenced this in commit 19cb502045 on Nov 25, 2025
  54. fanquake referenced this in commit 0ee5642048 on Nov 25, 2025
  55. fanquake referenced this in commit 7a9020d4cc on Nov 26, 2025
  56. fanquake referenced this in commit 2c16922fff on Nov 27, 2025
  57. fanquake referenced this in commit 086e749d5d on Nov 27, 2025
  58. fanquake referenced this in commit 26bec5cf2e on Nov 27, 2025
  59. fanquake referenced this in commit 977eeffeb2 on Nov 27, 2025
  60. fanquake referenced this in commit f6acbef108 on Nov 28, 2025
  61. fanquake referenced this in commit c204201538 on Nov 28, 2025
  62. hebasto commented at 11:57 am on November 29, 2025: member
    • Add CI to cover new runtime.

    Since bitcoin/bitcoin#33764 has been merged, this checkbox can now be ticked.

  63. fanquake referenced this in commit 57e7ff7662 on Dec 1, 2025
  64. fanquake referenced this in commit 0e8c03e2b2 on Dec 2, 2025
  65. fanquake referenced this in commit 0d95833544 on Dec 2, 2025
  66. fanquake referenced this in commit 3d6e6f687f on Dec 2, 2025
  67. fanquake referenced this in commit a1f2a6a74e on Dec 2, 2025
  68. fanquake referenced this in commit dc1760ffbc on Dec 3, 2025
  69. fanquake referenced this in commit 492faf7986 on Dec 3, 2025
  70. fanquake referenced this in commit 8c062253ec on Dec 3, 2025
  71. fanquake referenced this in commit 9a29b2d331 on Dec 3, 2025
  72. fanquake commented at 3:44 pm on December 3, 2025: member

    Since #33764 has been merged, this checkbox can now be ticked.

    As I mentioned in that PR, neither the headers, or the compiler version, match Guix, so its not exactly testing something similar to how we build releases. That will be improved by #33775.

  73. fanquake referenced this in commit c40e4f083a on Dec 3, 2025
  74. fanquake referenced this in commit a20549f8a4 on Dec 4, 2025
  75. fanquake referenced this in commit 471eceb8e3 on Dec 5, 2025
  76. fanquake referenced this in commit e0b6bd0fac on Dec 5, 2025
  77. fanquake referenced this in commit fd26217722 on Dec 8, 2025
  78. fanquake referenced this in commit 12df342737 on Dec 8, 2025
  79. maflcko commented at 2:17 pm on December 10, 2025: member

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: 2025-12-17 06:13 UTC

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