build: switch to using LLVM 17.x for macOS builds #28880

pull fanquake wants to merge 5 commits into bitcoin:master from fanquake:llvm_17_0_5_macos_deps changing 8 files +98 −34
  1. fanquake commented at 10:49 am on November 15, 2023: member
    This is the last step before #21778. We need LLVM 17.x so that lld has -fixup_chains.
  2. DrahtBot commented at 10:49 am on November 15, 2023: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK theuni, TheCharlatan
    Concept ACK hebasto

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #21778 (build: LLD based macOS toolchain by fanquake)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. DrahtBot added the label Build system on Nov 15, 2023
  4. hebasto commented at 10:53 am on November 15, 2023: member
    Concept ACK.
  5. maflcko added the label DrahtBot Guix build requested on Nov 15, 2023
  6. hebasto commented at 11:31 am on November 15, 2023: member

    this PR also unblocks #28622 (C++20)

    … due to this commit that fixes Qt package build.

  7. fanquake commented at 11:48 am on November 15, 2023: member

    From Guix build logs it follows that Clang 15.0.7 is used. Not Clang 17?

    I don’t think so? If that was the case the Guix builds in #28622 would be failing to build Qt? They are currently working with the most recent push, and addition of -platform_version.

  8. hebasto commented at 12:02 pm on November 15, 2023: member

    From Guix build logs it follows that Clang 15.0.7 is used. Not Clang 17?

    I don’t think so?

    Right. There was a wrong build setup on my side. Sorry for the noise.

  9. hebasto commented at 12:13 pm on November 15, 2023: member

    My Guix builds:

    0x86_64
    134e5ff49486a0777be8c0cba514a0de0e010573ada67c4e7fc0d5f46b4489ac2  guix-build-1a9d3eb54ba0/output/arm64-apple-darwin/SHA256SUMS.part
    2c0b4a1b61a9b65c1765fbf33b1c0ea53b1f6aeb5efd5e3a2051f193f34f345fd  guix-build-1a9d3eb54ba0/output/arm64-apple-darwin/bitcoin-1a9d3eb54ba0-arm64-apple-darwin-unsigned.tar.gz
    3911b8fa0cdc61195e96c479b5173b333f9efa647cbc71ef499284905ef3e1e1b  guix-build-1a9d3eb54ba0/output/arm64-apple-darwin/bitcoin-1a9d3eb54ba0-arm64-apple-darwin-unsigned.zip
    46d923922da2690b0e057b5e6311dfea178bcfa7b57bdd1b07ab6b33420bc5f8c  guix-build-1a9d3eb54ba0/output/arm64-apple-darwin/bitcoin-1a9d3eb54ba0-arm64-apple-darwin.tar.gz
    53f049d21a4102125285d22d4a8254aee610cb27aa2420c5d8963641e98d9ca82  guix-build-1a9d3eb54ba0/output/dist-archive/bitcoin-1a9d3eb54ba0.tar.gz
    68f3ce1981dd866e4406a20b88a156f50ce361b612a364b7716452211d257f174  guix-build-1a9d3eb54ba0/output/x86_64-apple-darwin/SHA256SUMS.part
    74ec15175a10cdda529323468eb013b457ebaaeecbcbebf8b137dbeab6d60120d  guix-build-1a9d3eb54ba0/output/x86_64-apple-darwin/bitcoin-1a9d3eb54ba0-x86_64-apple-darwin-unsigned.tar.gz
    8b42232cca761c261ff88eaaef1f67ac5db57402b93d836579e6c875cc35a4b94  guix-build-1a9d3eb54ba0/output/x86_64-apple-darwin/bitcoin-1a9d3eb54ba0-x86_64-apple-darwin-unsigned.zip
    9b5f2396c0928ca70fb6494b3345f94cd25672e9ea91a5478631a5acddb26248c  guix-build-1a9d3eb54ba0/output/x86_64-apple-darwin/bitcoin-1a9d3eb54ba0-x86_64-apple-darwin.tar.gz
    
  10. hebasto commented at 12:15 pm on November 15, 2023: member
    Guix hashes for arm64-apple-darwin differs across the build platforms, unfortunately.
  11. fanquake force-pushed on Nov 15, 2023
  12. fanquake commented at 5:31 pm on November 15, 2023: member
    Removed LDFLAGS=-Wno-error=unused-command-line-argument from the CI in the depends bump commit. Also added a commit to remove the no-longer used pyhton3-setuptools dep. Also rebsaed on recent merges. Still have to investigate the non-determinism.
  13. DrahtBot commented at 8:33 pm on November 15, 2023: contributor

    Guix builds (on x86_64)

    File commit a73715e5a48c9651720f45a43e4ac5be204201c4(master) commit 5dacd798d8d7d524ac71649a615ea48a736f7ca6(master and this pull)
    SHA256SUMS.part d118fb1ee94f7477... 9d2624c62d93e44e...
    *-aarch64-linux-gnu-debug.tar.gz fddb55afeab56ace... 013fca08df3c9f11...
    *-aarch64-linux-gnu.tar.gz 7480a14c741422e2... 6c6260ebcc3bb93b...
    *-arm-linux-gnueabihf-debug.tar.gz 64d300a1ae2c888e... e1b4a9405692bb06...
    *-arm-linux-gnueabihf.tar.gz 8d1ebbf4368b3600... 8d9e1b521f3e7380...
    *-arm64-apple-darwin-unsigned.tar.gz 92facb464ba137dc... bdab314df74dc720...
    *-arm64-apple-darwin-unsigned.zip 2a2df1315b35b63a... 5664ada4cfd7dfec...
    *-arm64-apple-darwin.tar.gz f6ae0d227a86283b... 4ca8eb5502168495...
    *-powerpc64-linux-gnu-debug.tar.gz e298c0bfb516dada... 18c13a3f12b0ef38...
    *-powerpc64-linux-gnu.tar.gz be05549bd5ef4dc6... bbe019b3e1e2d40d...
    *-powerpc64le-linux-gnu-debug.tar.gz 3d9344a835e7b239... abcc4014c76d99e2...
    *-powerpc64le-linux-gnu.tar.gz 13d301cec56f0aa8... f9db2334eef8bdfa...
    *-riscv64-linux-gnu-debug.tar.gz 3033c2c4c6cc67cf... 630626d9f8949eb3...
    *-riscv64-linux-gnu.tar.gz 34a33f35b305dc1d... 5bc1d65b208c299c...
    *-x86_64-apple-darwin-unsigned.tar.gz d7eb0d12f1508e6f... 8ee087635bf907a3...
    *-x86_64-apple-darwin-unsigned.zip e0e9a8f7507975c5... 3a8e86518b028ae9...
    *-x86_64-apple-darwin.tar.gz 2652e587357439b4... 0b54b017ca15bdba...
    *-x86_64-linux-gnu-debug.tar.gz 4f40b27fabad419d... 35cdfb2032f8a6f1...
    *-x86_64-linux-gnu.tar.gz d3641191fc2b7899... c6957209926a2d1c...
    *.tar.gz 2a328641c577f4e4... df5d4f3f78e33930...
    guix_build.log 5378b965f34dacc7... 46edefcdf5f8a710...
    guix_build.log.diff f6030295d3b19646...
  14. DrahtBot removed the label DrahtBot Guix build requested on Nov 15, 2023
  15. fanquake commented at 1:20 pm on November 16, 2023: member

    Guix hashes for arm64-apple-darwin differs across the build platforms, unfortunately.

    Looks like the difference is only in bitcoin-qt. I’ll check if reverting #28778 (dropping the -O1 workaround) makes things deterministic again. That would be disappointing, and a bit confusing, because it’d mean that things were non-deterministic, then became deterministic with newer Clang, and then went non-deterministic again with an even newer Clang..

  16. fanquake commented at 1:26 pm on November 16, 2023: member

    The diff I see between the two bins is:

      0--- a.txt
      1+++ b.txt
      2@@ -1,8 +1,8 @@
      3-bitcoin-f387bc0783ba_aarch64/bin/bitcoin-qt:
      4+bitcoin-f387bc0783ba_x86_64/bin/bitcoin-qt:
      5 (__TEXT,__text) section
      6 0000000100017364	bti	c
      7 0000000100017368	sub	sp, sp, [#0](/bitcoin-bitcoin/0/)x30
      8 000000010001736c	stp	x20, x19, [sp, [#0](/bitcoin-bitcoin/0/)x10]
      9 0000000100017370	stp	x29, x30, [sp, [#0](/bitcoin-bitcoin/0/)x20]
     10 0000000100017374	add	x29, sp, [#0](/bitcoin-bitcoin/0/)x20
     11 0000000100017378	mov	x19, x0
     12@@ -2987768,31 +2987768,31 @@
     13 0000000100b7cf38	sub	w9, w9, w8
     14 0000000100b7cf3c	cmp	w9, [#0](/bitcoin-bitcoin/0/)x10
     15 0000000100b7cf40	b.lo	0x100b7cfb8
     16 0000000100b7cf44	and	w10, w9, [#0](/bitcoin-bitcoin/0/)xfffffff0
     17 0000000100b7cf48	add	w8, w8, w10
     18 0000000100b7cf4c	movi.4s	v0, [#0](/bitcoin-bitcoin/0/)x1
     19 0000000100b7cf50	movi.4s	v1, [#0](/bitcoin-bitcoin/0/)x1
     20-0000000100b7cf54	mov.s	v1[0], w19
     21+0000000100b7cf54	mov.s	v1[1], w19
     22 0000000100b7cf58	movi.4s	v2, [#0](/bitcoin-bitcoin/0/)x3c
     23 0000000100b7cf5c	mov	x11, x10
     24 0000000100b7cf60	movi.4s	v3, [#0](/bitcoin-bitcoin/0/)x1
     25 0000000100b7cf64	movi.4s	v4, [#0](/bitcoin-bitcoin/0/)x1
     26 0000000100b7cf68	mul.4s	v1, v1, v2
     27 0000000100b7cf6c	mul.4s	v0, v0, v2
     28 0000000100b7cf70	mul.4s	v3, v3, v2
     29 0000000100b7cf74	mul.4s	v4, v4, v2
     30 0000000100b7cf78	subs	w11, w11, [#0](/bitcoin-bitcoin/0/)x10
     31 0000000100b7cf7c	b.ne	0x100b7cf68
     32 0000000100b7cf80	uzp2.4s	v2, v3, v4
     33 0000000100b7cf84	uzp1.4s	v3, v3, v4
     34 0000000100b7cf88	uzp2.4s	v4, v1, v0
     35 0000000100b7cf8c	uzp1.4s	v0, v1, v0
     36-0000000100b7cf90	mul.4s	v0, v3, v0
     37-0000000100b7cf94	mul.4s	v1, v2, v4
     38+0000000100b7cf90	mul.4s	v0, v0, v4
     39+0000000100b7cf94	mul.4s	v1, v2, v3
     40 0000000100b7cf98	mul.4s	v0, v1, v0
     41 0000000100b7cf9c	ext.16b	v1, v0, v0, [#0](/bitcoin-bitcoin/0/)x8
     42 0000000100b7cfa0	mul.2s	v0, v0, v1
     43 0000000100b7cfa4	mov.s	w11, v0[1]
     44 0000000100b7cfa8	fmov	w12, s0
     45 0000000100b7cfac	mul	w19, w12, w11
     46 0000000100b7cfb0	cmp	w9, w10
     47@@ -2994717,30 +2994717,30 @@
     48 0000000100b83bcc	sub	w11, w25, w23
     49 0000000100b83bd0	and	w10, w9, [#0](/bitcoin-bitcoin/0/)xfffffff0
     50 0000000100b83bd4	and	w8, w28, [#0](/bitcoin-bitcoin/0/)xfffffff0
     51 0000000100b83bd8	add	w8, w8, w23
     52 0000000100b83bdc	and	w11, w11, [#0](/bitcoin-bitcoin/0/)xfffffff0
     53 0000000100b83be0	movi.4s	v0, [#0](/bitcoin-bitcoin/0/)x1
     54 0000000100b83be4	movi.4s	v1, [#0](/bitcoin-bitcoin/0/)x1
     55-0000000100b83be8	mov.s	v1[0], w24
     56-0000000100b83bec	movi.4s	v2, [#0](/bitcoin-bitcoin/0/)xa
     57-0000000100b83bf0	movi.4s	v3, [#0](/bitcoin-bitcoin/0/)x1
     58+0000000100b83be8	mov.s	v1[1], w24
     59+0000000100b83bec	movi.4s	v3, [#0](/bitcoin-bitcoin/0/)xa
     60+0000000100b83bf0	movi.4s	v2, [#0](/bitcoin-bitcoin/0/)x1
     61 0000000100b83bf4	movi.4s	v4, [#0](/bitcoin-bitcoin/0/)x1
     62-0000000100b83bf8	mul.4s	v1, v1, v2
     63-0000000100b83bfc	mul.4s	v0, v0, v2
     64-0000000100b83c00	mul.4s	v3, v3, v2
     65-0000000100b83c04	mul.4s	v4, v4, v2
     66+0000000100b83bf8	mul.4s	v0, v0, v3
     67+0000000100b83bfc	mul.4s	v2, v2, v3
     68+0000000100b83c00	mul.4s	v1, v1, v3
     69+0000000100b83c04	mul.4s	v4, v4, v3
     70 0000000100b83c08	subs	w11, w11, [#0](/bitcoin-bitcoin/0/)x10
     71 0000000100b83c0c	b.ne	0x100b83bf8
     72-0000000100b83c10	uzp1.4s	v2, v3, v4
     73-0000000100b83c14	uzp2.4s	v3, v3, v4
     74-0000000100b83c18	uzp2.4s	v4, v1, v0
     75-0000000100b83c1c	uzp1.4s	v0, v1, v0
     76-0000000100b83c20	mul.4s	v0, v3, v0
     77-0000000100b83c24	mul.4s	v1, v2, v4
     78+0000000100b83c10	uzp1.4s	v3, v1, v4
     79+0000000100b83c14	uzp2.4s	v1, v1, v4
     80+0000000100b83c18	uzp1.4s	v4, v0, v2
     81+0000000100b83c1c	uzp2.4s	v0, v0, v2
     82+0000000100b83c20	mul.4s	v0, v0, v1
     83+0000000100b83c24	mul.4s	v1, v3, v4
     84 0000000100b83c28	mul.4s	v0, v1, v0
     85 0000000100b83c2c	ext.16b	v1, v0, v0, [#0](/bitcoin-bitcoin/0/)x8
     86 0000000100b83c30	mul.2s	v0, v0, v1
     87 0000000100b83c34	mov.s	w11, v0[1]
     88 0000000100b83c38	fmov	w12, s0
     89 0000000100b83c3c	mul	w24, w12, w11
     90 0000000100b83c40	cmp	w9, w10
     91@@ -3119330,16 +3119330,16 @@
     92 0000000100bfd6e0	add.2d	v5, v5, v1
     93 0000000100bfd6e4	add.2d	v4, v4, v1
     94 0000000100bfd6e8	stp	q2, q2, [x11], [#0](/bitcoin-bitcoin/0/)x40
     95 0000000100bfd6ec	subs	x13, x13, [#0](/bitcoin-bitcoin/0/)x8
     96 0000000100bfd6f0	b.ne	0x100bfd6c4
     97 0000000100bfd6f4	zip1.2d	v1, v4, v5
     98 0000000100bfd6f8	zip2.2d	v2, v4, v5
     99-0000000100bfd6fc	zip2.2d	v4, v0, v3
    100-0000000100bfd700	zip1.2d	v0, v0, v3
    101+0000000100bfd6fc	zip1.2d	v4, v0, v3
    102+0000000100bfd700	zip2.2d	v0, v0, v3
    103 0000000100bfd704	add.2d	v0, v0, v2
    104 0000000100bfd708	add.2d	v1, v1, v4
    105 0000000100bfd70c	add.2d	v0, v1, v0
    106 0000000100bfd710	addp.2d	d0, v0
    107 0000000100bfd714	fmov	x11, d0
    108 0000000100bfd718	cmp	x9, x10
    109 0000000100bfd71c	b.ne	0x100bfd43c
    110@@ -3119370,17 +3119370,17 @@
    111 0000000100bfd780	add.2d	v5, v5, v1
    112 0000000100bfd784	add.2d	v4, v4, v1
    113 0000000100bfd788	stp	q2, q2, [x11], [#0](/bitcoin-bitcoin/0/)x40
    114 0000000100bfd78c	subs	x13, x13, [#0](/bitcoin-bitcoin/0/)x8
    115 0000000100bfd790	b.ne	0x100bfd764
    116 0000000100bfd794	zip2.2d	v1, v4, v5
    117 0000000100bfd798	zip1.2d	v2, v4, v5
    118-0000000100bfd79c	zip2.2d	v4, v0, v3
    119-0000000100bfd7a0	zip1.2d	v0, v0, v3
    120-0000000100bfd7a4	add.2d	v0, v0, v2
    121+0000000100bfd79c	zip1.2d	v4, v0, v3
    122+0000000100bfd7a0	zip2.2d	v0, v0, v3
    123+0000000100bfd7a4	add.2d	v0, v2, v0
    124 0000000100bfd7a8	add.2d	v1, v1, v4
    125 0000000100bfd7ac	add.2d	v0, v1, v0
    126 0000000100bfd7b0	addp.2d	d0, v0
    127 0000000100bfd7b4	fmov	x11, d0
    128 0000000100bfd7b8	cmp	x10, x9
    129 0000000100bfd7bc	b.ne	0x100bfd4f0
    130 0000000100bfd7c0	add	x8, x19, x9, lsl [#3](/bitcoin-bitcoin/3/)
    131@@ -3563823,19 +3563823,19 @@
    132 0000000100daf814	movi.4s	v4, [#0](/bitcoin-bitcoin/0/)x1
    133 0000000100daf818	mul.4s	v0, v0, v2
    134 0000000100daf81c	mul.4s	v1, v1, v2
    135 0000000100daf820	mul.4s	v3, v3, v2
    136 0000000100daf824	mul.4s	v4, v4, v2
    137 0000000100daf828	subs	w11, w11, [#0](/bitcoin-bitcoin/0/)x10
    138 0000000100daf82c	b.ne	0x100daf818
    139-0000000100daf830	uzp2.4s	v2, v3, v4
    140-0000000100daf834	uzp1.4s	v3, v3, v4
    141-0000000100daf838	uzp2.4s	v4, v0, v1
    142-0000000100daf83c	uzp1.4s	v0, v0, v1
    143-0000000100daf840	mul.4s	v0, v3, v0
    144+0000000100daf830	uzp1.4s	v2, v3, v4
    145+0000000100daf834	uzp2.4s	v3, v3, v4
    146+0000000100daf838	uzp1.4s	v4, v0, v1
    147+0000000100daf83c	uzp2.4s	v0, v0, v1
    148+0000000100daf840	mul.4s	v0, v0, v3
    149 0000000100daf844	mul.4s	v1, v2, v4
    150 0000000100daf848	mul.4s	v0, v1, v0
    151 0000000100daf84c	ext.16b	v1, v0, v0, [#0](/bitcoin-bitcoin/0/)x8
    152 0000000100daf850	mul.2s	v0, v0, v1
    153 0000000100daf854	mov.s	w11, v0[1]
    154 0000000100daf858	fmov	w12, s0
    155 0000000100daf85c	mul	w11, w12, w11
    156@@ -3563876,17 +3563876,17 @@
    157 0000000100daf8e8	mul.4s	v1, v1, v2
    158 0000000100daf8ec	mul.4s	v3, v3, v2
    159 0000000100daf8f0	mul.4s	v4, v4, v2
    160 0000000100daf8f4	subs	w10, w10, [#0](/bitcoin-bitcoin/0/)x10
    161 0000000100daf8f8	b.ne	0x100daf8e4
    162 0000000100daf8fc	uzp2.4s	v2, v3, v4
    163 0000000100daf900	uzp1.4s	v3, v3, v4
    164-0000000100daf904	uzp2.4s	v4, v0, v1
    165-0000000100daf908	uzp1.4s	v0, v0, v1
    166-0000000100daf90c	mul.4s	v0, v3, v0
    167+0000000100daf904	uzp1.4s	v4, v0, v1
    168+0000000100daf908	uzp2.4s	v0, v0, v1
    169+0000000100daf90c	mul.4s	v0, v0, v3
    170 0000000100daf910	mul.4s	v1, v2, v4
    171 0000000100daf914	mul.4s	v0, v1, v0
    172 0000000100daf918	ext.16b	v1, v0, v0, [#0](/bitcoin-bitcoin/0/)x8
    173 0000000100daf91c	mul.2s	v0, v0, v1
    174 0000000100daf920	mov.s	w10, v0[1]
    175 0000000100daf924	fmov	w11, s0
    176 0000000100daf928	mul	w10, w11, w10
    177@@ -4194297,8 +4194297,8 @@
    178 000000010101733c	sub	x11, x11, x10
    179 0000000101017340	add	x11, x11, [#0](/bitcoin-bitcoin/0/)x10
    180 0000000101017344	str	x11, [x9, x10]
    181 0000000101017348	b	0x1010173f0
    182 000000010101734c	ldr	w8, [x20, [#0](/bitcoin-bitcoin/0/)x28]
    183 0000000101017350	add	w8, w8, [#0](/bitcoin-bitcoin/0/)x1
    184 0000000101017354	str	w8, [x20, [#0](/bitcoin-bitcoin/0/)x28]
    
  17. fanquake commented at 2:19 pm on November 16, 2023: member

    I’ll check if reverting #28778 (dropping the -O1 workaround) makes things deterministic again.

    It does not. Building this branch: https://github.com/fanquake/bitcoin/tree/llvm_17_0_5_macos_deps_test, still results in non-deterministic binaries.

  18. fanquake force-pushed on Nov 24, 2023
  19. fanquake force-pushed on Nov 27, 2023
  20. fanquake force-pushed on Nov 28, 2023
  21. fanquake commented at 4:21 pm on November 28, 2023: member

    In _QUtcTimeZonePrivate::offsetFromUtcString(QByteArray const&), which exists in corelib:

     0-bitcoin-qt_aarch64:	file format mach-o arm64
     1+bitcoin-qt_x86_64:	file format mach-o arm64
     2 
     3 Disassembly of section __TEXT,__text:
     4 
     5 0000000100b78e48 <__ZN19QUtcTimeZonePrivate19offsetFromUtcStringERK10QByteArray>:
     6 100b78e48: d10143ff    	sub	sp, sp, [#80](/bitcoin-bitcoin/80/)
     7 100b78e4c: a9015ff8    	stp	x24, x23, [sp, [#16](/bitcoin-bitcoin/16/)]
     8 100b78e50: a90257f6    	stp	x22, x21, [sp, [#32](/bitcoin-bitcoin/32/)]
     9@@ -156,16 +156,16 @@
    10 100b7909c: 4f000424    	movi.4s	v4, [#1](/bitcoin-bitcoin/1/)
    11 100b790a0: 4ea29c21    	mul.4s	v1, v1, v2
    12 100b790a4: 4ea29c00    	mul.4s	v0, v0, v2
    13 100b790a8: 4ea29c63    	mul.4s	v3, v3, v2
    14 100b790ac: 4ea29c84    	mul.4s	v4, v4, v2
    15 100b790b0: 7100416b    	subs	w11, w11, [#16](/bitcoin-bitcoin/16/)
    16 100b790b4: 54ffff61    	b.ne	0x100b790a0 <__ZN19QUtcTimeZonePrivate19offsetFromUtcStringERK10QByteArray+0x258>
    17-100b790b8: 4e845862    	uzp2.4s	v2, v3, v4
    18-100b790bc: 4e841863    	uzp1.4s	v3, v3, v4
    19+100b790b8: 4e841862    	uzp1.4s	v2, v3, v4
    20+100b790bc: 4e845863    	uzp2.4s	v3, v3, v4
    21 100b790c0: 4e801824    	uzp1.4s	v4, v1, v0
    22 100b790c4: 4e805820    	uzp2.4s	v0, v1, v0
    23 100b790c8: 4ea09c60    	mul.4s	v0, v3, v0
    24 100b790cc: 4ea49c41    	mul.4s	v1, v2, v4
    25 100b790d0: 4ea09c20    	mul.4s	v0, v1, v0
    26 100b790d4: 6e004001    	ext.16b	v1, v0, v0, [#8](/bitcoin-bitcoin/8/)
    27 100b790d8: 0ea19c00    	mul.2s	v0, v0, v1
    
  22. maflcko commented at 10:13 am on November 30, 2023: member
    Would there be any downside in going forward with #28851 instead, and then reverting it as part of this pull, once and if it is ready?
  23. fanquake commented at 8:26 pm on December 1, 2023: member
    I was hoping we’d figure out all the determinism issues in Qt, but I guess C++20 also doesn’t want to wait much longer. I’ll add a reversion of #28851 here.
  24. fanquake force-pushed on Dec 1, 2023
  25. fanquake force-pushed on Dec 5, 2023
  26. fanquake commented at 12:11 pm on December 5, 2023: member
    Updated to LLVM 17.0.6 in depends and based on top of #28622. Also sent a patch to update LLVM in Guix to 17.0.6: https://lists.gnu.org/archive/html/guix-patches/2023-12/msg00226.html.
  27. maflcko commented at 5:10 pm on December 6, 2023: member

    Building 17.0.5 failed for me on riscv64: /var/log/guix/drvs/9k/xxqy3shpf5b3ajmw1ar2zrbm2a8pyp-llvm-17.0.5.drv.gz:

     0...
     1[ 93%] Linking CXX executable ../../bin/dsymutil
     2cd /tmp/guix-build-llvm-17.0.5.drv-0/source/build/tools/dsymutil && /gnu/store/v9d5kgjpkcgfwc5k1jsq8a6i2qxmp9fw-cmake-minimal-3.24.2/bin/cmake -E cmake_link_script CMakeFiles/dsymutil.dir/link.txt --verbose=1
     3/gnu/store/dcrdgy1rjkh0kibpkw6v2mia7f921b27-gcc-11.3.0/bin/c++  -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,--gc-sections CMakeFiles/dsymutil.dir/dsymutil.cpp.o CMakeFiles/dsymutil.dir/BinaryHolder.cpp.o CMakeFiles/dsymutil.dir/CFBundle.cpp.o CMakeFiles/dsymutil.dir/DebugMap.cpp.o CMakeFiles/dsymutil.dir/DwarfLinkerForBinary.cpp.o CMakeFiles/dsymutil.dir/MachODebugMapParser.cpp.o CMakeFiles/dsymutil.dir/MachOUtils.cpp.o CMakeFiles/dsymutil.dir/Reproducer.cpp.o CMakeFiles/dsymutil.dir/SymbolMap.cpp.o -o ../../bin/dsymutil  -Wl,-rpath,/tmp/guix-build-llvm-17.0.5.drv-0/source/build/lib::::::::: ../../lib/libLLVM-17.so
     4ld: CMakeFiles/dsymutil.dir/dsymutil.cpp.o: undefined reference to symbol '__atomic_fetch_and_1@@LIBATOMIC_1.0'
     5ld: /gnu/store/hs6g34kf7z2sdc7sc60ngkdnysy782bl-gcc-11.3.0-lib/lib/libatomic.so.1: error adding symbols: DSO missing from command line
     6collect2: error: ld returned 1 exit status
     7make[2]: *** [tools/dsymutil/CMakeFiles/dsymutil.dir/build.make:229: bin/dsymutil] Error 1
     8make[2]: Leaving directory '/tmp/guix-build-llvm-17.0.5.drv-0/source/build'
     9make[1]: *** [CMakeFiles/Makefile2:30805: tools/dsymutil/CMakeFiles/dsymutil.dir/all] Error 2
    10make[1]: *** Waiting for unfinished jobs....
    
  28. fanquake commented at 5:38 pm on December 6, 2023: member

    Building 17.0.5 failed for me on riscv64:

    Nice. Glad we’ve now got Guix on RISC-V. I guess this is either a bug in LLVM (i.e a missing an -latomic), or in the combination of GCC 11 & LLVM 17. Will take a look.

  29. maflcko commented at 5:41 pm on December 6, 2023: member
    I’ll also try to reproduce outside of my riscv64 metal, because it is currently a bit slow and faster CPUs will only hit the market next year (or so).
  30. maflcko commented at 6:20 pm on December 6, 2023: member

    Jup, same error with cross-compilation:

     0$ guix time-machine --commit=3778f778c37110460dd78088200cbd05eb0c49e4 -- build --target=riscv64-linux-gnu  llvm
     1...
     2[ 89%] Linking CXX executable ../../bin/dsymutil
     3cd /tmp/guix-build-llvm-17.0.5.drv-0/source/build/tools/dsymutil && /gnu/store/ag7sflxmy9fpqxdrgwk6rlynvdxy5695-cmake-minimal-cross-3.24.2/bin/cmake -E cmake_link_script CMakeFiles/dsymutil.dir/link.txt --verbose=1
     4[ 89%] Building CXX object tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/llvm-isel-fuzzer.cpp.o
     5cd /tmp/guix-build-llvm-17.0.5.drv-0/source/build/tools/llvm-isel-fuzzer && /gnu/store/0n1bgyj2bppi20hxg7lyayzcmrhhfqlf-gcc-cross-riscv64-linux-gnu-11.3.0/bin/riscv64-linux-gnu-g++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/tmp/guix-build-llvm-17.0.5.drv-0/source/build/tools/llvm-isel-fuzzer -I/tmp/guix-build-llvm-17.0.5.drv-0/source/llvm/tools/llvm-isel-fuzzer -I/tmp/guix-build-llvm-17.0.5.drv-0/source/build/include -I/tmp/guix-build-llvm-17.0.5.drv-0/source/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -std=c++17 -MD -MT tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/llvm-isel-fuzzer.cpp.o -MF CMakeFiles/llvm-isel-fuzzer.dir/llvm-isel-fuzzer.cpp.o.d -o CMakeFiles/llvm-isel-fuzzer.dir/llvm-isel-fuzzer.cpp.o -c /tmp/guix-build-llvm-17.0.5.drv-0/source/llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
     6/gnu/store/0n1bgyj2bppi20hxg7lyayzcmrhhfqlf-gcc-cross-riscv64-linux-gnu-11.3.0/bin/riscv64-linux-gnu-g++  -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,--gc-sections CMakeFiles/dsymutil.dir/dsymutil.cpp.o CMakeFiles/dsymutil.dir/BinaryHolder.cpp.o CMakeFiles/dsymutil.dir/CFBundle.cpp.o CMakeFiles/dsymutil.dir/DebugMap.cpp.o CMakeFiles/dsymutil.dir/DwarfLinkerForBinary.cpp.o CMakeFiles/dsymutil.dir/MachODebugMapParser.cpp.o CMakeFiles/dsymutil.dir/MachOUtils.cpp.o CMakeFiles/dsymutil.dir/Reproducer.cpp.o CMakeFiles/dsymutil.dir/SymbolMap.cpp.o -o ../../bin/dsymutil  -Wl,-rpath,/tmp/guix-build-llvm-17.0.5.drv-0/source/build/lib::::::::: ../../lib/libLLVM-17.so 
     7riscv64-linux-gnu-ld: CMakeFiles/dsymutil.dir/dsymutil.cpp.o: undefined reference to symbol '__atomic_fetch_and_1@@LIBATOMIC_1.0'
     8riscv64-linux-gnu-ld: /gnu/store/ls1i9sv07ay1g1mwlr9xknq2p2mhc6ip-gcc-cross-riscv64-linux-gnu-11.3.0-lib/riscv64-linux-gnu/lib/libatomic.so.1: error adding symbols: DSO missing from command line
     9collect2: error: ld returned 1 exit status
    10make[2]: *** [tools/dsymutil/CMakeFiles/dsymutil.dir/build.make:229: bin/dsymutil] Error 1
    11make[2]: Leaving directory '/tmp/guix-build-llvm-17.0.5.drv-0/source/build'
    12make[1]: *** [CMakeFiles/Makefile2:18702: tools/dsymutil/CMakeFiles/dsymutil.dir/all] Error 2
    13make[1]: *** Waiting for unfinished jobs....
    14...
    15[ 89%] Built target llvm-cov
    16make[1]: Leaving directory '/tmp/guix-build-llvm-17.0.5.drv-0/source/build'
    17make: *** [Makefile:159: all] Error 2
    18error: in phase 'build': uncaught exception:
    19%exception #<&invoke-error program: "make" arguments: ("-j" "8") exit-status: 2 term-signal: #f stop-signal: #f> 
    20phase `build' failed after 2737.0 seconds
    21command "make" "-j" "8" failed with status 2
    22builder for `/gnu/store/z1y8k3l0mls4m5js6rxza5w8v3zmps1v-llvm-17.0.5.drv' failed with exit code 1
    23build of /gnu/store/z1y8k3l0mls4m5js6rxza5w8v3zmps1v-llvm-17.0.5.drv failed
    24View build log at '/var/log/guix/drvs/z1/y8k3l0mls4m5js6rxza5w8v3zmps1v-llvm-17.0.5.drv.gz'.
    25guix build: error: build of `/gnu/store/z1y8k3l0mls4m5js6rxza5w8v3zmps1v-llvm-17.0.5.drv' failed
    
  31. maflcko commented at 8:35 am on December 7, 2023: member

    or in the combination of GCC 11 & LLVM 17

    Tried testing this on Jammy, but it seemed fine, or maybe I did something wrong?

     0# riscv64-linux-gnu-g++ --version 
     1riscv64-linux-gnu-g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
     2Copyright (C) 2021 Free Software Foundation, Inc.
     3This is free software; see the source for copying conditions.  There is NO
     4warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     5
     6
     7# ninja -C build dsymutil 
     8ninja: Entering directory `build'
     9ninja: no work to do.
    10
    11
    12# file build/bin/dsymutil
    13build/bin/dsymutil: ELF 64-bit LSB pie executable, UCB RISC-V, RVC, double-float ABI, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, BuildID[sha1]=9c0a0894a122935b4bf0d048b8f29016008d09a2, for GNU/Linux 4.15.0, not stripped
    

    Install steps:

    0export DEBIAN_FRONTEND=noninteractive && apt update && apt install curl wget htop git vim ccache -y && git clone --depth=1 https://github.com/llvm/llvm-project && cd ./llvm-project && apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 cmake ninja-build python3-distutils  g++-riscv64-linux-gnu binutils-riscv64-linux-gnu  -y
    

    Cmake:

    0CC=riscv64-linux-gnu-gcc CXX=riscv64-linux-gnu-g++ cmake -S llvm -B build -G Ninja -DCMAKE_SYSTEM_NAME=Linux -DLLVM_HOST_TRIPLE=riscv64-linux-gnu -DLLVM_TARGETS_TO_BUILD=RISCV -DCMAKE_CXX_COMPILER_LAUNCHER=ccache  -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_TESTS=ON -DLLVM_PARALLEL_LINK_JOBS=1 -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS='clang'
    
  32. fanquake commented at 9:33 am on December 8, 2023: member
    Ok. I think this was broken in 17.x, in this change https://github.com/llvm/llvm-project/commit/1f173a0653e7f0c3800033edfa16ffe4c35cde85 (atomic lib removed from dsymutil). You should be able to build 16.x. i.e guix build --target=riscv64-linux-gnu llvm@16.0.6, that works for me, where 17.x fails. This is something we should be able to fixup/patch around.
  33. maflcko commented at 9:45 am on December 8, 2023: member

    See also https://reviews.llvm.org/D137799#4657404

    Did you have steps to reproduce outside of guix?

  34. fanquake force-pushed on Dec 8, 2023
  35. fanquake commented at 11:46 am on December 8, 2023: member

    Did you have steps to reproduce outside of guix?

    Not yet. Will get some, and open an issue upstream.

  36. fanquake force-pushed on Dec 11, 2023
  37. fanquake commented at 2:48 pm on December 11, 2023: member

    Also sent a patch to update LLVM in Guix to 17.0.6: https://lists.gnu.org/archive/html/guix-patches/2023-12/msg00226.html.

    This landed, so will use LLVM 17.0.6 in Guix now as well.

  38. maflcko commented at 3:18 pm on December 11, 2023: member
    Maybe keep in draft, for as long as it is not reproducible?
  39. fanquake marked this as a draft on Dec 12, 2023
  40. fanquake force-pushed on Dec 18, 2023
  41. fanquake force-pushed on Dec 20, 2023
  42. fanquake force-pushed on Dec 20, 2023
  43. DrahtBot added the label CI failed on Dec 20, 2023
  44. fanquake commented at 11:01 am on December 20, 2023: member

    Added more patching to Qt. There is one issue left to fixup:

    0_void std::__1::__buffered_inplace_merge[abi:v160006]<std::__1::_ClassicAlgPolicy, bool (*&)(QPersistentModelIndex const&, QPersistentModelIndex const&), QPersistentModelIndex*>(QPersistentModelIndex*, QPersistentModelIndex*, QPersistentModelIndex*, bool (*&)(QPersistentModelIndex const&, QPersistentModelIndex const&), std::__1::iterator_traits<QPersistentModelIndex*>::difference_type, std::__1::iterator_traits<QPersistentModelIndex*>::difference_type, std::__1::iterator_traits<QPersistentModelIndex*>::value_type*)
    
     0< bitcoin_qt_aarch64:     file format mach-o-arm64
     1---
     2> bitcoin_qt_x86_64:     file format mach-o-arm64
     33190905,3190906c3190905,3190906
     4<    100c0a5b0:	4ec33804 	zip1	v4.2d, v0.2d, v3.2d
     5<    100c0a5b4:	4ec37800 	zip2	v0.2d, v0.2d, v3.2d
     6---
     7>    100c0a5b0:	4ec37804 	zip2	v4.2d, v0.2d, v3.2d
     8>    100c0a5b4:	4ec33800 	zip1	v0.2d, v0.2d, v3.2d
     93190945,3190948c3190945,3190948
    10<    100c0a650:	4ec37804 	zip2	v4.2d, v0.2d, v3.2d
    11<    100c0a654:	4ec33800 	zip1	v0.2d, v0.2d, v3.2d
    12<    100c0a658:	4ee08440 	add	v0.2d, v2.2d, v0.2d
    13<    100c0a65c:	4ee48421 	add	v1.2d, v1.2d, v4.2d
    14---
    15>    100c0a650:	4ec33804 	zip1	v4.2d, v0.2d, v3.2d
    16>    100c0a654:	4ec37800 	zip2	v0.2d, v0.2d, v3.2d
    17>    100c0a658:	4ee48400 	add	v0.2d, v0.2d, v4.2d
    18>    100c0a65c:	4ee28421 	add	v1.2d, v1.2d, v2.2d
    
  45. DrahtBot removed the label CI failed on Dec 20, 2023
  46. build: Bump `native_clang` up to 17.0.6 5ddd7c65b4
  47. guix: use clang-toolchain-17 for macOS build
    Version is 17.0.6.
    558250dec1
  48. Revert "build: Patch Qt to handle minimum macOS version properly"
    This reverts commit 05aca093819be276ac7d648472c6ed5c7d235cc5.
    b0c290340c
  49. build: rename native_clang to native_llvm
    This is more correct, as this is downloading LLVM, and already unpacking
    and using more than just clang.
    e8ecec4575
  50. depends: patch around non-determinism in qt b335710782
  51. fanquake force-pushed on Dec 21, 2023
  52. fanquake marked this as ready for review on Dec 21, 2023
  53. fanquake commented at 1:53 pm on December 21, 2023: member

    Guix build (x86_64 & aarch64):

     065981453fcb83338ed76435dc8fed06e9903441731b461e4f2c8a04ad102043c  guix-build-b335710782c2/output/aarch64-linux-gnu/SHA256SUMS.part
     13127d18bc55a7a207eb7e1252feaf24f767d5983e5d064323671139659c4f3d7  guix-build-b335710782c2/output/aarch64-linux-gnu/bitcoin-b335710782c2-aarch64-linux-gnu-debug.tar.gz
     20a67737c010e742249f07dd3ca3ae289df02edf2dedd8d6a5a07b291921bab47  guix-build-b335710782c2/output/aarch64-linux-gnu/bitcoin-b335710782c2-aarch64-linux-gnu.tar.gz
     37c315f9ccda8bffd4fd70bb51a1342d300e6039791d7e8a953ff1252d05c55b8  guix-build-b335710782c2/output/arm-linux-gnueabihf/SHA256SUMS.part
     4b677023cff7c2f82d01393616a4029aeb2b58d4c524b2241bf4d62c7e218f2b2  guix-build-b335710782c2/output/arm-linux-gnueabihf/bitcoin-b335710782c2-arm-linux-gnueabihf-debug.tar.gz
     5c8c0af592db397deb7f311a99acbc11de9de3d5112a237f198042ef8bf23d5cd  guix-build-b335710782c2/output/arm-linux-gnueabihf/bitcoin-b335710782c2-arm-linux-gnueabihf.tar.gz
     6e5c04f3b25b67e22d2b73e55e19baa510bee65f8d6464c2c20ec5d2227476a55  guix-build-b335710782c2/output/arm64-apple-darwin/SHA256SUMS.part
     7b8715006781829ad051e181812d66ced43344aa1b13dd2e84b81eeb68adea68a  guix-build-b335710782c2/output/arm64-apple-darwin/bitcoin-b335710782c2-arm64-apple-darwin-unsigned.tar.gz
     84aaf51a8d510c5d07e1773498626cf6b23a8f09949d93d9dc71598e8afaf9df8  guix-build-b335710782c2/output/arm64-apple-darwin/bitcoin-b335710782c2-arm64-apple-darwin-unsigned.zip
     94bbda33089e51a2f4e11ede6fd16b700b975312903e9e5ca81de6454b2bc5aa3  guix-build-b335710782c2/output/arm64-apple-darwin/bitcoin-b335710782c2-arm64-apple-darwin.tar.gz
    104a157d0fc52890e41161bf979535a2cb93f76d68fc52192da768ffb052c5450d  guix-build-b335710782c2/output/dist-archive/bitcoin-b335710782c2.tar.gz
    115a1a79720de4fa309b7994b59a40a993b86ea8713488a070fca8680a82f0050f  guix-build-b335710782c2/output/powerpc64-linux-gnu/SHA256SUMS.part
    12fe85f055b38152f6eb46b8cbce9c05483dfaa42dabac8240565b88d892c04133  guix-build-b335710782c2/output/powerpc64-linux-gnu/bitcoin-b335710782c2-powerpc64-linux-gnu-debug.tar.gz
    135d2af441e1c93d310b77523222706ab898bd7628a3694b3fd86f246c37210ecc  guix-build-b335710782c2/output/powerpc64-linux-gnu/bitcoin-b335710782c2-powerpc64-linux-gnu.tar.gz
    142a8f2193f1d6a6f4d9e048a8f095f657a5e6a8e30f1cf78de677f4a86c311a8f  guix-build-b335710782c2/output/powerpc64le-linux-gnu/SHA256SUMS.part
    1522d554d75352d3a76eeaa9fcd157c33aa3c76259d07da14d2d40550f31bb065d  guix-build-b335710782c2/output/powerpc64le-linux-gnu/bitcoin-b335710782c2-powerpc64le-linux-gnu-debug.tar.gz
    167b49606830140c081fece3ec70004025f944da2d7c27f723b1909fc625cdf5fc  guix-build-b335710782c2/output/powerpc64le-linux-gnu/bitcoin-b335710782c2-powerpc64le-linux-gnu.tar.gz
    17cd166f781272140535075f697ca7dcdeec2cb53a753ab711b8d31eb2d794d77a  guix-build-b335710782c2/output/riscv64-linux-gnu/SHA256SUMS.part
    18dae035d4b49ebba7d08f934aa85c0e03c278851f6d2a24aa2bcbc140ca916418  guix-build-b335710782c2/output/riscv64-linux-gnu/bitcoin-b335710782c2-riscv64-linux-gnu-debug.tar.gz
    196b3c058a9b44ffbc84eb40e6c2111457f241c6d02f4e2d862fd04d7a4321f9c4  guix-build-b335710782c2/output/riscv64-linux-gnu/bitcoin-b335710782c2-riscv64-linux-gnu.tar.gz
    20a31713a5184f7ddc8be3419a15e3bef1e1b4609df5677dcd8d506bd9841f4701  guix-build-b335710782c2/output/x86_64-apple-darwin/SHA256SUMS.part
    21c22d8f3d8e6d5fa9eeed49a666d550af7659917f94cb0e13c533035f40b8ad28  guix-build-b335710782c2/output/x86_64-apple-darwin/bitcoin-b335710782c2-x86_64-apple-darwin-unsigned.tar.gz
    22976017307b2d18c402153457918e00869089f0396f603659d1b019b84a84cff7  guix-build-b335710782c2/output/x86_64-apple-darwin/bitcoin-b335710782c2-x86_64-apple-darwin-unsigned.zip
    23d1a8de93bc228b35c16ddc6e314d7d313b19dbaf799d98bd805887b5150fda23  guix-build-b335710782c2/output/x86_64-apple-darwin/bitcoin-b335710782c2-x86_64-apple-darwin.tar.gz
    249746aca5706fbc20418b944d2d7f158fb0a17bbb8a3da2c81c1011fe1691d259  guix-build-b335710782c2/output/x86_64-linux-gnu/SHA256SUMS.part
    254b11422997062fddaf6a0a7a36ca0a9cccddadfe63672d5661e0ad512180b2a5  guix-build-b335710782c2/output/x86_64-linux-gnu/bitcoin-b335710782c2-x86_64-linux-gnu-debug.tar.gz
    2625d03b0b0b59933c8dbd7c003da2f8e13a4b81cc4b03ab72a11e260214deb3bc  guix-build-b335710782c2/output/x86_64-linux-gnu/bitcoin-b335710782c2-x86_64-linux-gnu.tar.gz
    27bc9cafc1ff3bea6ece3aabb69f4426b6689edc0498acab56581d9f7eb72c1026  guix-build-b335710782c2/output/x86_64-w64-mingw32/SHA256SUMS.part
    28e7590223e27d2e13f9b766f5c2515f73dfe7848782ddf078613f62f4d59898eb  guix-build-b335710782c2/output/x86_64-w64-mingw32/bitcoin-b335710782c2-win64-debug.zip
    2986431fea6cb3d62cc9be2b30d1a7516ff7f7f0f09ae7f65fafcf6925d036157d  guix-build-b335710782c2/output/x86_64-w64-mingw32/bitcoin-b335710782c2-win64-setup-unsigned.exe
    30210527aa5b2dbf6b5687ed7504339b85ba35a2bfb68a3fffc4e9b16bd4ce7be7  guix-build-b335710782c2/output/x86_64-w64-mingw32/bitcoin-b335710782c2-win64-unsigned.tar.gz
    31edf3f6397d04481efd23385896f76babf46f5bb20a16042605f88e694b62ab01  guix-build-b335710782c2/output/x86_64-w64-mingw32/bitcoin-b335710782c2-win64.zip
    
  54. fanquake requested review from TheCharlatan on Dec 21, 2023
  55. fanquake added the label DrahtBot Guix build requested on Dec 21, 2023
  56. fanquake commented at 1:54 pm on December 21, 2023: member
    This is now reproducible, and reviewable.
  57. theuni approved
  58. theuni commented at 4:23 pm on December 21, 2023: member

    ACK b335710782c2545e6eeed67b5e1763c07eab26b0.

    Amazing detective work on the qt determinism fixes 🤯 !

    I haven’t tested or scrutinized to determine if that’s the minimal patching we need. This seems low-impact enough it doesn’t really matter if it’s a bit heavy-handed.

  59. DrahtBot requested review from hebasto on Dec 21, 2023
  60. TheCharlatan commented at 5:15 pm on December 21, 2023: contributor

    I’m getting an error during the guix build:

     0  adding: bitcoin-b335710782c2/lib/libbitcoinconsensus-0.dll.dbg (deflated 76%)
     1INFO: Building b335710782c2 for platform triple x86_64-apple-darwin:
     2      ...using reference timestamp: 1702996424
     3      ...running at most 30 jobs
     4      ...from worktree directory: '/home/drgrid/Documents/bitcoin'
     5          ...bind-mounted in container to: '/bitcoin'
     6      ...in build directory: '/home/drgrid/Documents/bitcoin/guix-build-b335710782c2/distsrc-b335710782c2-x86_64-apple-darwin'
     7          ...bind-mounted in container to: '/distsrc-base/distsrc-b335710782c2-x86_64-apple-darwin'
     8      ...outputting in: '/home/drgrid/Documents/bitcoin/guix-build-b335710782c2/output/x86_64-apple-darwin'
     9          ...bind-mounted in container to: '/outdir-base/x86_64-apple-darwin'
    10The following derivations will be built:
    11  /gnu/store/zj1dj50zqqwaz9230x49yb80z5f7x3fq-clang-toolchain-17.0.6.drv
    12  /gnu/store/2fcdnjvxdi2sjq1d6f3b5f926z62nkyf-clang-17.0.6.drv
    13  /gnu/store/3imcrwkrljpqfzw481019j3hfk26gq6x-llvm-project-17.0.6-checkout.drv
    14  /gnu/store/gw1jlk6gmg9304rmi9b9xmrhi1ndijky-llvm-project-17.0.6-checkout.drv
    15  /gnu/store/gaxq4y6nwbljpkrg19rbh1p3s0bgv0an-clang-tools-extra-17.0.6.src.tar.xz.drv
    16  /gnu/store/j188b0ar5lq8i9zq6v52p57q7p9bacsl-clang-runtime-17.0.6.drv
    17  /gnu/store/wjx8bkzzmijjq6w7zphc1h709jj4yl51-llvm-17.0.6.drv
    18  /gnu/store/fdxpzdn6h39n7n76fs2fnqlkl2myyvq1-libomp-17.0.6.drv
    19
    20building /gnu/store/gaxq4y6nwbljpkrg19rbh1p3s0bgv0an-clang-tools-extra-17.0.6.src.tar.xz.drv...
    21building /gnu/store/gw1jlk6gmg9304rmi9b9xmrhi1ndijky-llvm-project-17.0.6-checkout.drv...
    22building /gnu/store/3imcrwkrljpqfzw481019j3hfk26gq6x-llvm-project-17.0.6-checkout.drv...
    23building /gnu/store/wjx8bkzzmijjq6w7zphc1h709jj4yl51-llvm-17.0.6.drv...
    24building /gnu/store/j188b0ar5lq8i9zq6v52p57q7p9bacsl-clang-runtime-17.0.6.drv...
    25building /gnu/store/2fcdnjvxdi2sjq1d6f3b5f926z62nkyf-clang-17.0.6.drv...
    26building /gnu/store/fdxpzdn6h39n7n76fs2fnqlkl2myyvq1-libomp-17.0.6.drv...
    27building /gnu/store/zj1dj50zqqwaz9230x49yb80z5f7x3fq-clang-toolchain-17.0.6.drv...
    28The following derivation will be built:
    29  /gnu/store/xcf164di7qmwj00a86y9q4l83qk1k54w-profile.drv
    30
    31applying 3 grafts for clang-runtime-17.0.6 ...
    32applying 4 grafts for llvm-17.0.6 ...
    33applying 13 grafts for clang-17.0.6 ...
    34applying 5 grafts for libomp-17.0.6 ...
    35applying 10 grafts for clang-toolchain-17.0.6 ...
    36building CA certificate bundle...
    37listing Emacs sub-directories...
    38building fonts directory...
    39building directory of Info manuals...
    40building profile with 32 packages...
    41Required environment variables as seen inside the container:
    42    DIST_ARCHIVE_BASE: /outdir-base/dist-archive
    43    DISTNAME: bitcoin-b335710782c2
    44    HOST: x86_64-apple-darwin
    45    SOURCE_DATE_EPOCH: 1702996424
    46    JOBS: 30
    47    DISTSRC: /distsrc-base/distsrc-b335710782c2-x86_64-apple-darwin
    48    OUTDIR: /outdir-base/x86_64-apple-darwin
    49make: Entering directory '/bitcoin/depends'
    50Building native_libtapi...
    51/gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16/bin/sh: line 1: ./build.sh: No such file or directory
    52make: *** [funcs.mk:291: /bitcoin/depends/work/build/x86_64-apple-darwin/native_libtapi/eb33a59f2e30ff9724dc1ea8bee8b5229b0557c9-226d9d824f3/./.stamp_built] Error 127
    

    EDIT: I guess this is a cache issue, just weird that both my machines ran into this. Will rebuild.

  61. fanquake commented at 5:18 pm on December 21, 2023: member
    Can you try cleaning up in your depends / work dirs? I’ve seen something similar after partial / interrupted builds (with changes unrelated to this one).
  62. in depends/patches/qt/utc_from_string_no_optimize.patch:1 in b335710782
    0@@ -0,0 +1,84 @@
    1+Modify optimisation flags for various functions.
    


    TheCharlatan commented at 6:47 pm on December 21, 2023:
    Nit: I guess this should mention std::sort too? Or maybe even put that into a separate patch?

    fanquake commented at 10:26 am on December 22, 2023:
    Maybe we can shuffle this all around again, the next time we bump Qt (new LTS has just been released), and have to inevitably rebase/update all these patches?
  63. TheCharlatan approved
  64. TheCharlatan commented at 6:48 pm on December 21, 2023: contributor

    ACK b335710782c2545e6eeed67b5e1763c07eab26b0

    Guix builds (aarch64 & x86_64)

     065981453fcb83338ed76435dc8fed06e9903441731b461e4f2c8a04ad102043c  guix-build-b335710782c2/output/aarch64-linux-gnu/SHA256SUMS.part
     13127d18bc55a7a207eb7e1252feaf24f767d5983e5d064323671139659c4f3d7  guix-build-b335710782c2/output/aarch64-linux-gnu/bitcoin-b335710782c2-aarch64-linux-gnu-debug.tar.gz
     20a67737c010e742249f07dd3ca3ae289df02edf2dedd8d6a5a07b291921bab47  guix-build-b335710782c2/output/aarch64-linux-gnu/bitcoin-b335710782c2-aarch64-linux-gnu.tar.gz
     37c315f9ccda8bffd4fd70bb51a1342d300e6039791d7e8a953ff1252d05c55b8  guix-build-b335710782c2/output/arm-linux-gnueabihf/SHA256SUMS.part
     4b677023cff7c2f82d01393616a4029aeb2b58d4c524b2241bf4d62c7e218f2b2  guix-build-b335710782c2/output/arm-linux-gnueabihf/bitcoin-b335710782c2-arm-linux-gnueabihf-debug.tar.gz
     5c8c0af592db397deb7f311a99acbc11de9de3d5112a237f198042ef8bf23d5cd  guix-build-b335710782c2/output/arm-linux-gnueabihf/bitcoin-b335710782c2-arm-linux-gnueabihf.tar.gz
     6e5c04f3b25b67e22d2b73e55e19baa510bee65f8d6464c2c20ec5d2227476a55  guix-build-b335710782c2/output/arm64-apple-darwin/SHA256SUMS.part
     7b8715006781829ad051e181812d66ced43344aa1b13dd2e84b81eeb68adea68a  guix-build-b335710782c2/output/arm64-apple-darwin/bitcoin-b335710782c2-arm64-apple-darwin-unsigned.tar.gz
     84aaf51a8d510c5d07e1773498626cf6b23a8f09949d93d9dc71598e8afaf9df8  guix-build-b335710782c2/output/arm64-apple-darwin/bitcoin-b335710782c2-arm64-apple-darwin-unsigned.zip
     94bbda33089e51a2f4e11ede6fd16b700b975312903e9e5ca81de6454b2bc5aa3  guix-build-b335710782c2/output/arm64-apple-darwin/bitcoin-b335710782c2-arm64-apple-darwin.tar.gz
    104a157d0fc52890e41161bf979535a2cb93f76d68fc52192da768ffb052c5450d  guix-build-b335710782c2/output/dist-archive/bitcoin-b335710782c2.tar.gz
    115a1a79720de4fa309b7994b59a40a993b86ea8713488a070fca8680a82f0050f  guix-build-b335710782c2/output/powerpc64-linux-gnu/SHA256SUMS.part
    12fe85f055b38152f6eb46b8cbce9c05483dfaa42dabac8240565b88d892c04133  guix-build-b335710782c2/output/powerpc64-linux-gnu/bitcoin-b335710782c2-powerpc64-linux-gnu-debug.tar.gz
    135d2af441e1c93d310b77523222706ab898bd7628a3694b3fd86f246c37210ecc  guix-build-b335710782c2/output/powerpc64-linux-gnu/bitcoin-b335710782c2-powerpc64-linux-gnu.tar.gz
    142a8f2193f1d6a6f4d9e048a8f095f657a5e6a8e30f1cf78de677f4a86c311a8f  guix-build-b335710782c2/output/powerpc64le-linux-gnu/SHA256SUMS.part
    1522d554d75352d3a76eeaa9fcd157c33aa3c76259d07da14d2d40550f31bb065d  guix-build-b335710782c2/output/powerpc64le-linux-gnu/bitcoin-b335710782c2-powerpc64le-linux-gnu-debug.tar.gz
    167b49606830140c081fece3ec70004025f944da2d7c27f723b1909fc625cdf5fc  guix-build-b335710782c2/output/powerpc64le-linux-gnu/bitcoin-b335710782c2-powerpc64le-linux-gnu.tar.gz
    17cd166f781272140535075f697ca7dcdeec2cb53a753ab711b8d31eb2d794d77a  guix-build-b335710782c2/output/riscv64-linux-gnu/SHA256SUMS.part
    18dae035d4b49ebba7d08f934aa85c0e03c278851f6d2a24aa2bcbc140ca916418  guix-build-b335710782c2/output/riscv64-linux-gnu/bitcoin-b335710782c2-riscv64-linux-gnu-debug.tar.gz
    196b3c058a9b44ffbc84eb40e6c2111457f241c6d02f4e2d862fd04d7a4321f9c4  guix-build-b335710782c2/output/riscv64-linux-gnu/bitcoin-b335710782c2-riscv64-linux-gnu.tar.gz
    20a31713a5184f7ddc8be3419a15e3bef1e1b4609df5677dcd8d506bd9841f4701  guix-build-b335710782c2/output/x86_64-apple-darwin/SHA256SUMS.part
    21c22d8f3d8e6d5fa9eeed49a666d550af7659917f94cb0e13c533035f40b8ad28  guix-build-b335710782c2/output/x86_64-apple-darwin/bitcoin-b335710782c2-x86_64-apple-darwin-unsigned.tar.gz
    22976017307b2d18c402153457918e00869089f0396f603659d1b019b84a84cff7  guix-build-b335710782c2/output/x86_64-apple-darwin/bitcoin-b335710782c2-x86_64-apple-darwin-unsigned.zip
    23d1a8de93bc228b35c16ddc6e314d7d313b19dbaf799d98bd805887b5150fda23  guix-build-b335710782c2/output/x86_64-apple-darwin/bitcoin-b335710782c2-x86_64-apple-darwin.tar.gz
    249746aca5706fbc20418b944d2d7f158fb0a17bbb8a3da2c81c1011fe1691d259  guix-build-b335710782c2/output/x86_64-linux-gnu/SHA256SUMS.part
    254b11422997062fddaf6a0a7a36ca0a9cccddadfe63672d5661e0ad512180b2a5  guix-build-b335710782c2/output/x86_64-linux-gnu/bitcoin-b335710782c2-x86_64-linux-gnu-debug.tar.gz
    2625d03b0b0b59933c8dbd7c003da2f8e13a4b81cc4b03ab72a11e260214deb3bc  guix-build-b335710782c2/output/x86_64-linux-gnu/bitcoin-b335710782c2-x86_64-linux-gnu.tar.gz
    27bc9cafc1ff3bea6ece3aabb69f4426b6689edc0498acab56581d9f7eb72c1026  guix-build-b335710782c2/output/x86_64-w64-mingw32/SHA256SUMS.part
    28e7590223e27d2e13f9b766f5c2515f73dfe7848782ddf078613f62f4d59898eb  guix-build-b335710782c2/output/x86_64-w64-mingw32/bitcoin-b335710782c2-win64-debug.zip
    2986431fea6cb3d62cc9be2b30d1a7516ff7f7f0f09ae7f65fafcf6925d036157d  guix-build-b335710782c2/output/x86_64-w64-mingw32/bitcoin-b335710782c2-win64-setup-unsigned.exe
    30210527aa5b2dbf6b5687ed7504339b85ba35a2bfb68a3fffc4e9b16bd4ce7be7  guix-build-b335710782c2/output/x86_64-w64-mingw32/bitcoin-b335710782c2-win64-unsigned.tar.gz
    31edf3f6397d04481efd23385896f76babf46f5bb20a16042605f88e694b62ab01  guix-build-b335710782c2/output/x86_64-w64-mingw32/bitcoin-b335710782c2-win64.zip
    

    Looking over the determinism patch, avoiding the clang optimizations for these functions seems without noticeable consequence. Similarly, the sort change should not make much of a difference in the GUI either.

  65. DrahtBot commented at 1:05 am on December 22, 2023: contributor

    Guix builds (on x86_64)

    File commit 7524fcff8625f0197be6cf84df285c39fcd5d6b6(master) commit add9a9e3ff3fc35c0a5a28954d4470e54711b55a(master and this pull)
    SHA256SUMS.part 359386ba668fbf66... d2bd0d7a29130700...
    *-aarch64-linux-gnu-debug.tar.gz ddae6770fe3b8bf4... ec93d858660026e4...
    *-aarch64-linux-gnu.tar.gz fb764fbb6d7bcdb3... 8a105c70712171a3...
    *-arm-linux-gnueabihf-debug.tar.gz 8af275a6036df503... bf80c779c3decc46...
    *-arm-linux-gnueabihf.tar.gz ad486e7742e4e08c... 52ca0fac3fe694ea...
    *-arm64-apple-darwin-unsigned.tar.gz ef84802436c00b8f... b56a81afc4ebcbd0...
    *-arm64-apple-darwin-unsigned.zip 7acd13728bf8607f... badb3613bfa14b2b...
    *-arm64-apple-darwin.tar.gz fe61b75739790eec... 1a4acce856f63ebe...
    *-powerpc64-linux-gnu-debug.tar.gz 371e9b2a45d2f8c7... 10491e4f9b912777...
    *-powerpc64-linux-gnu.tar.gz 47c0d30a65322263... e41f6f129c6c11ba...
    *-powerpc64le-linux-gnu-debug.tar.gz f1831479ca025631... 0f837fe25febee47...
    *-powerpc64le-linux-gnu.tar.gz 1946e4d1a9dbb7e6... 9341eb7bc775c98a...
    *-riscv64-linux-gnu-debug.tar.gz 5f5ac200eea5f437... 5a10f7720f56d023...
    *-riscv64-linux-gnu.tar.gz c2b5c8787ee21961... a5b2fd4f2a06514c...
    *-x86_64-apple-darwin-unsigned.tar.gz 056bbce834def497... 36583fa5cad86fbc...
    *-x86_64-apple-darwin-unsigned.zip 3d9a79a8513fb498... 63f9537e253ce16b...
    *-x86_64-apple-darwin.tar.gz 9171645726be0197... 28266595f984a4b1...
    *-x86_64-linux-gnu-debug.tar.gz 083eed064bc0895a... 070825935c8394d0...
    *-x86_64-linux-gnu.tar.gz 306fb33fc9ecc64a... a0da6bcd646ef0f4...
    *.tar.gz 7ac01eb848d7d58a... 491f9e23abcd7230...
    guix_build.log 5c35c3ddd4b3c8a9... a2257eaba45852ae...
    guix_build.log.diff 0c023b3076630100...
  66. DrahtBot removed the label DrahtBot Guix build requested on Dec 22, 2023
  67. fanquake commented at 10:27 am on December 22, 2023: member

    EDIT: I guess this is a cache issue, just weird that both my machines ran into this. Will rebuild.

    Thankfully the likelyhood if this occuring will be largely reduced after #28880.

  68. fanquake merged this on Dec 22, 2023
  69. fanquake closed this on Dec 22, 2023

  70. fanquake deleted the branch on Dec 22, 2023
  71. in depends/patches/qt/utc_from_string_no_optimize.patch:39 in b335710782
    34+@@ -76,7 +76,7 @@ public:
    35+     void _q_rowsAboutToBeInserted(const QModelIndex &parent, int start, int end);
    36+     void _q_columnsAboutToBeInserted(const QModelIndex &parent, int start, int end);
    37+     void _q_layoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
    38+-    void _q_layoutChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
    39++    __attribute__ ((optnone)) void _q_layoutChanged(const QList<QPersistentModelIndex> &parents = QList<QPersistentModelIndex>(), QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint);
    


    hebasto commented at 11:58 am on December 22, 2023:

    b335710782c2545e6eeed67b5e1763c07eab26b0

    Being a clang-specific attribute it should be properly gated to do not produce warning: 'optnone' attribute directive ignored [-Wattributes].

    However, such warnings are harmless for now.


    fanquake commented at 12:00 pm on December 22, 2023:

    The Qt build already produces heaps of other irrelevant warning output, so I’m not sure this makes any real difference? Properly gateing this would also just increase the patch size, and make rebasing them harder?

    This same thing also already occurs for other qt patches, i.e fast_fixed_dtoa_no_optimize, where clang already warns about ignoring the pragma usage.

  72. hebasto commented at 12:06 pm on December 22, 2023: member

    What behavior changes we might expect due to replacing std::stable_sort with std::sort?

    How do we ensure that no subtle bugs are introduced?

  73. fanquake referenced this in commit d4db24f259 on Mar 14, 2024
  74. fanquake referenced this in commit cf5faf73c9 on Mar 14, 2024
  75. fanquake referenced this in commit ece6a67b06 on Mar 15, 2024
  76. fanquake referenced this in commit 71b63195b3 on Mar 21, 2024
  77. janus referenced this in commit c895365f39 on Apr 6, 2024
  78. kwvg referenced this in commit 92beb0b07d on Nov 7, 2024
  79. kwvg referenced this in commit 601ceff2b9 on Nov 7, 2024
  80. kwvg referenced this in commit 2d74df35ef on Nov 15, 2024
  81. kwvg referenced this in commit 6d75a81f62 on Nov 16, 2024
  82. PastaPastaPasta referenced this in commit 6a51ab271d on Nov 17, 2024
  83. Fabcien referenced this in commit c1938796c7 on Nov 29, 2024
  84. roqqit referenced this in commit 1fa8d0f9de on Dec 19, 2024
  85. bitcoin locked this on Dec 21, 2024

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: 2024-12-22 06:12 UTC

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