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

Installation error on ARM macOS: "ERROR: Failed building wheel for lru-dict" #75

Open
corneliusroemer opened this issue Jan 7, 2025 · 1 comment · May be fixed by #76
Open

Installation error on ARM macOS: "ERROR: Failed building wheel for lru-dict" #75

corneliusroemer opened this issue Jan 7, 2025 · 1 comment · May be fixed by #76

Comments

@corneliusroemer
Copy link

corneliusroemer commented Jan 7, 2025

Overview

When running ./install.sh on a freshly checked out repo on macOS 15 on ARM (M1) with Python 3.10, I get ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (lru-dict)

Description

Repro:

  1. Clone repo
  2. Activate Python 3.10, e.g. using micromamba
  3. Run ./install.sh
  4. Observe result

Relevant part of logs:

Building wheels for collected packages: lru-dict
  Building wheel for lru-dict (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for lru-dict (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'lru' extension
      creating build/temp.macosx-11.0-arm64-cpython-310
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/corneliusromer/micromamba/envs/py10/include -arch arm64 -fPIC -O2 -isystem /Users/corneliusromer/micromamba/envs/py10/include -arch arm64 -I/Users/corneliusromer/code/poly-market-maker/.venv/include -I/Users/corneliusromer/micromamba/envs/py10/include/python3.10 -c lru.c -o build/temp.macosx-11.0-arm64-cpython-310/lru.o
      lru.c:629:17: error: incompatible function pointer types initializing 'PyCFunction' (aka 'struct _object *(*)(struct _object *, struct _object *)') with an expression of type 'PyCFunctionWithKeywords' (aka 'struct _object *(*)(struct _object *, struct _object *, struct _object *)') [-Wincompatible-function-pointer-types]
        629 |     {"popitem", (PyCFunctionWithKeywords)LRU_popitem, METH_VARARGS | METH_KEYWORDS,
            |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/opt/homebrew/opt/llvm/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lru-dict
Failed to build lru-dict
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (lru-dict)

Full logs

❯ ./install.sh
Installing dependencies and activating virtualenv...
(re)setting virtual environment
Requirement already satisfied: pip in ./.venv/lib/python3.10/site-packages (23.0.1)
Collecting pip
  Downloading pip-24.3.1-py3-none-any.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 15.8 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.0.1
    Uninstalling pip-23.0.1:
      Successfully uninstalled pip-23.0.1
Successfully installed pip-24.3.1
WARNING: There was an error checking the latest version of pip.
Collecting aiohttp==3.8.1 (from -r requirements.txt (line 1))
  Using cached aiohttp-3.8.1-cp310-cp310-macosx_11_0_arm64.whl.metadata (7.3 kB)
Collecting aiosignal==1.2.0 (from -r requirements.txt (line 2))
  Using cached aiosignal-1.2.0-py3-none-any.whl.metadata (5.5 kB)
Collecting async-timeout==4.0.2 (from -r requirements.txt (line 3))
  Using cached async_timeout-4.0.2-py3-none-any.whl.metadata (4.2 kB)
Collecting base58==2.1.1 (from -r requirements.txt (line 4))
  Using cached base58-2.1.1-py3-none-any.whl.metadata (3.1 kB)
Collecting bitarray==1.2.2 (from -r requirements.txt (line 5))
  Using cached bitarray-1.2.2-cp310-cp310-macosx_15_0_arm64.whl
Collecting certifi==2021.10.8 (from -r requirements.txt (line 6))
  Using cached certifi-2021.10.8-py2.py3-none-any.whl.metadata (3.0 kB)
Collecting charset-normalizer==2.0.12 (from -r requirements.txt (line 7))
  Using cached charset_normalizer-2.0.12-py3-none-any.whl.metadata (11 kB)
Collecting cytoolz==0.11.2 (from -r requirements.txt (line 8))
  Using cached cytoolz-0.11.2-cp310-cp310-macosx_15_0_arm64.whl
Collecting eip712-structs==1.1.0 (from -r requirements.txt (line 9))
  Using cached eip712_structs-1.1.0-py3-none-any.whl
Collecting eth-abi==2.1.1 (from -r requirements.txt (line 10))
  Using cached eth_abi-2.1.1-py3-none-any.whl.metadata (5.7 kB)
Collecting eth-account==0.5.7 (from -r requirements.txt (line 11))
  Using cached eth_account-0.5.7-py3-none-any.whl.metadata (6.1 kB)
Collecting eth-hash==0.3.2 (from -r requirements.txt (line 12))
  Using cached eth_hash-0.3.2-py3-none-any.whl.metadata (6.3 kB)
Collecting eth-keyfile==0.5.1 (from -r requirements.txt (line 13))
  Using cached eth_keyfile-0.5.1-py3-none-any.whl.metadata (7.3 kB)
Collecting eth-keys==0.3.4 (from -r requirements.txt (line 14))
  Using cached eth_keys-0.3.4-py3-none-any.whl.metadata (12 kB)
Collecting eth-rlp==0.2.1 (from -r requirements.txt (line 15))
  Using cached eth_rlp-0.2.1-py3-none-any.whl.metadata (5.3 kB)
Collecting eth-typing==2.3.0 (from -r requirements.txt (line 16))
  Using cached eth_typing-2.3.0-py3-none-any.whl.metadata (5.3 kB)
Collecting eth-utils==1.10.0 (from -r requirements.txt (line 17))
  Using cached eth_utils-1.10.0-py3-none-any.whl.metadata (5.8 kB)
Collecting frozenlist==1.3.0 (from -r requirements.txt (line 18))
  Using cached frozenlist-1.3.0-cp310-cp310-macosx_11_0_arm64.whl.metadata (4.7 kB)
Collecting hexbytes==0.2.2 (from -r requirements.txt (line 19))
  Using cached hexbytes-0.2.2-py3-none-any.whl.metadata (6.2 kB)
Collecting idna==3.3 (from -r requirements.txt (line 20))
  Using cached idna-3.3-py3-none-any.whl.metadata (9.8 kB)
Collecting iniconfig==1.1.1 (from -r requirements.txt (line 21))
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl.metadata (2.4 kB)
Collecting ipfshttpclient==0.8.0a2 (from -r requirements.txt (line 22))
  Using cached ipfshttpclient-0.8.0a2-py3-none-any.whl.metadata (11 kB)
Collecting jsonschema==3.2.0 (from -r requirements.txt (line 23))
  Using cached jsonschema-3.2.0-py2.py3-none-any.whl.metadata (7.8 kB)
Collecting lru-dict==1.1.7 (from -r requirements.txt (line 24))
  Using cached lru-dict-1.1.7.tar.gz (10 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting multiaddr==0.0.9 (from -r requirements.txt (line 25))
  Using cached multiaddr-0.0.9-py2.py3-none-any.whl.metadata (5.0 kB)
Collecting multidict==6.0.2 (from -r requirements.txt (line 26))
  Using cached multidict-6.0.2-cp310-cp310-macosx_11_0_arm64.whl.metadata (4.1 kB)
Collecting netaddr==0.8.0 (from -r requirements.txt (line 27))
  Using cached netaddr-0.8.0-py2.py3-none-any.whl.metadata (4.9 kB)
Collecting packaging==21.3 (from -r requirements.txt (line 28))
  Using cached packaging-21.3-py3-none-any.whl.metadata (15 kB)
Collecting parsimonious==0.8.1 (from -r requirements.txt (line 29))
  Using cached parsimonious-0.8.1-py3-none-any.whl
Collecting pluggy==1.0.0 (from -r requirements.txt (line 30))
  Using cached pluggy-1.0.0-py2.py3-none-any.whl.metadata (4.3 kB)
Collecting protobuf==3.19.4 (from -r requirements.txt (line 31))
  Using cached protobuf-3.19.4-cp310-cp310-macosx_10_9_universal2.whl.metadata (806 bytes)
Collecting py==1.11.0 (from -r requirements.txt (line 32))
  Using cached py-1.11.0-py2.py3-none-any.whl.metadata (2.8 kB)
Collecting py-clob-client>=0.13.3 (from -r requirements.txt (line 33))
  Using cached py_clob_client-0.18.0.tar.gz (22 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting py-order-utils>=0.0.21 (from -r requirements.txt (line 34))
  Using cached py_order_utils-0.3.2-py3-none-any.whl.metadata (1.6 kB)
Collecting pycryptodome==3.14.1 (from -r requirements.txt (line 35))
  Using cached pycryptodome-3.14.1-cp35-abi3-macosx_15_0_arm64.whl
Collecting pyparsing==3.0.7 (from -r requirements.txt (line 36))
  Using cached pyparsing-3.0.7-py3-none-any.whl.metadata (4.2 kB)
Collecting pyrsistent==0.18.1 (from -r requirements.txt (line 37))
  Using cached pyrsistent-0.18.1-cp310-cp310-macosx_10_9_universal2.whl.metadata (26 kB)
Collecting pysha3==1.0.2 (from -r requirements.txt (line 38))
  Using cached pysha3-1.0.2-cp310-cp310-macosx_15_0_arm64.whl
Collecting PyYAML==6.0 (from -r requirements.txt (line 39))
  Using cached PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl.metadata (2.0 kB)
Collecting requests==2.27.1 (from -r requirements.txt (line 40))
  Using cached requests-2.27.1-py2.py3-none-any.whl.metadata (5.0 kB)
Collecting rlp==2.0.1 (from -r requirements.txt (line 41))
  Using cached rlp-2.0.1-py2.py3-none-any.whl.metadata (3.1 kB)
Collecting six==1.16.0 (from -r requirements.txt (line 42))
  Using cached six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Collecting tomli==2.0.1 (from -r requirements.txt (line 43))
  Using cached tomli-2.0.1-py3-none-any.whl.metadata (8.9 kB)
Collecting toolz==0.11.2 (from -r requirements.txt (line 44))
  Using cached toolz-0.11.2-py3-none-any.whl.metadata (5.1 kB)
Collecting urllib3==1.26.8 (from -r requirements.txt (line 45))
  Using cached urllib3-1.26.8-py2.py3-none-any.whl.metadata (45 kB)
Collecting varint==1.0.2 (from -r requirements.txt (line 46))
  Using cached varint-1.0.2-py3-none-any.whl
Collecting web3==5.28.0 (from -r requirements.txt (line 47))
  Using cached web3-5.28.0-py3-none-any.whl.metadata (6.0 kB)
Collecting websockets==9.1 (from -r requirements.txt (line 48))
  Using cached websockets-9.1-cp310-cp310-macosx_15_0_arm64.whl
Collecting yarl==1.7.2 (from -r requirements.txt (line 49))
  Using cached yarl-1.7.2-cp310-cp310-macosx_11_0_arm64.whl.metadata (19 kB)
Collecting prometheus_client==0.14.1 (from -r requirements.txt (line 50))
  Using cached prometheus_client-0.14.1-py3-none-any.whl.metadata (21 kB)
Collecting attrs>=17.3.0 (from aiohttp==3.8.1->-r requirements.txt (line 1))
  Using cached attrs-24.3.0-py3-none-any.whl.metadata (11 kB)
Requirement already satisfied: setuptools in ./.venv/lib/python3.10/site-packages (from jsonschema==3.2.0->-r requirements.txt (line 23)) (65.5.0)
INFO: pip is looking at multiple versions of py-clob-client to determine which version is compatible with other requirements. This could take a while.
Collecting py-clob-client>=0.13.3 (from -r requirements.txt (line 33))
  Using cached py_clob_client-0.17.5-py3-none-any.whl.metadata (3.9 kB)
  Using cached py_clob_client-0.17.4.tar.gz (22 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  Using cached py_clob_client-0.17.3.tar.gz (22 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  Using cached py_clob_client-0.17.2-py3-none-any.whl.metadata (3.9 kB)
  Using cached py_clob_client-0.17.1-py3-none-any.whl
Collecting python-dotenv (from py-clob-client>=0.13.3->-r requirements.txt (line 33))
  Using cached python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)
INFO: pip is looking at multiple versions of py-order-utils to determine which version is compatible with other requirements. This could take a while.
Collecting py-order-utils>=0.0.21 (from -r requirements.txt (line 34))
  Using cached py_order_utils-0.3.1-py3-none-any.whl.metadata (1.6 kB)
  Using cached py_order_utils-0.3.0-py3-none-any.whl
Collecting pytest (from py-order-utils>=0.0.21->-r requirements.txt (line 34))
  Using cached pytest-8.3.4-py3-none-any.whl.metadata (7.5 kB)
Collecting exceptiongroup>=1.0.0rc8 (from pytest->py-order-utils>=0.0.21->-r requirements.txt (line 34))
  Using cached exceptiongroup-1.2.2-py3-none-any.whl.metadata (6.6 kB)
INFO: pip is looking at multiple versions of pytest to determine which version is compatible with other requirements. This could take a while.
Collecting pytest (from py-order-utils>=0.0.21->-r requirements.txt (line 34))
  Using cached pytest-8.3.3-py3-none-any.whl.metadata (7.5 kB)
  Using cached pytest-8.3.2-py3-none-any.whl.metadata (7.5 kB)
  Using cached pytest-8.3.1-py3-none-any.whl.metadata (7.5 kB)
  Using cached pytest-8.3.0-py3-none-any.whl.metadata (7.5 kB)
  Using cached pytest-8.2.2-py3-none-any.whl.metadata (7.6 kB)
  Using cached pytest-8.2.1-py3-none-any.whl.metadata (7.6 kB)
  Using cached pytest-8.2.0-py3-none-any.whl.metadata (7.5 kB)
INFO: pip is still looking at multiple versions of pytest to determine which version is compatible with other requirements. This could take a while.
  Using cached pytest-8.1.2-py3-none-any.whl.metadata (7.6 kB)
  Using cached pytest-8.1.1-py3-none-any.whl.metadata (7.6 kB)
  Using cached pytest-8.0.2-py3-none-any.whl.metadata (7.7 kB)
  Using cached pytest-8.0.1-py3-none-any.whl.metadata (7.7 kB)
  Using cached pytest-8.0.0-py3-none-any.whl.metadata (7.8 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Using cached pytest-7.4.4-py3-none-any.whl.metadata (7.9 kB)
Using cached aiohttp-3.8.1-cp310-cp310-macosx_11_0_arm64.whl (552 kB)
Using cached aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Using cached base58-2.1.1-py3-none-any.whl (5.6 kB)
Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Using cached eth_abi-2.1.1-py3-none-any.whl (27 kB)
Using cached eth_account-0.5.7-py3-none-any.whl (101 kB)
Using cached eth_hash-0.3.2-py3-none-any.whl (8.8 kB)
Using cached eth_keyfile-0.5.1-py3-none-any.whl (8.3 kB)
Using cached eth_keys-0.3.4-py3-none-any.whl (21 kB)
Using cached eth_rlp-0.2.1-py3-none-any.whl (5.0 kB)
Using cached eth_typing-2.3.0-py3-none-any.whl (6.2 kB)
Using cached eth_utils-1.10.0-py3-none-any.whl (24 kB)
Using cached frozenlist-1.3.0-cp310-cp310-macosx_11_0_arm64.whl (34 kB)
Using cached hexbytes-0.2.2-py3-none-any.whl (6.1 kB)
Using cached idna-3.3-py3-none-any.whl (61 kB)
Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Using cached ipfshttpclient-0.8.0a2-py3-none-any.whl (82 kB)
Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Using cached multiaddr-0.0.9-py2.py3-none-any.whl (16 kB)
Using cached multidict-6.0.2-cp310-cp310-macosx_11_0_arm64.whl (29 kB)
Using cached netaddr-0.8.0-py2.py3-none-any.whl (1.9 MB)
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Using cached protobuf-3.19.4-cp310-cp310-macosx_10_9_universal2.whl (961 kB)
Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Using cached pyrsistent-0.18.1-cp310-cp310-macosx_10_9_universal2.whl (81 kB)
Using cached PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl (173 kB)
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Using cached rlp-2.0.1-py2.py3-none-any.whl (20 kB)
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Using cached toolz-0.11.2-py3-none-any.whl (55 kB)
Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Using cached web3-5.28.0-py3-none-any.whl (499 kB)
Using cached yarl-1.7.2-cp310-cp310-macosx_11_0_arm64.whl (118 kB)
Using cached prometheus_client-0.14.1-py3-none-any.whl (59 kB)
Using cached attrs-24.3.0-py3-none-any.whl (63 kB)
Using cached pytest-7.4.4-py3-none-any.whl (325 kB)
Using cached python_dotenv-1.0.1-py3-none-any.whl (19 kB)
Using cached exceptiongroup-1.2.2-py3-none-any.whl (16 kB)
Building wheels for collected packages: lru-dict
  Building wheel for lru-dict (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for lru-dict (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'lru' extension
      creating build/temp.macosx-11.0-arm64-cpython-310
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/corneliusromer/micromamba/envs/py10/include -arch arm64 -fPIC -O2 -isystem /Users/corneliusromer/micromamba/envs/py10/include -arch arm64 -I/Users/corneliusromer/code/poly-market-maker/.venv/include -I/Users/corneliusromer/micromamba/envs/py10/include/python3.10 -c lru.c -o build/temp.macosx-11.0-arm64-cpython-310/lru.o
      lru.c:629:17: error: incompatible function pointer types initializing 'PyCFunction' (aka 'struct _object *(*)(struct _object *, struct _object *)') with an expression of type 'PyCFunctionWithKeywords' (aka 'struct _object *(*)(struct _object *, struct _object *, struct _object *)') [-Wincompatible-function-pointer-types]
        629 |     {"popitem", (PyCFunctionWithKeywords)LRU_popitem, METH_VARARGS | METH_KEYWORDS,
            |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/opt/homebrew/opt/llvm/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lru-dict
Failed to build lru-dict
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (lru-dict)
@corneliusroemer
Copy link
Author

lru-dict only added ARM support in the most recent version 1.3.0: https://github.com/amitdev/lru-dict

Currently it's pinned to 1.1.7 in requirements.txt:

❯ rg lru-dict
requirements.txt
24:lru-dict==1.1.7

@corneliusroemer corneliusroemer changed the title Installation error on macOS: "ERROR: Failed building wheel for lru-dict" Installation error on ARM macOS: "ERROR: Failed building wheel for lru-dict" Jan 7, 2025
corneliusroemer added a commit to corneliusroemer/poly-market-maker that referenced this issue Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant