Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

edk2: fix build on x86_64-darwin #199940

Merged
merged 3 commits into from
Nov 7, 2022
Merged

Conversation

reckenrode
Copy link
Contributor

ZHF #199919

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Nov 7, 2022
@ofborg ofborg bot requested review from LunNova and RaitoBezarius November 7, 2022 00:45
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 7, 2022
Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

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

LGTM as we were already hardcoding LLVM toolchain.

@reckenrode
Copy link
Contributor Author

I ended up adding OVMF and edk2-uefi-shell to the PR since they depend on edk2. I can split them out, but the separate PRs wouldn’t be buildable until this one landed.

@RaitoBezarius
Copy link
Member

Seems fair to me.

@ofborg ofborg bot requested a review from RaitoBezarius November 7, 2022 01:07
@ofborg ofborg bot added 10.rebuild-linux: 1-10 and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 7, 2022
@mweinelt
Copy link
Member

mweinelt commented Nov 7, 2022

Can someone check why ofBorg is unhappy?

@RaitoBezarius
Copy link
Member

Can someone check why ofBorg is unhappy?

For Darwin:

xcode-select: error: no developer tools were found at '/Applications/Xcode.app', and no install could be requested (perhaps no UI is present), please install manually from 'developer.apple.com'.

It seems unrelated to the PR and more an ofborg issue itself.

For aarch64-linux, just after VM boot, the command pipe is broken, I do not have aarch64 to reproduce, but it could be some regression due to this PR building a corrupted OVMF firmware, we should investigate.

@reckenrode
Copy link
Contributor Author

Looking at the full log, there’s a message about running out of space. Is that expected?

[Errno 28] No space left on device: '/nix/store/dg7z7wnyy2wv1w97vqm946z9fr2y6n0l-initrd-linux-5.15.77/initrd' -> '/boot/efi/nixos/dg7z7wnyy2wv1w97vqm946z9fr2y6n0l-initrd-linux-5.15.77-initrd.efi'

@RaitoBezarius
Copy link
Member

Looking at the full log, there’s a message about running out of space. Is that expected?

[Errno 28] No space left on device: '/nix/store/dg7z7wnyy2wv1w97vqm946z9fr2y6n0l-initrd-linux-5.15.77/initrd' -> '/boot/efi/nixos/dg7z7wnyy2wv1w97vqm946z9fr2y6n0l-initrd-linux-5.15.77-initrd.efi'

This is a classical issue with these macOS builders I think, cc @grahamc

@mweinelt mweinelt merged commit ba047a1 into NixOS:master Nov 7, 2022
@reckenrode reckenrode deleted the zhf-edk2-darwin branch November 7, 2022 12:33
@LunNova
Copy link
Member

LunNova commented Nov 13, 2022

@reckenrode edk2-uefi-shell still seems to be failing on hydra for aarch64-darwin. I don't have a darwin machine, are you able to look into it?

@reckenrode
Copy link
Contributor Author

@LunNova I’ll take a look at it. The other edk2 packages don’t support aarch64-darwin, so the fix may be to limit edk2-uefi-shell similarly.

@reckenrode
Copy link
Contributor Author

I checked the job report for nixpkgs-22.05-darwin, but I don’t see any failures for edk2-uefi-shell. It also won’t build locally due to being an unsupported platform, which is what I should expect. Can you help point me in the right direction to where you’re seeing the failure on Hydra?

@LunNova
Copy link
Member

LunNova commented Nov 13, 2022

Sorry that should've been x86_64-darwin not arrch64-darwin.

https://hydra.nixos.org/build/198166720

@RaitoBezarius
Copy link
Member

Sorry that should've been x86_64-darwin not arrch64-darwin.

https://hydra.nixos.org/build/198166720

It really seems to be an orthogonal issue due to the Apple environment, I think.

@reckenrode
Copy link
Contributor Author

I was able to reproduce the problem by disabling sandboxing. edksetup.sh uses whereis to locate Python, which picks up /usr/bin/python3 when sandboxing is disabled on Darwin. I opened #201095 with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants