aider icon indicating copy to clipboard operation
aider copied to clipboard

Failed to build `multidict==6.0.4`

Open lpender opened this issue 1 year ago • 3 comments

Issue

Got this running aider-install with python 3.13.3 via asdf

  × Failed to build `multidict==6.0.4`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

      [stdout]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      creating build/lib.macosx-14.0-arm64-cpython-312/multidict
      copying multidict/_multidict_py.py -> build/lib.macosx-14.0-arm64-cpython-312/multidict
      copying multidict/_abc.py -> build/lib.macosx-14.0-arm64-cpython-312/multidict
      copying multidict/__init__.py -> build/lib.macosx-14.0-arm64-cpython-312/multidict
      copying multidict/_multidict_base.py -> build/lib.macosx-14.0-arm64-cpython-312/multidict
      copying multidict/_compat.py -> build/lib.macosx-14.0-arm64-cpython-312/multidict
      running egg_info
      writing multidict.egg-info/PKG-INFO
      writing dependency_links to multidict.egg-info/dependency_links.txt
      writing top-level names to multidict.egg-info/top_level.txt
      reading manifest file 'multidict.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'multidict.egg-info/SOURCES.txt'
      copying multidict/__init__.pyi -> build/lib.macosx-14.0-arm64-cpython-312/multidict
      copying multidict/py.typed -> build/lib.macosx-14.0-arm64-cpython-312/multidict
      running build_ext
      building 'multidict._multidict' extension
      creating build/temp.macosx-14.0-arm64-cpython-312/multidict
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/Users/lpender/.cache/uv/builds-v0/.tmplfJBvS/include
      -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c multidict/_multidict.c -o build/temp.macosx-14.0-arm64-cpython-312/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing -pedantic

      [stderr]
      /Users/lpender/.cache/uv/builds-v0/.tmplfJBvS/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: Apache Software License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files found matching 'multidict/_multidict.html'
      warning: no previously-included files found matching 'multidict/*.so'
      warning: no previously-included files found matching 'multidict/*.pyd'
      warning: no previously-included files found matching 'multidict/*.pyd'
      no previously-included directories found matching 'docs/_build'
      /Users/lpender/.cache/uv/builds-v0/.tmplfJBvS/lib/python3.12/site-packages/setuptools/command/build_py.py:212: _Warning: Package 'multidict._multilib' is absent from the `packages` configuration.
      !!

              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'multidict._multilib' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.

              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'multidict._multilib' is explicitly added
              to the `packages` configuration field.

              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).

              You can read more about "package discovery" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

              If you don't want 'multidict._multilib' to be distributed and are
              already explicitly excluding 'multidict._multilib' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.

              You can read more about "package data files" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************

      !!
        check.warn(importable)
      In file included from multidict/_multidict.c:9:
      multidict/_multilib/iter.h:225:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
        225 | multidict_iter_init()
            |                    ^
            |                     void
      In file included from multidict/_multidict.c:10:
      multidict/_multilib/views.h:388:21: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
        388 | multidict_views_init()
            |                     ^
            |                      void
      multidict/_multidict.c:458:37: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
        458 |     static _PyArg_Parser _parser = {NULL, _keywords, "getall", 0};
            |                                     ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
         26 | #define NULL ((void *)0)
            |              ^~~~~~~~~~~
      multidict/_multidict.c:458:43: warning: incompatible pointer types initializing 'const char *' with an expression of type 'const char *const[3]' [-Wincompatible-pointer-types]
        458 |     static _PyArg_Parser _parser = {NULL, _keywords, "getall", 0};
            |                                           ^~~~~~~~~
      multidict/_multidict.c:458:54: warning: incompatible pointer types initializing 'const char *const *' with an expression of type 'char[7]' [-Wincompatible-pointer-types]
        458 |     static _PyArg_Parser _parser = {NULL, _keywords, "getall", 0};
            |                                                      ^~~~~~~~
      multidict/_multidict.c:503:37: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
        503 |     static _PyArg_Parser _parser = {NULL, _keywords, "getone", 0};
            |                                     ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
         26 | #define NULL ((void *)0)
            |              ^~~~~~~~~~~
      multidict/_multidict.c:503:43: warning: incompatible pointer types initializing 'const char *' with an expression of type 'const char *const[3]' [-Wincompatible-pointer-types]
        503 |     static _PyArg_Parser _parser = {NULL, _keywords, "getone", 0};
            |                                           ^~~~~~~~~
      multidict/_multidict.c:503:54: warning: incompatible pointer types initializing 'const char *const *' with an expression of type 'char[7]' [-Wincompatible-pointer-types]
        503 |     static _PyArg_Parser _parser = {NULL, _keywords, "getone", 0};
            |                                                      ^~~~~~~~
      multidict/_multidict.c:538:37: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
        538 |     static _PyArg_Parser _parser = {NULL, _keywords, "get", 0};
            |                                     ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
         26 | #define NULL ((void *)0)
            |              ^~~~~~~~~~~
      multidict/_multidict.c:538:43: warning: incompatible pointer types initializing 'const char *' with an expression of type 'const char *const[3]' [-Wincompatible-pointer-types]
        538 |     static _PyArg_Parser _parser = {NULL, _keywords, "get", 0};
            |                                           ^~~~~~~~~
      multidict/_multidict.c:538:54: warning: incompatible pointer types initializing 'const char *const *' with an expression of type 'char[4]' [-Wincompatible-pointer-types]
        538 |     static _PyArg_Parser _parser = {NULL, _keywords, "get", 0};
            |                                                      ^~~~~
      multidict/_multidict.c:712:5: warning: 'UsingDeprecatedTrashcanMacro' is deprecated [-Wdeprecated-declarations]
        712 |     Py_TRASHCAN_SAFE_BEGIN(self);
            |     ^
      /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/object.h:551:9: note: expanded from macro 'Py_TRASHCAN_SAFE_BEGIN'
        551 |         UsingDeprecatedTrashcanMacro cond=1; \
            |         ^
      /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/object.h:548:1: note: 'UsingDeprecatedTrashcanMacro' has been explicitly marked deprecated here
        548 | Py_DEPRECATED(3.11) typedef int UsingDeprecatedTrashcanMacro;
            | ^
      /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
        317 | #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
            |                                                      ^
      multidict/_multidict.c:780:37: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
        780 |     static _PyArg_Parser _parser = {NULL, _keywords, "add", 0};
            |                                     ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
         26 | #define NULL ((void *)0)
            |              ^~~~~~~~~~~
      multidict/_multidict.c:780:43: warning: incompatible pointer types initializing 'const char *' with an expression of type 'const char *const[3]' [-Wincompatible-pointer-types]
        780 |     static _PyArg_Parser _parser = {NULL, _keywords, "add", 0};
            |                                           ^~~~~~~~~
      multidict/_multidict.c:780:54: warning: incompatible pointer types initializing 'const char *const *' with an expression of type 'char[4]' [-Wincompatible-pointer-types]
        780 |     static _PyArg_Parser _parser = {NULL, _keywords, "add", 0};
            |                                                      ^~~~~
      multidict/_multidict.c:839:37: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
        839 |     static _PyArg_Parser _parser = {NULL, _keywords, "setdefault", 0};
            |                                     ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
         26 | #define NULL ((void *)0)
            |              ^~~~~~~~~~~
      multidict/_multidict.c:839:43: warning: incompatible pointer types initializing 'const char *' with an expression of type 'const char *const[3]' [-Wincompatible-pointer-types]
        839 |     static _PyArg_Parser _parser = {NULL, _keywords, "setdefault", 0};
            |                                           ^~~~~~~~~
      multidict/_multidict.c:839:54: warning: incompatible pointer types initializing 'const char *const *' with an expression of type 'char[11]' [-Wincompatible-pointer-types]
        839 |     static _PyArg_Parser _parser = {NULL, _keywords, "setdefault", 0};
            |                                                      ^~~~~~~~~~~~
      multidict/_multidict.c:875:37: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
        875 |     static _PyArg_Parser _parser = {NULL, _keywords, "popone", 0};
            |                                     ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
         26 | #define NULL ((void *)0)
            |              ^~~~~~~~~~~
      multidict/_multidict.c:875:43: warning: incompatible pointer types initializing 'const char *' with an expression of type 'const char *const[3]' [-Wincompatible-pointer-types]
        875 |     static _PyArg_Parser _parser = {NULL, _keywords, "popone", 0};
            |                                           ^~~~~~~~~
      multidict/_multidict.c:875:54: warning: incompatible pointer types initializing 'const char *const *' with an expression of type 'char[7]' [-Wincompatible-pointer-types]
        875 |     static _PyArg_Parser _parser = {NULL, _keywords, "popone", 0};
            |                                                      ^~~~~~~~
      multidict/_multidict.c:922:37: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
        922 |     static _PyArg_Parser _parser = {NULL, _keywords, "pop", 0};
            |                                     ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
         26 | #define NULL ((void *)0)
            |              ^~~~~~~~~~~
      multidict/_multidict.c:922:43: warning: incompatible pointer types initializing 'const char *' with an expression of type 'const char *const[3]' [-Wincompatible-pointer-types]
        922 |     static _PyArg_Parser _parser = {NULL, _keywords, "pop", 0};
            |                                           ^~~~~~~~~
      multidict/_multidict.c:922:54: warning: incompatible pointer types initializing 'const char *const *' with an expression of type 'char[4]' [-Wincompatible-pointer-types]
        922 |     static _PyArg_Parser _parser = {NULL, _keywords, "pop", 0};
            |                                                      ^~~~~
      multidict/_multidict.c:970:37: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
        970 |     static _PyArg_Parser _parser = {NULL, _keywords, "popall", 0};
            |                                     ^~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/include/__stddef_null.h:26:14: note: expanded from macro 'NULL'
         26 | #define NULL ((void *)0)
            |              ^~~~~~~~~~~
      multidict/_multidict.c:970:43: warning: incompatible pointer types initializing 'const char *' with an expression of type 'const char *const[3]' [-Wincompatible-pointer-types]
        970 |     static _PyArg_Parser _parser = {NULL, _keywords, "popall", 0};
            |                                           ^~~~~~~~~
      multidict/_multidict.c:970:54: warning: incompatible pointer types initializing 'const char *const *' with an expression of type 'char[7]' [-Wincompatible-pointer-types]
        970 |     static _PyArg_Parser _parser = {NULL, _keywords, "popall", 0};
            |                                                      ^~~~~~~~
      multidict/_multidict.c:1684:18: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
       1684 | PyInit__multidict()
            |                  ^
            |                   void
      20 warnings and 8 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1

      hint: This usually indicates a problem with the package or the build environment.
  help: `multidict` (v6.0.4) was included because `aider-chat` (v0.16.3) depends on `multidict`
Failed to install aider: Command '['/Users/lpender/.asdf/installs/python/3.13.3/bin/uv', 'tool', 'install', '--force', '--python', 'python3.12', 'aider-chat@latest']' returned non-zero exit status 1.

Version and model info

No response

lpender avatar May 23 '25 15:05 lpender

The problem was using Python 3.13. It seems that Python 3.12 introduced strict mode so I had to rollback to Python 3.11 or earlier.

Even then, I had to run this:

asdf install python 3.8.19
uv tool install --force --python python3.8.19 --with pip aider-chat@latest

lpender avatar May 23 '25 15:05 lpender

This finally worked for me

uv tool install --force --python python3.11 --with pip aider-chat@latest

AT-main avatar May 23 '25 16:05 AT-main

This is the underlying issue:

https://github.com/Aider-AI/aider/issues/4072

lpender avatar May 23 '25 16:05 lpender