NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.4k stars 12.9k forks source link

Build failure: python3Packages.curl-cffi on `aarch64-darwin` #320196

Open shivaraj-bh opened 1 week ago

shivaraj-bh commented 1 week ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. build python3Packages.curl-cffi

Build log

* Building wheel...
Using /Users/runner/work/_temp/install/lib to store libcurl-impersonate
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11.0-arm64-cpython-311
creating build/lib.macosx-11.0-arm64-cpython-311/curl_cffi
copying curl_cffi/_asyncio_selector.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi
copying curl_cffi/curl.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi
copying curl_cffi/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi
copying curl_cffi/__version__.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi
copying curl_cffi/aio.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi
copying curl_cffi/const.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi
creating build/lib.macosx-11.0-arm64-cpython-311/curl_cffi/requests
copying curl_cffi/requests/cookies.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi/requests
copying curl_cffi/requests/models.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi/requests
copying curl_cffi/requests/websockets.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi/requests
copying curl_cffi/requests/session.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi/requests
copying curl_cffi/requests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi/requests
copying curl_cffi/requests/exceptions.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi/requests
copying curl_cffi/requests/errors.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi/requests
copying curl_cffi/requests/headers.py -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi/requests
running egg_info
writing curl_cffi.egg-info/PKG-INFO
writing dependency_links to curl_cffi.egg-info/dependency_links.txt
writing requirements to curl_cffi.egg-info/requires.txt
writing top-level names to curl_cffi.egg-info/top_level.txt
reading manifest file 'curl_cffi.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'include/curl/*'
adding license file 'LICENSE'
writing manifest file 'curl_cffi.egg-info/SOURCES.txt'
copying curl_cffi/py.typed -> build/lib.macosx-11.0-arm64-cpython-311/curl_cffi
running build_ext
generating cffi module 'build/temp.macosx-11.0-arm64-cpython-311/curl_cffi._wrapper.c'
creating build/temp.macosx-11.0-arm64-cpython-311
building 'curl_cffi._wrapper' extension
creating build/temp.macosx-11.0-arm64-cpython-311/build
creating build/temp.macosx-11.0-arm64-cpython-311/build/temp.macosx-11.0-arm64-cpython-311
creating build/temp.macosx-11.0-arm64-cpython-311/ffi
clang -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/nix/store/9d4pm78a2zph51iy2py7i1njxnzfscqy-libxcrypt-4.4.36/include -Iinclude -Iffi>
build/temp.macosx-11.0-arm64-cpython-311/curl_cffi._wrapper.c:2067:35: warning: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (>
  return curl_ws_recv(x0, x1, x2, x3, x4);
                                  ^~
/nix/store/fzir4fn0dbba3rbhds7jgavsmbg5fk67-curl-impersonate-chrome-0.6.1-dev/include/curl/websockets.h:56:43: note: passing argument to parameter 'recv' he>
                                  size_t *recv,
                                          ^
build/temp.macosx-11.0-arm64-cpython-311/curl_cffi._wrapper.c:2133:39: warning: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (>
  { result = curl_ws_recv(x0, x1, x2, x3, x4); }
                                      ^~
/nix/store/fzir4fn0dbba3rbhds7jgavsmbg5fk67-curl-impersonate-chrome-0.6.1-dev/include/curl/websockets.h:56:43: note: passing argument to parameter 'recv' he>
                                  size_t *recv,
                                          ^
build/temp.macosx-11.0-arm64-cpython-311/curl_cffi._wrapper.c:2148:35: warning: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (>
  return curl_ws_send(x0, x1, x2, x3, x4, x5);
                                  ^~
/nix/store/fzir4fn0dbba3rbhds7jgavsmbg5fk67-curl-impersonate-chrome-0.6.1-dev/include/curl/websockets.h:71:58: note: passing argument to parameter 'sent' he>
                                  size_t buflen, size_t *sent,
                                                         ^
build/temp.macosx-11.0-arm64-cpython-311/curl_cffi._wrapper.c:2215:39: warning: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (>
  { result = curl_ws_send(x0, x1, x2, x3, x4, x5); }
                                      ^~
/nix/store/fzir4fn0dbba3rbhds7jgavsmbg5fk67-curl-impersonate-chrome-0.6.1-dev/include/curl/websockets.h:71:58: note: passing argument to parameter 'sent' he>
                                  size_t buflen, size_t *sent,
                                                         ^
4 warnings generated.
clang -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/nix/store/9d4pm78a2zph51iy2py7i1njxnzfscqy-libxcrypt-4.4.36/include -Iinclude -Iffi>
ffi/shim.c:9:16: warning: unused variable 'opt_value' [-Wunused-variable]
    CURLoption opt_value = (CURLoption) option;
               ^
1 warning generated.
clang -bundle -undefined dynamic_lookup -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.>
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.8/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.6.2/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.4.6/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpdecimal-4.0.0/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.4.20221231/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-3.0.13/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.45.3/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.4.6/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.3.1/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-apple-framework-SystemConfiguration-11.0.0/lib'
ld: warning: directory not found for option '-L/nix/store/g70w7h6882a1xn49g358ay062rp36sjn-tzdata-2024a/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.23/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-8.2p10/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.8/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.6.2/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.4.6/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpdecimal-4.0.0/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.4.20221231/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-3.0.13/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.45.3/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.4.6/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.3.1/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-apple-framework-SystemConfiguration-11.0.0/lib'
ld: warning: directory not found for option '-L/nix/store/g70w7h6882a1xn49g358ay062rp36sjn-tzdata-2024a/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.23/lib'
ld: warning: directory not found for option '-L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-8.2p10/lib'
/nix/store/9g8qxz6r8x7g01hkzy739m5j6bawk4d5-clang-wrapper-16.0.6/bin/ld: line 269: 20635 Killed: 9               /nix/store/i6f0g5q8z8nnxiz1fi32kan4qzpgr4wv>
clang-16: error: linker command failed with exit code 137 (use -v to see invocation)
error: command '/nix/store/9g8qxz6r8x7g01hkzy739m5j6bawk4d5-clang-wrapper-16.0.6/bin/clang' failed with exit code 1

ERROR Backend subprocess exited when trying to invoke build_wheel

Additional context

Add any other context about the problem here.

Notify maintainers

@chuangzhu

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"aarch64-darwin"`
 - host os: `Darwin 23.5.0, macOS 14.5`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/556di2dgvcsxf0n14hcf616r5ydvv2rj-source`

Add a :+1: reaction to issues you find important.

chuangzhu commented 1 week ago

Related: #319304 cc @drupol

chuangzhu commented 1 week ago

Another issue, it seems that yifeikong/curl_cffi removed the v0.7.0 tag:

$ nix build .#python3Packages.curl-cffi.src -L --rebuild
source> trying https://github.com/yifeikong/curl_cffi/archive/refs/tags/v0.7.0.tar.gz
source>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
source>                                  Dload  Upload   Total   Spent    Left  Speed
source>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
source>   0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
source> curl: (22) The requested URL returned error: 404
source> error: cannot download source from any mirror
drupol commented 1 week ago

I asked upstream: https://github.com/yifeikong/curl_cffi/issues/327

drupol commented 1 week ago

PR to revert to 0.6.4: https://github.com/NixOS/nixpkgs/pull/320219

drupol commented 1 week ago

The PR is ready for review. It fixes curl-cffi and duckduckgo-search (by introducing a missing dependency reqwest-impersonate).

shivaraj-bh commented 1 week ago

curl-cffi on aarch64-darwin fails on pythonImportsCheckPhase now:

@nix { "action": "setPhase", "phase": "pythonImportsCheckPhase" }
Running phase: pythonImportsCheckPhase
Executing pythonImportsCheckPhase
Check whether the following modules can be imported: curl_cffi
/nix/store/a4bjry25m308iixlp67kkwxawfd3cg9h-python-imports-check-hook.sh/nix-support/setup-hook: line 10: 63159 Killed: 9               /nix/store/327bf08j5>
drupol commented 1 week ago

This is going to be difficult for me to debug this, I don't own a Darwin machine (yet) sadly... trying to get sponsors to buy one though! :(

shivaraj-bh commented 1 week ago

I understand. I am checking it out, but can’t do much without more logs :slightly_smiling_face:

drupol commented 1 week ago

Maybe involving @NixOS/darwin-maintainers would help a lot here.

drupol commented 1 week ago

As a workaround, I just updated duckduckgo-search and removed curl-cffi at https://github.com/NixOS/nixpkgs/pull/320471

Reviews are welcome.

drupol commented 1 week ago

duckduckgo-search update: https://github.com/NixOS/nixpkgs/pull/320457

reckenrode commented 1 week ago

What’s being killed? I suspect it’s related to https://github.com/NixOS/nixpkgs/issues/208951.