LnL7 / nix-darwin

nix modules for darwin
MIT License
2.79k stars 430 forks source link

Build failure: python312Packages.pyuv #1029

Open mudrii opened 1 month ago

mudrii commented 1 month ago

Describe the bug

Failed to build post-system update

darwin-rebuild switch --flake ~/src/system-config/.# --show-trace

Steps To Reproduce

Steps to reproduce the behavior:

  1. run darwin-rebuild switch --flake ~/src/system-config/.# --show-trace

Expected behavior

System to update with the latest changes to python3.13 from python3.11 Error during the update process.

 darwin-rebuild switch --flake ~/src/system-config/.# --show-trace
warning: Git tree '/Users/mudrii/src/system-config' is dirty
building the system configuration...
warning: Git tree '/Users/mudrii/src/system-config' is dirty
error: builder for '/nix/store/x3vpgadlb8vc908pd2gyl4ld1mxmyg9x-python3.12-pyuv-1.4.0.drv' failed with exit code 1;
       last 10 log lines:
       > clang-16: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
       > clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/nix/store/y4jnf1smcbpw5sb2pnj1yih65jqbak7z-libxcrypt-4.4.36/include -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/nix/store/1sgajx2r3bkriyxzwsahhva63p08pmac-python3-3.12.4/include/python3.12 -Ideps/libuv/include -Ideps/libuv/src -c deps/libuv/src/unix/darwin-proctitle.c -o build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src/unix/darwin-proctitle.o
       > clang-16: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
       > deps/libuv/src/unix/darwin-proctitle.c:30:11: fatal error: 'ApplicationServices/ApplicationServices.h' file not found
       > # include <ApplicationServices/ApplicationServices.h>
       >           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       > 1 error generated.
       > error: command '/nix/store/wsgvg07q93xmaqp6ln58kzr75rg6jm40-clang-wrapper-16.0.6/bin/clang' failed with exit code 1
       >
       > ERROR Backend subprocess exited when trying to invoke build_wheel
       For full logs, run 'nix log /nix/store/x3vpgadlb8vc908pd2gyl4ld1mxmyg9x-python3.12-pyuv-1.4.0.drv'.
error: 1 dependencies of derivation '/nix/store/r7w5v0q60kc8r6y211vn6wpmi006aq10-python3.12-powerline-2.8.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1j6wma0kxcx58ajlw60083a0qbhp7x0g-hm_tmuxtmux.conf.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3f9czvs6y92qilamndzjlhgbm198kb8j-home-manager-files.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4lrvdghw8gfnb3g769klk2cpvyybzs6v-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1y6gijlrl227zwaam9y6yh8a955pqw4a-activation-mudrii.drv' failed to build
error (ignored): error: cannot unlink '/private/tmp/nix-build-pulumi-3.122.0.drv-12/pulumi/pkg': Directory not empty
error (ignored): error: cannot unlink '/private/tmp/nix-build-typescript-language-server-4.3.3.drv-13/tmp.7ubxThy9Ec/Library/Caches/Yarn/v6/npm-@typescript-eslint-scope-manager-6.21.0-ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1/node_modules/@typescript-eslint/scope-manager/dist/lib': Directory not empty
error: 1 dependencies of derivation '/nix/store/ly683ishl6w1z1rfr5vpz14mc2xbrr0s-darwin-system-24.11.20240805.d3f42bd+darwin4.91010a5.drv' failed to build

Additional context

The main issue seems related to 'clang-wrapper-16.0.6/bin/clang'

> deps/libuv/src/unix/darwin-proctitle.c:30:11: fatal error: 'ApplicationServices/ApplicationServices.h' file not found
       > # include <ApplicationServices/ApplicationServices.h>
find /Applications/Xcode.app -name "ApplicationServices.h"
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Headers/ApplicationServices.h
xcrun --show-sdk-path   
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

Metadata

 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.5.0, macOS 14.5`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.4`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

More comprehensive log

@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/nhpy15q0383r6kcmq0rsbcizc5lwcaqi-source
calling 'unpackCmd' function hook '_defaultUnpack' /nix/store/nhpy15q0383r6kcmq0rsbcizc5lwcaqi-source
source root is source
calling 'postUnpack' function hook '_ensureNewerSources'
calling 'postUnpack' function hook '_updateSourceDateEpochFromSourceRoot'
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/tox.ini
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
applying patch /nix/store/7xizjv1qwdz86bazgbxmsvxdsvmzivkh-fix-build-with-python3.10.patch
patching file src/handle.c
applying patch /nix/store/248dd6b66sy6wwk08n1fnxpf1k9idk9g-fix-build-with-python3.11.patch
patching file src/common.c
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
calling 'preConfigure' function hook '_multioutConfig'
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
Executing pypaBuildPhase
Creating a wheel...
* Getting build dependencies for wheel...
running egg_info
creating pyuv.egg-info
writing pyuv.egg-info/PKG-INFO
writing dependency_links to pyuv.egg-info/dependency_links.txt
writing top-level names to pyuv.egg-info/top_level.txt
writing manifest file 'pyuv.egg-info/SOURCES.txt'
reading manifest file 'pyuv.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'patches'
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
adding license file 'AUTHORS'
writing manifest file 'pyuv.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11.0-arm64-cpython-312
creating build/lib.macosx-11.0-arm64-cpython-312/pyuv
copying pyuv/_version.py -> build/lib.macosx-11.0-arm64-cpython-312/pyuv
copying pyuv/__init__.py -> build/lib.macosx-11.0-arm64-cpython-312/pyuv
running build_ext
building 'pyuv._cpyuv' extension
creating build/temp.macosx-11.0-arm64-cpython-312
creating build/temp.macosx-11.0-arm64-cpython-312/deps
creating build/temp.macosx-11.0-arm64-cpython-312/deps/libuv
creating build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src
creating build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src/unix
creating build/temp.macosx-11.0-arm64-cpython-312/src
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/nix/store/y4jnf1smcbpw5sb2pnj1yih65jqbak7z-libxcrypt-4.4.36/include -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/nix/store/1sgajx2r3bkriyxzwsahhva63p08pmac-python3-3.12.4/include/python3.12 -Ideps/libuv/include -Ideps/libuv/src -c deps/libuv/src/fs-poll.c -o build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src/fs-poll.o
clang-16: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/nix/store/y4jnf1smcbpw5sb2pnj1yih65jqbak7z-libxcrypt-4.4.36/include -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/nix/store/1sgajx2r3bkriyxzwsahhva63p08pmac-python3-3.12.4/include/python3.12 -Ideps/libuv/include -Ideps/libuv/src -c deps/libuv/src/inet.c -o build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src/inet.o
clang-16: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/nix/store/y4jnf1smcbpw5sb2pnj1yih65jqbak7z-libxcrypt-4.4.36/include -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/nix/store/1sgajx2r3bkriyxzwsahhva63p08pmac-python3-3.12.4/include/python3.12 -Ideps/libuv/include -Ideps/libuv/src -c deps/libuv/src/threadpool.c -o build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src/threadpool.o
clang-16: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/nix/store/y4jnf1smcbpw5sb2pnj1yih65jqbak7z-libxcrypt-4.4.36/include -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/nix/store/1sgajx2r3bkriyxzwsahhva63p08pmac-python3-3.12.4/include/python3.12 -Ideps/libuv/include -Ideps/libuv/src -c deps/libuv/src/unix/async.c -o build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src/unix/async.o
clang-16: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/nix/store/y4jnf1smcbpw5sb2pnj1yih65jqbak7z-libxcrypt-4.4.36/include -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/nix/store/1sgajx2r3bkriyxzwsahhva63p08pmac-python3-3.12.4/include/python3.12 -Ideps/libuv/include -Ideps/libuv/src -c deps/libuv/src/unix/bsd-ifaddrs.c -o build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src/unix/bsd-ifaddrs.o
clang-16: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/nix/store/y4jnf1smcbpw5sb2pnj1yih65jqbak7z-libxcrypt-4.4.36/include -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/nix/store/1sgajx2r3bkriyxzwsahhva63p08pmac-python3-3.12.4/include/python3.12 -Ideps/libuv/include -Ideps/libuv/src -c deps/libuv/src/unix/core.c -o build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src/unix/core.o
clang-16: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/nix/store/y4jnf1smcbpw5sb2pnj1yih65jqbak7z-libxcrypt-4.4.36/include -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/nix/store/1sgajx2r3bkriyxzwsahhva63p08pmac-python3-3.12.4/include/python3.12 -Ideps/libuv/include -Ideps/libuv/src -c deps/libuv/src/unix/darwin-proctitle.c -o build/temp.macosx-11.0-arm64-cpython-312/deps/libuv/src/unix/darwin-proctitle.o
clang-16: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
deps/libuv/src/unix/darwin-proctitle.c:30:11: fatal error: 'ApplicationServices/ApplicationServices.h' file not found
# include <ApplicationServices/ApplicationServices.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/nix/store/wsgvg07q93xmaqp6ln58kzr75rg6jm40-clang-wrapper-16.0.6/bin/clang' failed with exit code 1

ERROR Backend subprocess exited when trying to invoke build_wheel

Issue was raised in pkgs https://github.com/NixOS/nixpkgs/issues/331474

mudrii commented 1 month ago

now having a different set of errors:

 darwin-rebuild switch --flake ~/src/system-config/.# --show-trace
warning: Git tree '/Users/mudrii/src/system-config' is dirty
building the system configuration...
warning: Git tree '/Users/mudrii/src/system-config' is dirty
error: builder for '/nix/store/cka1mzmmn200lds6k7c4qz9jxqqd5g89-python3.12-pynput-1.7.6.drv' failed with exit code 1;
       last 10 log lines:
       > adding 'pynput-1.7.6.dist-info/RECORD'
       > removing build/bdist.macosx-11.0-arm64/wheel
       > Successfully built pynput-1.7.6-py2.py3-none-any.whl
       > Finished creating a wheel...
       > Finished executing pypaBuildPhase
       > Running phase: pythonRuntimeDepsCheckHook
       > Executing pythonRuntimeDepsCheck
       > Checking runtime dependencies for pynput-1.7.6-py2.py3-none-any.whl
       >   - pyobjc-framework-applicationservices not installed
       >   - pyobjc-framework-quartz not installed
       For full logs, run 'nix log /nix/store/cka1mzmmn200lds6k7c4qz9jxqqd5g89-python3.12-pynput-1.7.6.drv'.
error: 1 dependencies of derivation '/nix/store/gs3vr4k896hmyhcs63mzb6326cifwzvs-python3-3.12.4-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/s16dfrjicv12zwh2kx65dzxhvxl74cdy-home-manager-applications.drv' failed to build
error (ignored): error: cannot unlink '/private/tmp/nix-build-tlrc-1.9.3.drv-3/tlrc-1.9.3-vendor.tar.gz/winapi-x86_64-pc-windows-gnu/lib': Directory not empty
error (ignored): error: cannot unlink '/private/tmp/nix-build-pulumi-3.122.0.drv-3/pulumi/sdk/python/lib/test': Directory not empty
error: 1 dependencies of derivation '/nix/store/1vvbd8h0x07sakc559q043q47lib3bqy-home-manager-fonts.drv' failed to build
error: 1 dependencies of derivation '/nix/store/w1hy2rr7y33dr8hag77jmdsac3g26y5i-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/akw3xpv5yifr2xmb5p7154q5r2wvq2ah-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/grbygc4zi4y8g4giag276byzaj7kbfsp-python3-3.12.4-env-fish-completions.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7c58mghpsyw7cknhmxxbk39wm4x88ddj-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/an93mnp1q68vy6krngfzcipm1fl39xmn-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/202iijalmm9ynfwvkzg3r2pxyw7scyk0-activation-mudrii.drv' failed to build
error: 1 dependencies of derivation '/nix/store/238kzckvlhm975pgwrqikcn6vilgas9r-darwin-system-24.11.20240814.daf7bb9+darwin4.91010a5.drv' failed to build
emilazy commented 1 month ago

Thanks for the report. I don’t think this is a nix-darwin issue; could you report this upstream to Nixpkgs so that the relevant maintainers can take a look?

mudrii commented 1 month ago

The issue was reported before posted here https://github.com/NixOS/nixpkgs/issues/331474