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

Building (locally) on M1 Mac OS does not work #30

Open
phobson opened this issue Nov 21, 2022 · 0 comments
Open

Building (locally) on M1 Mac OS does not work #30

phobson opened this issue Nov 21, 2022 · 0 comments

Comments

@phobson
Copy link
Contributor

phobson commented Nov 21, 2022

Disclaimer: I do not understand cython builds well.

When I try to install crick from source on my M1 Mac, I get error messages that seem to indicate that the M1 architecture is confusing the build system into thinking it's Windows and then Windows build tools clearly aren't available. My reason for thinking this is related to M1 Macs is that the CI is currently successfully running pip install --no-deps --global-option build --global-option --debug -e . on Linux, Mac OS, and Windows.

M1 build errors (`pip install -e .`)
14:18:39 in crick on  fix-skew-kurt-edge-cases [+?] via 🅒 crick-dev 
➜ pip install -e .
Processing /Users/paul/work/sources/crick
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: crick
  Building wheel for crick (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      /Users/paul/work/sources/crick/setup.py:4: DeprecationWarning:
      
        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html
      
      
        import numpy.distutils.misc_util as np_misc
      running bdist_wheel
      running build
      running build_py
      copying crick/_version.py -> build/lib.macosx-11.0-arm64-cpython-39/crick
      copying crick/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/crick
      copying crick/tests/test_stats.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
      copying crick/tests/test_space_saving.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
      copying crick/tests/test_tdigest.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
      UPDATING build/lib.macosx-11.0-arm64-cpython-39/crick/_version.py
      set build/lib.macosx-11.0-arm64-cpython-39/crick/_version.py to '0.0.3+6.g2e827d2.dirty'
      running build_ext
      building 'crick.tdigest' extension
      Warning: Can't read registry to find the necessary compiler setting
      Make sure that Python modules winreg, win32api or win32con are installed.
      INFO: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64
      
      INFO: compile options: '-Icrick -I/Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/numpy/core/include -Icrick/klib -I/Users/paul/mambaforge/envs/crick-dev/include/python3.9 -c'
      INFO: clang: crick/tdigest.c
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -Icrick -I/Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/numpy/core/include -Icrick/klib -I/Users/paul/mambaforge/envs/crick-dev/include/python3.9 -c crick/tdigest.c -o build/temp.macosx-11.0-arm64-cpython-39/crick/tdigest.o" failed with exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for crick
  Running setup.py clean for crick
Failed to build crick
Installing collected packages: crick
  Running setup.py install for crick ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for crick did not run successfully.
  │ exit code: 1
  ╰─> [40 lines of output]
      /Users/paul/work/sources/crick/setup.py:4: DeprecationWarning:
      
        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html
      
      
        import numpy.distutils.misc_util as np_misc
      running install
      /Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-39
      creating build/lib.macosx-11.0-arm64-cpython-39/crick
      copying crick/_version.py -> build/lib.macosx-11.0-arm64-cpython-39/crick
      copying crick/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/crick
      creating build/lib.macosx-11.0-arm64-cpython-39/crick/tests
      copying crick/tests/test_stats.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
      copying crick/tests/test_space_saving.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
      copying crick/tests/__init__.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
      copying crick/tests/test_tdigest.py -> build/lib.macosx-11.0-arm64-cpython-39/crick/tests
      UPDATING build/lib.macosx-11.0-arm64-cpython-39/crick/_version.py
      set build/lib.macosx-11.0-arm64-cpython-39/crick/_version.py to '0.0.3+6.g2e827d2.dirty'
      running build_ext
      building 'crick.tdigest' extension
      Warning: Can't read registry to find the necessary compiler setting
      Make sure that Python modules winreg, win32api or win32con are installed.
      INFO: C compiler: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64
      
      creating build/temp.macosx-11.0-arm64-cpython-39
      creating build/temp.macosx-11.0-arm64-cpython-39/crick
      INFO: compile options: '-Icrick -I/Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/numpy/core/include -Icrick/klib -I/Users/paul/mambaforge/envs/crick-dev/include/python3.9 -c'
      INFO: clang: crick/tdigest.c
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -fPIC -O2 -isystem /Users/paul/mambaforge/envs/crick-dev/include -arch arm64 -Icrick -I/Users/paul/mambaforge/envs/crick-dev/lib/python3.9/site-packages/numpy/core/include -Icrick/klib -I/Users/paul/mambaforge/envs/crick-dev/include/python3.9 -c crick/tdigest.c -o build/temp.macosx-11.0-arm64-cpython-39/crick/tdigest.o" failed with exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> crick

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
@dask dask deleted a comment from phobson Nov 22, 2022
@phobson phobson changed the title Building on M1 Mac OS does not work Building (locally) on M1 Mac OS does not work Dec 5, 2022
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

1 participant