aerospike-client-python icon indicating copy to clipboard operation
aerospike-client-python copied to clipboard

Unable to install on MacOS 12.2 (M1)

Open 9en9i opened this issue 3 years ago • 7 comments

Python 3.8.11

Collecting aerospike
  Using cached aerospike-6.1.2.tar.gz (2.8 MB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: aerospike
  Building wheel for aerospike (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      running bdist_wheel
      running build
      ['make', 'V=1'] ['/usr/local/opt/openssl/lib', '/usr/local/lib'] ['ssl', 'crypto', 'pthread', 'm', 'z']
      /Applications/Xcode.app/Contents/Developer/usr/bin/make -e -C modules/common libaerospike-common.a
      cc -Isrc/include -std=gnu99 -g -Wall -fPIC -O3 -fno-common -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -march=nocona -D_DARWIN_UNLIMITED_SELECT -o target/Darwin-arm64/obj/common/aerospike/as_aerospike.o -c src/main/aerospike/as_aerospike.c
      clang: error: the clang compiler does not support '-march=nocona'
      make[1]: *** [target/Darwin-arm64/obj/common/aerospike/as_aerospike.o] Error 1
      make: *** [modules/common/target/Darwin-arm64/lib/libaerospike-common.a] Error 2
      running build_py
      running egg_info
      writing aerospike.egg-info/PKG-INFO
      writing dependency_links to aerospike.egg-info/dependency_links.txt
      writing top-level names to aerospike.egg-info/top_level.txt
      reading manifest file 'aerospike.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'modules/aerospike-lua-core/src/*.lua'
      adding license file 'LICENSE'
      running build_ext
      building 'aerospike' extension
      In file included from src/main/aerospike.c:22:
      In file included from src/include/client.h:21:
      src/include/types.h:22:10: fatal error: 'aerospike/aerospike.h' file not found
      #include <aerospike/aerospike.h>
               ^~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/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 aerospike
  Running setup.py clean for aerospike
Failed to build aerospike
Installing collected packages: aerospike
  Running setup.py install for aerospike ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for aerospike did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      running install
      /Users/denis/PycharmProjects/panel-api/.venv/lib/python3.8/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
      ['make', 'V=1'] ['/usr/local/opt/openssl/lib', '/usr/local/lib'] ['ssl', 'crypto', 'pthread', 'm', 'z']
      /Applications/Xcode.app/Contents/Developer/usr/bin/make -e -C modules/common libaerospike-common.a
      cc -Isrc/include -std=gnu99 -g -Wall -fPIC -O3 -fno-common -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -march=nocona -D_DARWIN_UNLIMITED_SELECT -o target/Darwin-arm64/obj/common/aerospike/as_aerospike.o -c src/main/aerospike/as_aerospike.c
      clang: error: the clang compiler does not support '-march=nocona'
      make[1]: *** [target/Darwin-arm64/obj/common/aerospike/as_aerospike.o] Error 1
      make: *** [modules/common/target/Darwin-arm64/lib/libaerospike-common.a] Error 2
      running build_py
      running egg_info
      writing aerospike.egg-info/PKG-INFO
      writing dependency_links to aerospike.egg-info/dependency_links.txt
      writing top-level names to aerospike.egg-info/top_level.txt
      reading manifest file 'aerospike.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'modules/aerospike-lua-core/src/*.lua'
      adding license file 'LICENSE'
      running build_ext
      building 'aerospike' extension
      In file included from src/main/aerospike.c:22:
      In file included from src/include/client.h:21:
      src/include/types.h:22:10: fatal error: 'aerospike/aerospike.h' file not found
      #include <aerospike/aerospike.h>
               ^~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/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: legacy-install-failure

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

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.```

9en9i avatar Feb 20 '22 18:02 9en9i

having the same issue on M1

elja avatar Feb 23 '22 21:02 elja

~i think this is a problem with python 3.10, on Ubuntu 21.10 i can install aerospike 6.1.2 on python 3.9.10 but not 3.10.2 (getting the same error as OP)~

edit: saw the python version edit, i made a separate issue https://github.com/aerospike/aerospike-client-python/issues/276

databasedav avatar Feb 24 '22 03:02 databasedav

Same issue on M1

PinkOatmeal avatar Feb 25 '22 11:02 PinkOatmeal

Same issue on M1, can anyone give suggestion or workaround?

derryflag avatar Mar 08 '22 07:03 derryflag

M1 (or ARM in general) isn't currently supported by the Aerospike C client which is a dependency for the python client. The workaround used by the node.js community may be relevant to you: https://github.com/aerospike/aerospike-client-nodejs/pull/449.

kportertx avatar Mar 08 '22 17:03 kportertx

Is there someone at Aerospike that can chime in here?

anthonyalayo avatar Aug 01 '22 20:08 anthonyalayo

not just M1 I am on Big Sur 11.5.2 using 2.3 GHz 8-Core Intel Core i9

NPrada avatar Sep 14 '22 10:09 NPrada

I am using Apple M1 chip and pip install aerospike==8.0.0 works for me. Its also mentioned in the release notes

sushrutt12 avatar Dec 04 '22 01:12 sushrutt12

Version 8.0.0 can indeed be installed on arm mac.

9en9i avatar Dec 07 '22 15:12 9en9i