Skip to content

Conversation

dongcarl
Copy link
Contributor

@dongcarl dongcarl commented Feb 5, 2021

The new time-machine commit contains a few small changes that make the
powerpc cross-toolchain work.

See this compare to review my custom patches to Guix: dongcarl/guix@7d6bd44...6c9d16d

@laanwj
Copy link
Member

laanwj commented Feb 8, 2021

Changes look good to me, didn't test or review in detail yet. Concept ACK.

@laanwj
Copy link
Member

laanwj commented Feb 11, 2021

Trying to run the guix build on a bare ubuntu server image (with guix installed through guix-install.sh from the guix website) i get the following errors:

user@guix:~/bitcoin$ ./contrib/guix/guix-build.sh     
/bin/sh: 1: gcc: not found     
/bin/sh: 1: gcc: not found                                                                                
/bin/sh: 1: g++: not found                                                                                
/bin/sh: 1: g++: not found                                                                                
env: '/home/user/bitcoin/depends/x86_64-apple-darwin18/native/bin/clang': No such file or directory
env: '/home/user/bitcoin/depends/x86_64-apple-darwin18/native/bin/clang': No such file or directory
env: '/home/user/bitcoin/depends/x86_64-apple-darwin18/native/bin/clang++': No such file or directory
env: '/home/user/bitcoin/depends/x86_64-apple-darwin18/native/bin/clang++': No such file or directory

Is it necessary to install gcc and g++ outside of guix?

It does continue, no idea if it will complete.

@dongcarl
Copy link
Contributor Author

dongcarl commented Feb 11, 2021

Is it necessary to install gcc and g++ outside of guix?

No I don't think so.

I'm almost certain this is caused by the depends download triggering some "immediate" variables in our depends Makefile from evaluating... Shouldn't harm anything, but lemme dig and see where this is.

Update: Ah! This is because we now call build_CC and host_CC when determining our id_strings, and since the id_string variables are "immediate", any appending will also be evaluated immediately... Perhaps we can just set it to a dummy value when we're just downloading? Not sure what the best fix is here...

@bitcoin bitcoin deleted a comment from DrahtBot Feb 11, 2021
@bitcoin bitcoin deleted a comment from DrahtBot Feb 11, 2021
@laanwj
Copy link
Member

laanwj commented Feb 11, 2021

Buld success (commit f4ae44c):

0c3355d662c9828be853c774fac9e9ae38538dfae0e86193b9c427d4f6652940  output/bitcoin-f4ae44c76fee-powerpc64-linux-gnu-debug.tar.gz
d56c3b095f63bd00466c1765dd83c21a886ef9ce3695745fed55a176f7b2e3aa  output/bitcoin-f4ae44c76fee-powerpc64-linux-gnu.tar.gz
3209447188534bb2135030c2abaad9e2e5b4a69130720a5ad667bc746c7ae4de  output/bitcoin-f4ae44c76fee-powerpc64le-linux-gnu-debug.tar.gz
03424501de81bcc9126e55dd01a3f48d0607ed5b6c782af0fbada9d68b8b83ac  output/bitcoin-f4ae44c76fee-powerpc64le-linux-gnu.tar.gz

Edit: oh, drahtbot's build of that commit is gone.
Edit: it's at least locally deterministic. I built twice and got the same result.

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 12, 2021

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

Conflicts

No conflicts as of last run.

@fanquake
Copy link
Member

Builds at 62cc218:

d29bb491a712da73a146ba7cf7935e1cf2ee491fbbc92ac8bd59e3a41126ed5d  output/bitcoin-62cc2180afc1-powerpc64-linux-gnu-debug.tar.gz
d5065882b91b004f68cedb48b6704081fdf7368a2c2854c240bba6533adb0e97  output/bitcoin-62cc2180afc1-powerpc64-linux-gnu.tar.gz
4ffa90656e515b9aa714eaa062f8172df467c3bc585210356c05d40f2341dd4f  output/bitcoin-62cc2180afc1-powerpc64le-linux-gnu-debug.tar.gz
4b23bfb20afcf2924dd8eb6d3fac9fad5109f1516a0fe0343e0e7f6fa87af784  output/bitcoin-62cc2180afc1-powerpc64le-linux-gnu.tar.gz
e4a05d6a09d824c10a3d6157a294b65e1053125a98c9a51f1f6d5b2d8c44e3ba  output/src/bitcoin-62cc2180afc1.tar.gz

@laanwj
Copy link
Member

laanwj commented Feb 12, 2021

Can reproduce @fanquake's results 🎉

d29bb491a712da73a146ba7cf7935e1cf2ee491fbbc92ac8bd59e3a41126ed5d  output/bitcoin-62cc2180afc1-powerpc64-linux-gnu-debug.tar.gz
d5065882b91b004f68cedb48b6704081fdf7368a2c2854c240bba6533adb0e97  output/bitcoin-62cc2180afc1-powerpc64-linux-gnu.tar.gz
4ffa90656e515b9aa714eaa062f8172df467c3bc585210356c05d40f2341dd4f  output/bitcoin-62cc2180afc1-powerpc64le-linux-gnu-debug.tar.gz
4b23bfb20afcf2924dd8eb6d3fac9fad5109f1516a0fe0343e0e7f6fa87af784  output/bitcoin-62cc2180afc1-powerpc64le-linux-gnu.tar.gz
e4a05d6a09d824c10a3d6157a294b65e1053125a98c9a51f1f6d5b2d8c44e3ba  output/src/bitcoin-62cc2180afc1.tar.gz

@maflcko
Copy link
Member

maflcko commented Feb 12, 2021

sha256sum output/{,src/}bitcoin*
e95c04f190722a5577b2a3f78463d01f13f87f748ec63d1df325db68a578e677  output/bitcoin-62cc2180afc1-powerpc64-linux-gnu-debug.tar.gz
cd6b14920197c0fcdae0609908359a1c2e3af8bb45590abc079f1d4bff5e9d0a  output/bitcoin-62cc2180afc1-powerpc64-linux-gnu.tar.gz
e4a05d6a09d824c10a3d6157a294b65e1053125a98c9a51f1f6d5b2d8c44e3ba  output/src/bitcoin-62cc2180afc1.tar.gz

Download: https://github.com/MarcoFalke/drahtbox/releases/download/none/bitcoin-62cc2180afc1-powerpc64-linux-gnu.tar.gz

I compiled on aarch64, which is not allowed, I presume?

@laanwj
Copy link
Member

laanwj commented Feb 13, 2021

@MarcoFalke i'd say it is allowed i'll want to do my future builds on RV64.

Would be good to investigate what is different in your results (and whether they differ for other target architectures than POWER too).

That said, i don't think "determinism when building on other architectures" is a blocker for this PR, might want to open a new issue for that.

@laanwj
Copy link
Member

laanwj commented Feb 13, 2021

I did another build for this on the GUIX distribution (x86_64) instead of installing it on top of another. After setting up a VM starting from the QEMU image, and setting up ssh access for guest (which wasn't that complicated but had to re-learn a bit of LISP in the process) it was completely straightforward:

# (copy in Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz through scp or such …)
guix install git make curl
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin

mkdir -p depends/SDKs
cd depends/SDKs
tar -zxf ~/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers.tar.gz
cd ../..

contrib/guix/guix-build.sh

Output:

4ffa90656e515b9aa714eaa062f8172df467c3bc585210356c05d40f2341dd4f  output/bitcoin-62cc2180afc1-powerpc64le-linux-gnu-debug.tar.gz
4b23bfb20afcf2924dd8eb6d3fac9fad5109f1516a0fe0343e0e7f6fa87af784  output/bitcoin-62cc2180afc1-powerpc64le-linux-gnu.tar.gz
d29bb491a712da73a146ba7cf7935e1cf2ee491fbbc92ac8bd59e3a41126ed5d  output/bitcoin-62cc2180afc1-powerpc64-linux-gnu-debug.tar.gz
d5065882b91b004f68cedb48b6704081fdf7368a2c2854c240bba6533adb0e97  output/bitcoin-62cc2180afc1-powerpc64-linux-gnu.tar.gz
e4a05d6a09d824c10a3d6157a294b65e1053125a98c9a51f1f6d5b2d8c44e3ba  output/src/bitcoin-62cc2180afc1.tar.gz

Matches my results on Ubuntu and @fanquake's.

@laanwj
Copy link
Member

laanwj commented Feb 14, 2021

Drahtbot build issue is due to disk space:

/gnu/store/25s9l7cgwz01qq3crbh1dpfw69gvvna4-profile/bin/install: error writing '/distsrc-base/distsrc-a6b382150bcc-powerpc64le-linux-gnu/installed/bitcoin-a6b382150bcc//bin/test_bitcoin': No space left on device
make[3]: *** [Makefile:4521: install-binPROGRAMS] Error 1

@maflcko
Copy link
Member

maflcko commented Feb 14, 2021

Yeah, I am confused about that. I have ~30GB of free disk space, which seems like enough?

$ df -h ./
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       146G  117G   29G  81% /

@laanwj
Copy link
Member

laanwj commented Feb 14, 2021

i don't know ? gitiian deletes the intermediate build files between builds for each architecture, i don't know if the GUIX build currently does; fwiw my GUIX VM after the build:

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        79G   61G   15G  81% /

@maflcko
Copy link
Member

maflcko commented Feb 14, 2021

Maybe the docs should be updated here to clarify that 60 GB [1] are now needed? https://github.com/bitcoin/bitcoin/blob/fa051c23860bcdcc871db5ad6b51b8d9ca88da35/contrib/guix/README.md#requirements

Edit: DrahtBot's gnu store is 11G, but probably including some now-unused packages.

[1] 10 GB + 5 GB per distsrc host

@maflcko
Copy link
Member

maflcko commented Feb 16, 2021

might want to open a new issue for that.

Done in #21194

@bitcoin bitcoin deleted a comment from DrahtBot Feb 16, 2021
@dongcarl
Copy link
Contributor Author

Pushed 4dd3c2f -> 857d98d

The new time-machine commit contains a few small changes that make the
powerpc cross-toolchain work.
@dongcarl dongcarl force-pushed the 2021-02-guix-ppc64-support branch from 857d98d to 95990b9 Compare February 19, 2021 16:30
@dongcarl
Copy link
Contributor Author

dongcarl commented Feb 19, 2021

Pushed 857d98d -> 95990b9

$ find output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
89d8a12bba6c455b673bd6c8cc4ce7b4f9def7df7259ae514757344083293523  output/bitcoin-95990b9f3278-aarch64-linux-gnu-debug.tar.gz
4c885962e3c3b5b79c9ab04a93e717cebb67130b0e74bb3514cec1d40de8cc0b  output/bitcoin-95990b9f3278-aarch64-linux-gnu.tar.gz
a1bb294d91bf53e0e40df7b259503182a77c515fc8fbbbb7d5437e3560c8d1ce  output/bitcoin-95990b9f3278-arm-linux-gnueabihf-debug.tar.gz
8bfc10b51d6fd3c694f67da315065997fc4a599961dfd352cfdcc3a3e0bf53c9  output/bitcoin-95990b9f3278-arm-linux-gnueabihf.tar.gz
f8640d5d7880a3b9d9b65547e1ea85a1114d7ecc25729aa5e0e2a8141b564723  output/bitcoin-95990b9f3278-osx-unsigned.dmg
6d1b91124bd4386327c23a16e075aa4d9d93330dc53a4882c5f0f06c83509079  output/bitcoin-95990b9f3278-osx-unsigned.tar.gz
75796657f3d5c77d971abb4dc99114df6e964b3e4de6061756b01b0867aa8d27  output/bitcoin-95990b9f3278-osx64.tar.gz
060aaf3cc00a5470d5b68c021afc16f56afe6cace335c935d99e67ad695648d5  output/bitcoin-95990b9f3278-powerpc64-linux-gnu-debug.tar.gz
48ce7c67ea620ed84251923a7a29c050e57d52548df1ec21dd9c5b252b2de2c6  output/bitcoin-95990b9f3278-powerpc64-linux-gnu.tar.gz
f37029a01bd8cb6479ce6c1eba9cf442b9562c5557aa1ef6c2f31294ff993de6  output/bitcoin-95990b9f3278-powerpc64le-linux-gnu-debug.tar.gz
b4216539ba7b66009aec6d086fa1b6583ee856d7a4d7093da5a5ed8067231e6a  output/bitcoin-95990b9f3278-powerpc64le-linux-gnu.tar.gz
ec373358e29eb7039a7d8f1934fe8ac4167bec55e1799b345c7bc6f9459ab2c1  output/bitcoin-95990b9f3278-riscv64-linux-gnu-debug.tar.gz
7406f147a1fc24d599a0cf5bfd7a69d0f6146b3c4849daeb640c6a83987ceb79  output/bitcoin-95990b9f3278-riscv64-linux-gnu.tar.gz
258cf66fec82fee8c4ef41c33fe9afce23f80b63deba5b2e9b3f54d541da746f  output/bitcoin-95990b9f3278-win-unsigned.tar.gz
730c264f8a105783a6050c6a2e90b45ebb62d421977ae8cf63b2e4aa46cd15b9  output/bitcoin-95990b9f3278-win64-debug.zip
a2f8c81815991971131fb7c7ec35e03fc9057984fcfe4ae86eeba4c20ac53858  output/bitcoin-95990b9f3278-win64-setup-unsigned.exe
18bd121edd5eed66987443e2635a41f404bfdd5a194aae35d31f4a826eff52fc  output/bitcoin-95990b9f3278-win64.zip
f87f5583f7bd42d6ef3d22cc3379d462124b546d7eb8f8eed1240b6ee20ff8ab  output/bitcoin-95990b9f3278-x86_64-linux-gnu-debug.tar.gz
dbb746cb5128cea7c79ade844a8961636e362c9489dede4637e3b1111761fc77  output/bitcoin-95990b9f3278-x86_64-linux-gnu.tar.gz
e112d90e3527c2f2efcebe642c031e87ccba005b43c43a57edd7cea64349e531  output/src/bitcoin-95990b9f3278.tar.gz

@fanquake
Copy link
Member

I'm seeing a mismatch with bitcoin-95990b9f3278-win64.zip and bitcoin-95990b9f3278-win64-debug.zip:

bash-5.1# find output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
89d8a12bba6c455b673bd6c8cc4ce7b4f9def7df7259ae514757344083293523  output/bitcoin-95990b9f3278-aarch64-linux-gnu-debug.tar.gz
4c885962e3c3b5b79c9ab04a93e717cebb67130b0e74bb3514cec1d40de8cc0b  output/bitcoin-95990b9f3278-aarch64-linux-gnu.tar.gz
a1bb294d91bf53e0e40df7b259503182a77c515fc8fbbbb7d5437e3560c8d1ce  output/bitcoin-95990b9f3278-arm-linux-gnueabihf-debug.tar.gz
8bfc10b51d6fd3c694f67da315065997fc4a599961dfd352cfdcc3a3e0bf53c9  output/bitcoin-95990b9f3278-arm-linux-gnueabihf.tar.gz
f8640d5d7880a3b9d9b65547e1ea85a1114d7ecc25729aa5e0e2a8141b564723  output/bitcoin-95990b9f3278-osx-unsigned.dmg
6d1b91124bd4386327c23a16e075aa4d9d93330dc53a4882c5f0f06c83509079  output/bitcoin-95990b9f3278-osx-unsigned.tar.gz
75796657f3d5c77d971abb4dc99114df6e964b3e4de6061756b01b0867aa8d27  output/bitcoin-95990b9f3278-osx64.tar.gz
060aaf3cc00a5470d5b68c021afc16f56afe6cace335c935d99e67ad695648d5  output/bitcoin-95990b9f3278-powerpc64-linux-gnu-debug.tar.gz
48ce7c67ea620ed84251923a7a29c050e57d52548df1ec21dd9c5b252b2de2c6  output/bitcoin-95990b9f3278-powerpc64-linux-gnu.tar.gz
f37029a01bd8cb6479ce6c1eba9cf442b9562c5557aa1ef6c2f31294ff993de6  output/bitcoin-95990b9f3278-powerpc64le-linux-gnu-debug.tar.gz
b4216539ba7b66009aec6d086fa1b6583ee856d7a4d7093da5a5ed8067231e6a  output/bitcoin-95990b9f3278-powerpc64le-linux-gnu.tar.gz
ec373358e29eb7039a7d8f1934fe8ac4167bec55e1799b345c7bc6f9459ab2c1  output/bitcoin-95990b9f3278-riscv64-linux-gnu-debug.tar.gz
7406f147a1fc24d599a0cf5bfd7a69d0f6146b3c4849daeb640c6a83987ceb79  output/bitcoin-95990b9f3278-riscv64-linux-gnu.tar.gz
258cf66fec82fee8c4ef41c33fe9afce23f80b63deba5b2e9b3f54d541da746f  output/bitcoin-95990b9f3278-win-unsigned.tar.gz
68b7d61e61bd6305343e9cb80a2244403b4ae30c586313126f0c0e4ef6935bb2  output/bitcoin-95990b9f3278-win64-debug.zip
a2f8c81815991971131fb7c7ec35e03fc9057984fcfe4ae86eeba4c20ac53858  output/bitcoin-95990b9f3278-win64-setup-unsigned.exe
e9a25fc9355fbaf8ddaaff7eea8ac3e18ef0fcb2dc12f4744c406189bd6389d6  output/bitcoin-95990b9f3278-win64.zip
f87f5583f7bd42d6ef3d22cc3379d462124b546d7eb8f8eed1240b6ee20ff8ab  output/bitcoin-95990b9f3278-x86_64-linux-gnu-debug.tar.gz
dbb746cb5128cea7c79ade844a8961636e362c9489dede4637e3b1111761fc77  output/bitcoin-95990b9f3278-x86_64-linux-gnu.tar.gz
e112d90e3527c2f2efcebe642c031e87ccba005b43c43a57edd7cea64349e531  output/src/bitcoin-95990b9f3278.tar.gz

My build artifacts are available here: https://github.com/fanquake/build_artifacts/releases/tag/guix_21089.

@maflcko
Copy link
Member

maflcko commented Feb 20, 2021

https://github.com/MarcoFalke/drahtbox/releases/tag/bitcoin-95990b9f3278

89d8a12bba6c455b673bd6c8cc4ce7b4f9def7df7259ae514757344083293523  output/bitcoin-95990b9f3278-aarch64-linux-gnu-debug.tar.gz
4c885962e3c3b5b79c9ab04a93e717cebb67130b0e74bb3514cec1d40de8cc0b  output/bitcoin-95990b9f3278-aarch64-linux-gnu.tar.gz
a1bb294d91bf53e0e40df7b259503182a77c515fc8fbbbb7d5437e3560c8d1ce  output/bitcoin-95990b9f3278-arm-linux-gnueabihf-debug.tar.gz
8bfc10b51d6fd3c694f67da315065997fc4a599961dfd352cfdcc3a3e0bf53c9  output/bitcoin-95990b9f3278-arm-linux-gnueabihf.tar.gz
060aaf3cc00a5470d5b68c021afc16f56afe6cace335c935d99e67ad695648d5  output/bitcoin-95990b9f3278-powerpc64-linux-gnu-debug.tar.gz
48ce7c67ea620ed84251923a7a29c050e57d52548df1ec21dd9c5b252b2de2c6  output/bitcoin-95990b9f3278-powerpc64-linux-gnu.tar.gz
f37029a01bd8cb6479ce6c1eba9cf442b9562c5557aa1ef6c2f31294ff993de6  output/bitcoin-95990b9f3278-powerpc64le-linux-gnu-debug.tar.gz
b4216539ba7b66009aec6d086fa1b6583ee856d7a4d7093da5a5ed8067231e6a  output/bitcoin-95990b9f3278-powerpc64le-linux-gnu.tar.gz
ec373358e29eb7039a7d8f1934fe8ac4167bec55e1799b345c7bc6f9459ab2c1  output/bitcoin-95990b9f3278-riscv64-linux-gnu-debug.tar.gz
7406f147a1fc24d599a0cf5bfd7a69d0f6146b3c4849daeb640c6a83987ceb79  output/bitcoin-95990b9f3278-riscv64-linux-gnu.tar.gz
258cf66fec82fee8c4ef41c33fe9afce23f80b63deba5b2e9b3f54d541da746f  output/bitcoin-95990b9f3278-win-unsigned.tar.gz
68b7d61e61bd6305343e9cb80a2244403b4ae30c586313126f0c0e4ef6935bb2  output/bitcoin-95990b9f3278-win64-debug.zip
a2f8c81815991971131fb7c7ec35e03fc9057984fcfe4ae86eeba4c20ac53858  output/bitcoin-95990b9f3278-win64-setup-unsigned.exe
e9a25fc9355fbaf8ddaaff7eea8ac3e18ef0fcb2dc12f4744c406189bd6389d6  output/bitcoin-95990b9f3278-win64.zip
f87f5583f7bd42d6ef3d22cc3379d462124b546d7eb8f8eed1240b6ee20ff8ab  output/bitcoin-95990b9f3278-x86_64-linux-gnu-debug.tar.gz
dbb746cb5128cea7c79ade844a8961636e362c9489dede4637e3b1111761fc77  output/bitcoin-95990b9f3278-x86_64-linux-gnu.tar.gz

@maflcko
Copy link
Member

maflcko commented Feb 20, 2021

(seems to be matching fanquake)

@laanwj
Copy link
Member

laanwj commented Feb 20, 2021

My output matches @fanquake's and @MarcoFalke's exactly

@dongcarl
Copy link
Contributor Author

dongcarl commented Feb 22, 2021

Investigated a bit, seems like a difference in umask? (Thank goodness it's this simple)

Here's my umask on the machine where I ran this build:

$ umask
0002

I see that on other machines umask is 0022.

Shall we set the umask to 0022 at the beginning of our guix-build.sh script?

$ diffoscope focal-virt/bitcoin-95990b9f3278-win64-debug.zip fanquake/bitcoin-95990b9f3278-win64-debug.zip
--- focal-virt/bitcoin-95990b9f3278-win64-debug.zip
+++ fanquake/bitcoin-95990b9f3278-win64-debug.zip
├── zipinfo {}
│ @@ -1,10 +1,10 @@
│  Zip file size: 441816619 bytes, number of entries: 8
│ --rwxrwxr-x  3.0 unx 37351236 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-cli.exe.dbg
│ --rwxrwxr-x  3.0 unx 612859596 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-qt.exe.dbg
│ --rwxrwxr-x  3.0 unx 56000510 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-tx.exe.dbg
│ --rwxrwxr-x  3.0 unx 37965401 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-util.exe.dbg
│ --rwxrwxr-x  3.0 unx 205062558 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-wallet.exe.dbg
│ --rwxrwxr-x  3.0 unx 449083928 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoind.exe.dbg
│ --rwxrwxr-x  3.0 unx 907142051 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/test_bitcoin.exe.dbg
│ --rwxrwxr-x  3.0 unx 12217326 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/lib/libbitcoinconsensus-0.dll.dbg
│ +-rwxr-xr-x  3.0 unx 37351236 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-cli.exe.dbg
│ +-rwxr-xr-x  3.0 unx 612859596 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-qt.exe.dbg
│ +-rwxr-xr-x  3.0 unx 56000510 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-tx.exe.dbg
│ +-rwxr-xr-x  3.0 unx 37965401 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-util.exe.dbg
│ +-rwxr-xr-x  3.0 unx 205062558 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-wallet.exe.dbg
│ +-rwxr-xr-x  3.0 unx 449083928 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoind.exe.dbg
│ +-rwxr-xr-x  3.0 unx 907142051 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/test_bitcoin.exe.dbg
│ +-rwxr-xr-x  3.0 unx 12217326 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/lib/libbitcoinconsensus-0.dll.dbg
│  8 files, 2317682606 bytes uncompressed, 441815265 bytes compressed:  80.9%
$ diffoscope focal-virt/bitcoin-95990b9f3278-win64.zip fanquake/bitcoin-95990b9f3278-win64.zip
--- focal-virt/bitcoin-95990b9f3278-win64.zip
+++ fanquake/bitcoin-95990b9f3278-win64.zip
├── zipinfo {}
│ @@ -1,25 +1,25 @@
│  Zip file size: 33782287 bytes, number of entries: 23
│ -drwxrwxr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/
│ -drwxrwxr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/
│ +drwxr-xr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/
│ +drwxr-xr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/
│  -rwxr-xr-x  3.0 unx  2069523 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-cli.exe
│  -rwxr-xr-x  3.0 unx 31886879 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-qt.exe
│  -rwxr-xr-x  3.0 unx  2385939 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-tx.exe
│  -rwxr-xr-x  3.0 unx  1894931 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-util.exe
│  -rwxr-xr-x  3.0 unx  7110675 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoin-wallet.exe
│  -rwxr-xr-x  3.0 unx 12144659 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/bitcoind.exe
│  -rwxr-xr-x  3.0 unx 20453907 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/bin/test_bitcoin.exe
│ -drwxrwxr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/include/
│ +drwxr-xr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/include/
│  -rw-r--r--  3.0 unx     3660 t- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/include/bitcoinconsensus.h
│ -drwxrwxr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/lib/
│ +drwxr-xr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/lib/
│  -rwxr-xr-x  3.0 unx  1442323 b- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/lib/libbitcoinconsensus-0.dll
│ --rw-rw-r--  3.0 unx      846 t- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/readme.txt
│ -drwxrwxr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/share/
│ -drwxrwxr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/
│ -drwxrwxr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/man1/
│ +-rw-r--r--  3.0 unx      846 t- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/readme.txt
│ +drwxr-xr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/share/
│ +drwxr-xr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/
│ +drwxr-xr-x  3.0 unx        0 b- stor 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/man1/
│  -rw-r--r--  3.0 unx      214 t- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/man1/bitcoin-cli.1
│  -rw-r--r--  3.0 unx      211 t- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/man1/bitcoin-qt.1
│  -rw-r--r--  3.0 unx      211 t- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/man1/bitcoin-tx.1
│  -rw-r--r--  3.0 unx      217 t- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/man1/bitcoin-util.1
│  -rw-r--r--  3.0 unx      223 t- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/man1/bitcoin-wallet.1
│  -rw-r--r--  3.0 unx      205 t- defN 21-Feb-16 17:29 bitcoin-95990b9f3278/share/man/man1/bitcoind.1
│  23 files, 79394623 bytes uncompressed, 33778727 bytes compressed:  57.5%

@laanwj
Copy link
Member

laanwj commented Feb 22, 2021

Shall we set the umask to 0022 at the beginning of our guix-build.sh script?

Maybe. I'm a bit disappointed that Guix doesn't handle this itself! It seems like one of the first things you'd want to be robust against (apart from time, environment, username) when doing deterministic builds.

That said sure we can do it as a workaround. Could also do it incontrib/guix/libexec/build.sh.

@dongcarl
Copy link
Contributor Author

dongcarl commented Feb 22, 2021

I'm a bit disappointed that Guix doesn't handle this itself! It seems like one of the first things you'd want to be robust against (apart from time, environment, username) when doing deterministic builds.

To be clear, when guix-daemon is building a package in its isolated container (for us, that is all the packages in our manifest.scm), umask is set. I think guix environment doesn't set it because it's meant to be more of an "overlay" on top of your existing system (at least when --container is not supplied).

@dongcarl
Copy link
Contributor Author

I opened #21271 to fix the non-reproducibility separately. I think this PR is ready for merge.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

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

ACK 95990b9

@fanquake fanquake merged commit 64343a6 into bitcoin:master Feb 23, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 23, 2021
fanquake added a commit to bitcoin-core/gui that referenced this pull request Feb 25, 2021
d98f459 guix: Explicitly set umask in build container (Carl Dong)

Pull request description:

  Opened as a separate PR to fix non-reproducibility found through testing here: bitcoin/bitcoin#21089 (comment)

  Many thanks to everyone who helped find this!

ACKs for top commit:
  laanwj:
    ACK d98f459
  fanquake:
    ACK d98f459 - I'm seeing matching hashes.

Tree-SHA512: ea339c3902f2f4dea32e8ef5cc675a1df0679530881260ae999aaaf7339d5b12c46e01e58677cbb079f33e573ad105e2b443a835f3e944ef8e943a25f83027f1
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 25, 2021
d98f459 guix: Explicitly set umask in build container (Carl Dong)

Pull request description:

  Opened as a separate PR to fix non-reproducibility found through testing here: bitcoin#21089 (comment)

  Many thanks to everyone who helped find this!

ACKs for top commit:
  laanwj:
    ACK d98f459
  fanquake:
    ACK d98f459 - I'm seeing matching hashes.

Tree-SHA512: ea339c3902f2f4dea32e8ef5cc675a1df0679530881260ae999aaaf7339d5b12c46e01e58677cbb079f33e573ad105e2b443a835f3e944ef8e943a25f83027f1
laanwj added a commit to bitcoin-core/gui that referenced this pull request Feb 26, 2021
13a9fd1 guix: Passthrough SDK_PATH into container (Carl Dong)

Pull request description:

  This is a usability improvement for Guix builders so that they don't have to extract the Xcode tarball into `depends/SDKs` every time.

  Inspiration: bitcoin/bitcoin#21089 (comment)

ACKs for top commit:
  laanwj:
    Tested ACK 13a9fd1

Tree-SHA512: 63392d537e48a0da9f0ee04a929613b139bef1ac5643187871c9ea5376afd2a3d95df0f5e0950ae0eccd2813b166667be98401e5a248ae9c187fe4e84e54d427
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 26, 2021
13a9fd1 guix: Passthrough SDK_PATH into container (Carl Dong)

Pull request description:

  This is a usability improvement for Guix builders so that they don't have to extract the Xcode tarball into `depends/SDKs` every time.

  Inspiration: bitcoin#21089 (comment)

ACKs for top commit:
  laanwj:
    Tested ACK 13a9fd1

Tree-SHA512: 63392d537e48a0da9f0ee04a929613b139bef1ac5643187871c9ea5376afd2a3d95df0f5e0950ae0eccd2813b166667be98401e5a248ae9c187fe4e84e54d427
fanquake added a commit that referenced this pull request Mar 2, 2021
a0a7a43 guix, doc: Update default HOSTS value (Hennadii Stepanov)

Pull request description:

  This is a #21089 follow up.

ACKs for top commit:
  fanquake:
    ACK a0a7a43

Tree-SHA512: c1813cc2b9212a79fd34d4e25cd0816b58264e1890daf777cd59411bd20fcc9affe312871d06fab1308b8f55c1a78ac1101e631882c18360a4709ecef4529f05
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Mar 2, 2021
a0a7a43 guix, doc: Update default HOSTS value (Hennadii Stepanov)

Pull request description:

  This is a bitcoin#21089 follow up.

ACKs for top commit:
  fanquake:
    ACK a0a7a43

Tree-SHA512: c1813cc2b9212a79fd34d4e25cd0816b58264e1890daf777cd59411bd20fcc9affe312871d06fab1308b8f55c1a78ac1101e631882c18360a4709ecef4529f05
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants