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

darling: fix build #340323

Merged
merged 1 commit into from
Sep 8, 2024
Merged

darling: fix build #340323

merged 1 commit into from
Sep 8, 2024

Conversation

ghpzin
Copy link
Contributor

@ghpzin ghpzin commented Sep 7, 2024

  • add patch from upstream commit fixing build error: darlinghq/darling@f46eb72
  • add postPatch removing 500MB of dependency test files to get under Hydra output limit

Description of changes

Currently build fails with:

[208/25908] Building C object src/external/xnu/darling/src/libsystem_kernel/emulation/linux/CMakeFiles/emulation.dir/signal/mach_excUser.c.o
FAILED: src/external/xnu/darling/src/libsystem_kernel/emulation/linux/CMakeFiles/emulation.dir/signal/mach_excUser.c.o
/nix/store/xn5ibpsl0g3gc99pdghdpwa527gnp72j-cc-wrapper-bypass/bin/clang -DBSDTHREAD_WRAP_LINUX_PTHREAD -DDARLING -DDARWIN -DEMULATED_OSPRODUCTVERSION=\
"11.7.4\" -DEMULATED_OSVERSION=\"20G1120\" -DEMULATED_RELEASE=\"20.6.0\" -DEMULATED_SYSNAME=\"Darwin\" -DEMULATED_VERSION="\"Darwin Kernel Version 20.6.0\"" -DPLATFORM_MacOSX -DTARGET_OS_MAC=1 -D_DARWIN_C_SOURCE -D_POSIX_C_SOURCE -D__APPLE__ -D__DYNAMIC__ -D__MACH__ -I/build/source/build/src/include -I/build/source/src/include -I/build/source/basic-headers -I/build/source/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/build/source/build/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/build/source/framework-include -I/build/source/framework-private-include -I/build/source/src/external/lkm/include -I/build/source/src/libDiagnosticMessagesClient/include -I/build/source/src/libMobileGestalt/include -I/build/source/src/lib/include -I/build/source/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 -I/build/source/build/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 -I/build/source/src/external/xnu/darling/src/libsystem_kernel -I/build/source/src/external/xnu/darling/src/libsystem_kernel/emulation/linux -I/build/source/build/src/startup -I/build/source/build/src/external/xnu/darling/src/libsystem_kernel/libsyscall -I/build/source/build/src/external/xnu/darling/src/libsystem_kernel/emulation/linux -I/build/source/build/src/external/darlingserver/include -I/build/source/src/external/darlingserver/include -I/build/source/src/libsimple/include -isystem /nix/store/jp7haqy22790sirigbjlfr10m170a7sy-clang-wrapper-18.1.8/resource-root/include -Wno-nullability-completeness -Wno-deprecated-declarations -Wno-availability -Wno-expansion-to-defined -Wno-elaborated-enum-base -Wno-undef-prefix -mmacosx-version-min=11.0 -std=gnu99 -fvisibility=hidden -fPIC -fno-builtin -ggdb -Wno-int-conversion -Wno-compare-distinct-pointer-types   -target x86_64-apple-darwin20  -B /build/source/build/src/external/cctools-port/cctools/misc/ -arch x86_64 -B /build/source/build/src/external/cctools-port/cctools/misc/ -arch x86_64 -MD -MT src/external/xnu/darling/src/libsystem_kernel/emulation/linux/CMakeFiles/emulation.dir/signal/mach_excUser.c.o -MF src/external/xnu/darling/src/libsystem_kernel/emulation/linux/CMakeFiles/emulation.dir/signal/mach_excUser.c.o.d -o src/external/xnu/darling/src/libsystem_kernel/emulation/linux/CMakeFiles/emulation.dir/signal/mach_excUser.c.o -c /build/source/build/src/external/xnu/darling/src/libsystem_kernel/emulation/linux/signal/mach_excUser.c
clang: error: no such file or directory: '/build/source/build/src/external/xnu/darling/src/libsystem_kernel/emulation/linux/signal/mach_excUser.c'
clang: error: no input files

Upstream issue:
darlinghq/darling#1511
Commit fixing it:
darlinghq/darling@f46eb72
(could not find more information upstream)


On Hydra package and test does not build because of "Output limit exceeded".
Fixes build of darling (fails since 2023-11-17):
https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.darling.x86_64-linux
https://hydra.nixos.org/build/271165242

Fixes build of nixosTests.darling (fails since 2023-11-16):
https://hydra.nixos.org/job/nixos/trunk-combined/nixos.tests.darling.x86_64-linux
https://hydra.nixos.org/build/271653953

Size of src without postPatch (3512428168 ~3.3GB) exceeds output limit on Hydra (3421225472):

nix path-info /nix/store/rr9zmigbyykmbb9ym3h00dizhc2b72wy-source --size
/nix/store/rr9zmigbyykmbb9ym3h00dizhc2b72wy-source       3512428168
---
/nix/store/rr9zmigbyykmbb9ym3h00dizhc2b72wy-source         3.3G
---
226M    /nix/store/rr9zmigbyykmbb9ym3h00dizhc2b72wy-source/src/external/openjdk/test
151M    /nix/store/rr9zmigbyykmbb9ym3h00dizhc2b72wy-source/src/external/libmalloc/tests
148M    /nix/store/rr9zmigbyykmbb9ym3h00dizhc2b72wy-source/src/external/libarchive/libarchive/tar/test

Size after (2952729928 ~2.7GB):

nix path-info --size /nix/store/7kphcplf824css0nvbsahahgi1vp0g7l-source
/nix/store/7kphcplf824css0nvbsahahgi1vp0g7l-source       2952729928
---
/nix/store/7kphcplf824css0nvbsahahgi1vp0g7l-source         2.7G

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

- add patch from upstream commit fixing build error:
darlinghq/darling@f46eb72
- add postPatch removing 500MB of dependency test files
to get under Hydra output limit
@ghpzin ghpzin mentioned this pull request Sep 7, 2024
13 tasks
@ofborg ofborg bot requested a review from zhaofengli September 7, 2024 16:03
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Sep 7, 2024
@UnsolvedCypher UnsolvedCypher mentioned this pull request Sep 7, 2024
11 tasks
@Artturin Artturin added the backport release-24.05 Backport PR automatically label Sep 7, 2024
@Artturin Artturin merged commit 47783b2 into NixOS:master Sep 8, 2024
28 of 30 checks passed
Copy link
Contributor

github-actions bot commented Sep 8, 2024

Successfully created backport PR for release-24.05:

@ghpzin ghpzin deleted the darling/fix-build branch September 8, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 backport release-24.05 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants