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

Failed building wheel for xformers #4014

Closed
aaronchen2k opened this issue May 14, 2024 · 1 comment
Closed

Failed building wheel for xformers #4014

aaronchen2k opened this issue May 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@aaronchen2k
Copy link

aaronchen2k commented May 14, 2024

问题描述 / Problem Description
安装依赖报错 ERROR: Failed building wheel for xformers

复现问题的步骤 / Steps to Reproduce

  1. 执行 (chatchat) MacBook-Pro:Langchain-Chatchat aaron$ pip install -r requirements.txt

实际结果 / Actual Result
`
(chatchat) MacBook-Pro:Langchain-Chatchat aaron$ pip install -r requirements.txt
......
https://mirrors.aliyun.com/pypi/packages/9d/ea/6d76df31432a0e6fdf81681a895f009a4bb47b3c39036db3e1b528191d52/pyparsing-3.1.2-py3-none-any.whl (103 kB)
Building wheels for collected packages: xformers
Building wheel for xformers (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [1591 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-cpython-311
creating build/lib.macosx-10.9-x86_64-cpython-311/xformers
copying xformers/version.py -> build/lib.macosx-10.9-x86_64-cpython-311/xformers

  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__condition_variable/condition_variable.h:13:
  /usr/local/opt/llvm/bin/../include/c++/v1/__chrono/system_clock.h:35:10: error: reference to unresolved using declaration
     35 |   static time_t to_time_t(const time_point& __t) _NOEXCEPT;
        |          ^
  /usr/local/opt/llvm/bin/../include/c++/v1/ctime:67:1: note: using declaration annotated with 'using_if_exists' here
     67 | using ::time_t _LIBCPP_USING_IF_EXISTS;
        | ^
  In file included from /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc/attention/cpu/matmul.cpp:1:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/ATen.h:7:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/Context.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/CPUGeneratorImpl.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/core/Generator.h:3:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/mutex:192:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__condition_variable/condition_variable.h:13:
  /usr/local/opt/llvm/bin/../include/c++/v1/__chrono/system_clock.h:36:33: error: reference to unresolved using declaration
     36 |   static time_point from_time_t(time_t __t) _NOEXCEPT;
        |                                 ^
  /usr/local/opt/llvm/bin/../include/c++/v1/ctime:67:1: note: using declaration annotated with 'using_if_exists' here
     67 | using ::time_t _LIBCPP_USING_IF_EXISTS;
        | ^
  In file included from /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc/attention/cpu/matmul.cpp:1:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/ATen.h:7:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/Context.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/CPUGeneratorImpl.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/core/Generator.h:3:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/mutex:192:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__condition_variable/condition_variable.h:16:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__mutex/mutex.h:13:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__threading_support:40:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/math.h:380:
  /usr/local/opt/llvm/bin/../include/c++/v1/stdlib.h:145:30: error: unknown type name 'ldiv_t'
    145 | inline _LIBCPP_HIDE_FROM_ABI ldiv_t div(long __x, long __y) _NOEXCEPT { return ::ldiv(__x, __y); }
        |                              ^
  /usr/local/opt/llvm/bin/../include/c++/v1/stdlib.h:145:82: error: no member named 'ldiv' in the global namespace
    145 | inline _LIBCPP_HIDE_FROM_ABI ldiv_t div(long __x, long __y) _NOEXCEPT { return ::ldiv(__x, __y); }
        |                                                                                ~~^
  /usr/local/opt/llvm/bin/../include/c++/v1/stdlib.h:147:30: error: unknown type name 'lldiv_t'
    147 | inline _LIBCPP_HIDE_FROM_ABI lldiv_t div(long long __x, long long __y) _NOEXCEPT { return ::lldiv(__x, __y); }
        |                              ^
  /usr/local/opt/llvm/bin/../include/c++/v1/stdlib.h:147:93: error: no member named 'lldiv' in the global namespace
    147 | inline _LIBCPP_HIDE_FROM_ABI lldiv_t div(long long __x, long long __y) _NOEXCEPT { return ::lldiv(__x, __y); }
        |                                                                                           ~~^
  In file included from /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc/attention/cpu/matmul.cpp:1:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/ATen.h:7:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/Context.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/CPUGeneratorImpl.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/core/Generator.h:3:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/mutex:192:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__condition_variable/condition_variable.h:16:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__mutex/mutex.h:13:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__threading_support:40:
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:31: error: use of undeclared identifier 'FP_NAN'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:39: error: use of undeclared identifier 'FP_INFINITE'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                       ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:52: error: use of undeclared identifier 'FP_NORMAL'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                    ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:63: error: use of undeclared identifier 'FP_SUBNORMAL'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:77: error: use of undeclared identifier 'FP_ZERO'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                                             ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:31: error: use of undeclared identifier 'FP_NAN'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:39: error: use of undeclared identifier 'FP_INFINITE'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                       ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:52: error: use of undeclared identifier 'FP_NORMAL'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                    ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:63: error: use of undeclared identifier 'FP_SUBNORMAL'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:77: error: use of undeclared identifier 'FP_ZERO'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                                             ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:402:31: error: use of undeclared identifier 'FP_NAN'
    402 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:402:39: error: use of undeclared identifier 'FP_INFINITE'
    402 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                       ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:402:52: error: use of undeclared identifier 'FP_NORMAL'
    402 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                    ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  [2/13] /usr/local/opt/llvm/bin/clang++ -MMD -MF /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/build/temp.macosx-10.9-x86_64-cpython-311/xformers/csrc/attention/cpu/spmm.o.d -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/envs/chatchat/include -fPIC -O2 -isystem /opt/anaconda3/envs/chatchat/include -I/usr/local/opt/libomp/include -Xpreprocessor -fopenmp -I/private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc -I/opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include -I/opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/TH -I/opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/THC -I/opt/anaconda3/envs/chatchat/include/python3.11 -c -c /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc/attention/cpu/spmm.cpp -o /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/build/temp.macosx-10.9-x86_64-cpython-311/xformers/csrc/attention/cpu/spmm.o -O3 -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_clang"' '-DPYBIND11_STDLIB="_libcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1002"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
  FAILED: /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/build/temp.macosx-10.9-x86_64-cpython-311/xformers/csrc/attention/cpu/spmm.o
  /usr/local/opt/llvm/bin/clang++ -MMD -MF /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/build/temp.macosx-10.9-x86_64-cpython-311/xformers/csrc/attention/cpu/spmm.o.d -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/anaconda3/envs/chatchat/include -fPIC -O2 -isystem /opt/anaconda3/envs/chatchat/include -I/usr/local/opt/libomp/include -Xpreprocessor -fopenmp -I/private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc -I/opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include -I/opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/TH -I/opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/THC -I/opt/anaconda3/envs/chatchat/include/python3.11 -c -c /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc/attention/cpu/spmm.cpp -o /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/build/temp.macosx-10.9-x86_64-cpython-311/xformers/csrc/attention/cpu/spmm.o -O3 -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_clang"' '-DPYBIND11_STDLIB="_libcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1002"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
  In file included from /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc/attention/cpu/spmm.cpp:1:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/ATen.h:7:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/Context.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/CPUGeneratorImpl.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/core/Generator.h:3:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/mutex:192:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__condition_variable/condition_variable.h:13:
  /usr/local/opt/llvm/bin/../include/c++/v1/__chrono/system_clock.h:35:10: error: reference to unresolved using declaration
     35 |   static time_t to_time_t(const time_point& __t) _NOEXCEPT;
        |          ^
  /usr/local/opt/llvm/bin/../include/c++/v1/ctime:67:1: note: using declaration annotated with 'using_if_exists' here
     67 | using ::time_t _LIBCPP_USING_IF_EXISTS;
        | ^
  In file included from /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc/attention/cpu/spmm.cpp:1:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/ATen.h:7:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/Context.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/CPUGeneratorImpl.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/core/Generator.h:3:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/mutex:192:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__condition_variable/condition_variable.h:13:
  /usr/local/opt/llvm/bin/../include/c++/v1/__chrono/system_clock.h:36:33: error: reference to unresolved using declaration
     36 |   static time_point from_time_t(time_t __t) _NOEXCEPT;
        |                                 ^
  /usr/local/opt/llvm/bin/../include/c++/v1/ctime:67:1: note: using declaration annotated with 'using_if_exists' here
     67 | using ::time_t _LIBCPP_USING_IF_EXISTS;
        | ^
  In file included from /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc/attention/cpu/spmm.cpp:1:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/ATen.h:7:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/Context.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/CPUGeneratorImpl.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/core/Generator.h:3:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/mutex:192:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__condition_variable/condition_variable.h:16:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__mutex/mutex.h:13:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__threading_support:40:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/math.h:380:
  /usr/local/opt/llvm/bin/../include/c++/v1/stdlib.h:145:30: error: unknown type name 'ldiv_t'
    145 | inline _LIBCPP_HIDE_FROM_ABI ldiv_t div(long __x, long __y) _NOEXCEPT { return ::ldiv(__x, __y); }
        |                              ^
  /usr/local/opt/llvm/bin/../include/c++/v1/stdlib.h:145:82: error: no member named 'ldiv' in the global namespace
    145 | inline _LIBCPP_HIDE_FROM_ABI ldiv_t div(long __x, long __y) _NOEXCEPT { return ::ldiv(__x, __y); }
        |                                                                                ~~^
  /usr/local/opt/llvm/bin/../include/c++/v1/stdlib.h:147:30: error: unknown type name 'lldiv_t'
    147 | inline _LIBCPP_HIDE_FROM_ABI lldiv_t div(long long __x, long long __y) _NOEXCEPT { return ::lldiv(__x, __y); }
        |                              ^
  /usr/local/opt/llvm/bin/../include/c++/v1/stdlib.h:147:93: error: no member named 'lldiv' in the global namespace
    147 | inline _LIBCPP_HIDE_FROM_ABI lldiv_t div(long long __x, long long __y) _NOEXCEPT { return ::lldiv(__x, __y); }
        |                                                                                           ~~^
  In file included from /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/pip-install-8r4emd8c/xformers_c0c7745ea5d0496abde73f7706cf755e/xformers/csrc/attention/cpu/spmm.cpp:1:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/ATen.h:7:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/Context.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/CPUGeneratorImpl.h:3:
  In file included from /opt/anaconda3/envs/chatchat/lib/python3.11/site-packages/torch/include/ATen/core/Generator.h:3:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/mutex:192:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__condition_variable/condition_variable.h:16:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__mutex/mutex.h:13:
  In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__threading_support:40:
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:31: error: use of undeclared identifier 'FP_NAN'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:39: error: use of undeclared identifier 'FP_INFINITE'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                       ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:52: error: use of undeclared identifier 'FP_NORMAL'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                    ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:63: error: use of undeclared identifier 'FP_SUBNORMAL'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:392:77: error: use of undeclared identifier 'FP_ZERO'
    392 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                                             ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:31: error: use of undeclared identifier 'FP_NAN'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:39: error: use of undeclared identifier 'FP_INFINITE'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                       ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:52: error: use of undeclared identifier 'FP_NORMAL'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                    ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:63: error: use of undeclared identifier 'FP_SUBNORMAL'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:397:77: error: use of undeclared identifier 'FP_ZERO'
    397 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                                             ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:402:31: error: use of undeclared identifier 'FP_NAN'
    402 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                               ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:402:39: error: use of undeclared identifier 'FP_INFINITE'
    402 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                       ^
  /usr/local/opt/llvm/bin/../include/c++/v1/math.h:402:52: error: use of undeclared identifier 'FP_NORMAL'
    402 |   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x);
        |                                                    ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for xformers
Running setup.py clean for xformers
Failed to build xformers
ERROR: Could not build wheels for xformers, which is required to install pyproject.toml-based projects
`

环境信息 / Environment Information

  • Mac Monterey
  • langchain-ChatGLM 版本/commit 号:2c146aff74bac427f0a4921971d8472097410bdf
  • Python 版本 / Python version: Python 3.11.8
@aaronchen2k aaronchen2k added the bug Something isn't working label May 14, 2024
Copy link

dosubot bot commented May 14, 2024

To address the issue with building the wheel for xformers during the installation of dependencies for the Langchain-Chatchat project, follow these steps:

  1. Install Xcode Command Line Tools: Run xcode-select --install to ensure they are installed and properly configured.
  2. Set MACOSX_DEPLOYMENT_TARGET: Before installing, set this environment variable in your shell with export MACOSX_DEPLOYMENT_TARGET=12.0 to match your Monterey installation.
  3. Use a Python Virtual Environment: Isolate your project's dependencies by creating and activating a virtual environment with python3 -m venv venv and source venv/bin/activate.
  4. Verify PyTorch Compatibility: Ensure the PyTorch version in your requirements.txt is compatible with your system. Check the official PyTorch website for the correct installation command.
  5. Check xformers Compatibility: Make sure the xformers version you're installing is compatible with your Python version and system architecture. If necessary, install a different version or build from source.
  6. Build xformers from Source: If issues persist, consider building xformers from source by following the instructions in the xformers GitHub repository.
  7. Consult xformers GitHub Issues: For unresolved issues, check the xformers GitHub for similar problems or open a new issue for assistance.

These steps are designed to tackle the specific errors you're encountering and should help in successfully installing the required dependencies.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant