-
Notifications
You must be signed in to change notification settings - Fork 37.7k
guix: Build support for macOS #17920
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously concept ACK on macOS GUIX builds. Not going to comment on the interim system Clang commits here.
contrib/guix/libexec/build-osx.sh
Outdated
# esac | ||
# ) | ||
|
||
# Environment variables for determinism |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we no longer have to set ZERO_AR_DATE
here because we're not using a libtool from cctools?
From libtool.c:
all of these values are initialized to reasonable defaults for deterministic
archives: archives that are consistent regardless of user, time, or umask
differences. Ordinarily, these values and will be set to more specific
ones when building new archives, but that can be suppressed using the
'-D' option or the ZERO_AR_DATE environment variable.
e61380a
to
fa7ea1b
Compare
20e9e0b
to
fa7ea1b
Compare
Update: this is still being actively worked on. Current hurdle: some weird clang internal search path logic. |
fa7ea1b
to
d146976
Compare
173bb2d
to
40ad768
Compare
Tested 40ad768. I (re)installed guix on an Ubuntu 20 machine and used This did not go without hickups, e.g.:
Not sure what file is most useful to compare, but here's a few:
I can also still build and use depends on native macOS Big Sur. CI seems to struggle, maybe a spurious failure. You may want to link to the macOS SDK extraction instructions (and that it needs to be untarred into depends/SDK's). You may want to rebase (#20470) now that #20422 landed, since it changed Does this PR mean you can switch to the upstream GUIX repo? Or are there still patches? See 93439a7 |
Many thanks for testing @Sjors! Your review is super helpful as I want to make this process as user-friendly as possible. Even for the folks building without substitutes! Cheers. To start off, it seems like reproducibility is working!
Now onto your concerns:
Very true, I've had experience with this myself, I will write up some documentation. As for the glibc-locales failure, could you send me your
I've encountered this a while ago, so this must be an outstanding bug. I will look into it! I also think it may be good for me to write down in the README how to report Guix build failures (Guix always saves a bzip'd full log file in
That warning is an old bug that has since been fixed here: https://issues.guix.gnu.org/41595. I will see how we can mitigate against this as well, may just have to bump my time-machine commit!
Sure! I added a check for it in the script but I agree that it should be in the README as well!
Ah I did rebase that one, but not the cherry-picked commits in here. Will do!
I want to switch over to upstream GUIX once everything is finalized. There could still be things that crop up I need to patch, but it's looking increasingly unlikely. |
guix describe (as root)
(my Ubuntu install in general is a cluster f*** that I very much feel like reinstalling from scratch, FWIW)
Happy to try again after that. |
@Sjors Looking into a few things... Could you send me the file that's returned by:
Much appreciated. |
As user
I ran the garbage collector By the way, before I ran that clean command I got:
It would be nice if e.g. |
@Sjors Would you mind giving me more info on your setup? I'm particularly interested in what distro and kernel version you were using when you encountered:
|
Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-33-generic x86_64) I installed Guix as root using their |
40ad768
to
c811059
Compare
Nope! |
find output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
3f2762da34e6681471a7ede52ff7739e0e5ad64dd4584ae1e6d4af47456c2a98 output/bitcoin-05a31a95832b-osx-unsigned.dmg
ffc15b01f5028bf15fda61c1b3d785c2ba6e72fdfdd3292ea7f7d7f0b5230f9f output/bitcoin-05a31a95832b-osx-unsigned.tar.gz
538ba85976b7dec9353d9e246346cac792916ed2a59360c5ded8c7e4ddebe8b7 output/bitcoin-05a31a95832b-osx64.tar.gz
21118fd0183fc430fe6de82bbcd5ab353643fc51a280a11cb188e9e4ae7c7cd5 output/src/bitcoin-05a31a95832b.tar.gz |
I'm getting matching hashes!
|
See 181989f for more info. I missed this one last time.
We need this to be after a '--' as '-volume_date' is a xorriso flag, not a xorrisofs flag. See the respective man pages. For more details: https://issues.guix.info/issue/35283#2
See comments inserted in this commit.
05a31a9
to
f169475
Compare
Hashes:
|
ACK f169475 - I think we can make some small usability improvements, but this is ok to merge now. find output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
2d17b6c787f91bf32e5d3732a6a054df1940d26030fc19d845ca0b472283a1bb output/bitcoin-f1694757ddbc-osx-unsigned.dmg
c5a8207f4d76928b88ac9dfed61197be9bfd62ba93821898a9c90e1eb8a5a7d5 output/bitcoin-f1694757ddbc-osx-unsigned.tar.gz
bb972ac7f0f03c31d30c15cc9667530cd25f2237f4eb9d32cd3a1ea17ce1ff6a output/bitcoin-f1694757ddbc-osx64.tar.gz
262cb14aabffdb98260ca53e5d420b14f4242c83e414963abf9c4798eba899b6 output/src/bitcoin-f1694757ddbc.tar.gz |
;; Native gcc 9 toolchain targeting glibc 2.27 | ||
(make-gcc-toolchain gcc-9 glibc-2.27)) | ||
;; Native gcc 7 toolchain | ||
gcc-toolchain-7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this changed, seems unrelated to macos, no? Does this break gcc cross builds for our linux archs that need gcc 8 at least?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, this is the comment I was referring to: #13665 (comment)
I presume that guix is using a gcc-7 that has a fix backported?
Post merge test: I get the same checksums! |
This PR brings our Guix builds on par with Gitian in terms of supported architectures.
Reviewers: if you run a build, please submit:
So that we can compare hashes and ensure reproducibility!