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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install rii -- fails on osx with clang error #35

Closed
ronbee opened this issue Jan 2, 2020 · 2 comments
Closed

pip install rii -- fails on osx with clang error #35

ronbee opened this issue Jan 2, 2020 · 2 comments

Comments

@ronbee
Copy link

ronbee commented Jan 2, 2020

pip install rii -- fails on osx with clang error.

details:

(.venv) 馃loose-fit$ pip install rii
Collecting rii
  Using cached https://files.pythonhosted.org/packages/0a/d5/9e7a32e612b7414c272c0277add9494065e022353d1500963ec2ff0cc7f5/rii-0.2.6.tar.gz
Requirement already satisfied: pybind11>=2.3 in ./.venv/lib/python3.7/site-packages (from rii) (2.4.3)
Requirement already satisfied: nanopq in ./.venv/lib/python3.7/site-packages (from rii) (0.1.8)
Requirement already satisfied: numpy in ./.venv/lib/python3.7/site-packages (from nanopq->rii) (1.18.0)
Requirement already satisfied: scipy in ./.venv/lib/python3.7/site-packages (from nanopq->rii) (1.4.1)
Building wheels for collected packages: rii
  Building wheel for rii (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: <path>/.venv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-install-d76_zncf/rii/setup.py'"'"'; __file__='"'"'/private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-install-d76_zncf/rii/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-wheel-hwefsd10 --python-tag cp37
       cwd: /private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-install-d76_zncf/rii/
  Complete output (47 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14-x86_64-3.7
  creating build/lib.macosx-10.14-x86_64-3.7/tests
  copying tests/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/tests
  copying tests/test_rii.py -> build/lib.macosx-10.14-x86_64-3.7/tests
  copying tests/context.py -> build/lib.macosx-10.14-x86_64-3.7/tests
  creating build/lib.macosx-10.14-x86_64-3.7/rii
  copying rii/rii.py -> build/lib.macosx-10.14-x86_64-3.7/rii
  copying rii/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/rii
  running build_ext
  creating var
  creating var/folders
  creating var/folders/vt
  creating var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn
  creating var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/opt/llvm/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c /var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/tmp8p7ifavc.cpp -o var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/tmp8p7ifavc.o -std=c++17
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/opt/llvm/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c /var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/tmpgibfqmnr.cpp -o var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/tmpgibfqmnr.o -fvisibility=hidden
  building 'main' extension
  creating build/temp.macosx-10.14-x86_64-3.7
  creating build/temp.macosx-10.14-x86_64-3.7/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/opt/llvm/include -UNDEBUG -I<path>/.venv/bin/../include/site/python3.7 -I<path>/.venv/bin/../include/site/python3.7 -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/main.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/main.o -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="0.2.6" -std=c++17 -fvisibility=hidden -march=native -mtune=native -Ofast
  In file included from src/main.cpp:1:
  In file included from <path>/.venv/bin/../include/site/python3.7/pybind11/pybind11.h:44:
  In file included from <path>/.venv/bin/../include/site/python3.7/pybind11/attr.h:13:
 <path>/.venv/bin/../include/site/python3.7/pybind11/cast.h:579:34: error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.14 or newer
                          vptr = ::operator new(type->type_size,
                                   ^
  <path>/.venv/bin/../include/site/python3.7/pybind11/cast.h:579:34: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
  In file included from src/main.cpp:1:
  <path>/.venv/bin/../include/site/python3.7/pybind11/pybind11.h:1008:11: error: 'operator delete' is unavailable: introduced in macOS 10.12
          ::operator delete(p, s, std::align_val_t(a));
            ^
  /usr/local/opt/llvm/bin/../include/c++/v1/new:208:74: note: 'operator delete' has been explicitly marked unavailable here
  _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
                                                                           ^
  In file included from src/main.cpp:1:
  <path>/.venv/bin/../include/site/python3.7/pybind11/pybind11.h:1010:11: error: 'operator delete' is unavailable: introduced in macOS 10.12
          ::operator delete(p, s);
            ^
  /usr/local/opt/llvm/bin/../include/c++/v1/new:191:74: note: 'operator delete' has been explicitly marked unavailable here
  _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
                                                                           ^
  3 errors generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for rii
  Running setup.py clean for rii
Failed to build rii
Installing collected packages: rii
    Running setup.py install for rii ... error
    ERROR: Command errored out with exit status 1:
     command: <path>/.venv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-install-d76_zncf/rii/setup.py'"'"'; __file__='"'"'/private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-install-d76_zncf/rii/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-record-oy9z3y_v/install-record.txt --single-version-externally-managed --compile --install-headers <path>/.venv/bin/../include/site/python3.7/rii
         cwd: /private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-install-d76_zncf/rii/
    Complete output (42 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14-x86_64-3.7
    creating build/lib.macosx-10.14-x86_64-3.7/tests
    copying tests/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/tests
    copying tests/test_rii.py -> build/lib.macosx-10.14-x86_64-3.7/tests
    copying tests/context.py -> build/lib.macosx-10.14-x86_64-3.7/tests
    creating build/lib.macosx-10.14-x86_64-3.7/rii
    copying rii/rii.py -> build/lib.macosx-10.14-x86_64-3.7/rii
    copying rii/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/rii
    running build_ext
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/opt/llvm/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c /var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/tmpabpfuxpv.cpp -o var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/tmpabpfuxpv.o -std=c++17
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/opt/llvm/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c /var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/tmpedhdv9js.cpp -o var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/tmpedhdv9js.o -fvisibility=hidden
    building 'main' extension
    creating build/temp.macosx-10.14-x86_64-3.7
    creating build/temp.macosx-10.14-x86_64-3.7/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/opt/llvm/include -UNDEBUG -I<path>/.venv/bin/../include/site/python3.7 -I<path>/.venv/bin/../include/site/python3.7 -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/main.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/main.o -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="0.2.6" -std=c++17 -fvisibility=hidden -march=native -mtune=native -Ofast
    In file included from src/main.cpp:1:
    In file included from <path>/.venv/bin/../include/site/python3.7/pybind11/pybind11.h:44:
    In file included from <path>/.venv/bin/../include/site/python3.7/pybind11/attr.h:13:
    <path>/.venv/bin/../include/site/python3.7/pybind11/cast.h:579:34: error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.14 or newer
                            vptr = ::operator new(type->type_size,
                                     ^
    <path>/.venv/bin/../include/site/python3.7/pybind11/cast.h:579:34: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
    In file included from src/main.cpp:1:
    <path>/.venv/bin/../include/site/python3.7/pybind11/pybind11.h:1008:11: error: 'operator delete' is unavailable: introduced in macOS 10.12
            ::operator delete(p, s, std::align_val_t(a));
              ^
    /usr/local/opt/llvm/bin/../include/c++/v1/new:208:74: note: 'operator delete' has been explicitly marked unavailable here
    _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
                                                                             ^
    In file included from src/main.cpp:1:
    <path>/.venv/bin/../include/site/python3.7/pybind11/pybind11.h:1010:11: error: 'operator delete' is unavailable: introduced in macOS 10.12
            ::operator delete(p, s);
              ^
    /usr/local/opt/llvm/bin/../include/c++/v1/new:191:74: note: 'operator delete' has been explicitly marked unavailable here
    _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
                                                                             ^
    3 errors generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: <path>/.venv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-install-d76_zncf/rii/setup.py'"'"'; __file__='"'"'/private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-install-d76_zncf/rii/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/vt/ybml8dls2v54ywpws5zpfqgm0000gn/T/pip-record-oy9z3y_v/install-record.txt --single-version-externally-managed --compile --install-headers <path>/.venv/bin/../include/site/python3.7/rii Check the logs for full command output.
@matsui528
Copy link
Owner

It seems error by clang. I'll take a look it in the end of January hopefully. If someone knows how to fix the error, any PRs are welcome! (I don't have Mac OS...)

@matsui528
Copy link
Owner

Hi @ronbee,
I updated the library so that it works with clang on Mac. Could you try to install and run?

pip uninstall rii
pip install --no-cache-dir rii

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

No branches or pull requests

2 participants