Unable to install using sudo pip install aerospike on Yosemite


#1

This is what I get after running sudo pip install aerospike

Downloading/unpacking aerospike Downloading aerospike-1.0.44.tar.gz (121kB): 121kB downloaded Running setup.py (path:/private/tmp/pip_build_root/aerospike/setup.py) egg_info for package aerospike

Installing collected packages: aerospike Running setup.py install for aerospike info: downloading ‘http://www.aerospike.com/download/client/c/3.1.16/artifact/mac’ to ‘/private/tmp/pip_build_root/aerospike/aerospike-client-c/package/aerospike-client-c.tgz’ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 346 100 346 0 0 802 0 --:–:-- --:–:-- --:–:-- 802 0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0 100 16.5M 100 16.5M 0 0 1899k 0 0:00:08 0:00:08 --:–:-- 1950k info: extracting ‘aerospike-client-c-3.1.16.mac.x86_64/aerospike-client-c-devel-3.1.16.pkg’ from 'aerospike-client-c.tgz’ info: extracting files from 'aerospike-client-c-3.1.16.mac.x86_64/aerospike-client-c-devel-3.1.16.pkg’ 8017 blocks

CHECK
   [✓] /private/tmp/pip_build_root/aerospike/aerospike-client-c/package/usr/local/lib/libaerospike.a
   [✓] /private/tmp/pip_build_root/aerospike/aerospike-client-c/package/usr/local/include/aerospike/aerospike.h
   [✓] /private/tmp/pip_build_root/aerospike/aerospike-client-c/package/usr/local/aerospike/client/sys/udf/lua/aerospike.lua

info: Executing ./scripts/aerospike-client-c.sh
info: aerospike.h found: ./aerospike-client-c/include/aerospike/aerospike.h
info: libaerospike.a found: ./aerospike-client-c/lib/libaerospike.a
building 'aerospike' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -Isrc/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/main/aerospike.c -o build/temp.macosx-10.10-intel-2.7/src/main/aerospike.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -D_DARWIN_UNLIMITED_SELECT -DMARCH_x86_64
In file included from src/main/aerospike.c:22:
In file included from src/include/client.h:21:
In file included from src/include/types.h:23:
In file included from ./aerospike-client-c/include/aerospike/as_key.h:19:
In file included from ./aerospike-client-c/include/aerospike/as_bytes.h:20:
In file included from ./aerospike-client-c/include/aerospike/as_util.h:22:
In file included from ./aerospike-client-c/include/citrusleaf/alloc.h:20:
./aerospike-client-c/include/citrusleaf/cf_atomic.h:232:54: error: invalid output size for constraint '=a'
        __asm__ __volatile__ ("lock; cmpxchgq %1,%2" : "=a"(p) : "q"(x), "m"(*(a)), "0"(b) : "memory");
                                                            ^
1 error generated.
error: command 'cc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip_build_root/aerospike/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_SFnOA-record/install-record.txt --single-version-externally-managed --compile:
info: downloading 'http://www.aerospike.com/download/client/c/3.1.16/artifact/mac' to '/private/tmp/pip_build_root/aerospike/aerospike-client-c/package/aerospike-client-c.tgz'

% Total % Received % Xferd Average Speed Time Time Time Current

                             Dload  Upload   Total   Spent    Left  Speed

100 346 100 346 0 0 802 0 --:–:-- --:–:-- --:–:-- 802

0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0

100 16.5M 100 16.5M 0 0 1899k 0 0:00:08 0:00:08 --:–:-- 1950k

info: extracting ‘aerospike-client-c-3.1.16.mac.x86_64/aerospike-client-c-devel-3.1.16.pkg’ from ‘aerospike-client-c.tgz’

info: extracting files from ‘aerospike-client-c-3.1.16.mac.x86_64/aerospike-client-c-devel-3.1.16.pkg’

8017 blocks

CHECK

[✓] /private/tmp/pip_build_root/aerospike/aerospike-client-c/package/usr/local/lib/libaerospike.a

[✓] /private/tmp/pip_build_root/aerospike/aerospike-client-c/package/usr/local/include/aerospike/aerospike.h

[✓] /private/tmp/pip_build_root/aerospike/aerospike-client-c/package/usr/local/aerospike/client/sys/udf/lua/aerospike.lua

info: Executing ./scripts/aerospike-client-c.sh

info: aerospike.h found: ./aerospike-client-c/include/aerospike/aerospike.h

info: libaerospike.a found: ./aerospike-client-c/lib/libaerospike.a

running install

running build

running build_ext

building ‘aerospike’ extension

creating build

creating build/temp.macosx-10.10-intel-2.7

creating build/temp.macosx-10.10-intel-2.7/src

creating build/temp.macosx-10.10-intel-2.7/src/main

creating build/temp.macosx-10.10-intel-2.7/src/main/client

creating build/temp.macosx-10.10-intel-2.7/src/main/key

creating build/temp.macosx-10.10-intel-2.7/src/main/query

creating build/temp.macosx-10.10-intel-2.7/src/main/scan

creating build/temp.macosx-10.10-intel-2.7/src/main/lstack

creating build/temp.macosx-10.10-intel-2.7/src/main/lset

creating build/temp.macosx-10.10-intel-2.7/src/main/llist

creating build/temp.macosx-10.10-intel-2.7/src/main/lmap

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I./aerospike-client-c/include -I./aerospike-client-c/include/ck -Isrc/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/main/aerospike.c -o build/temp.macosx-10.10-intel-2.7/src/main/aerospike.o -std=gnu99 -g -Wall -fPIC -O1 -fno-common -fno-strict-aliasing -march=nocona -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -D_DARWIN_UNLIMITED_SELECT -DMARCH_x86_64

In file included from src/main/aerospike.c:22:

In file included from src/include/client.h:21:

In file included from src/include/types.h:23:

In file included from ./aerospike-client-c/include/aerospike/as_key.h:19:

In file included from ./aerospike-client-c/include/aerospike/as_bytes.h:20:

In file included from ./aerospike-client-c/include/aerospike/as_util.h:22:

In file included from ./aerospike-client-c/include/citrusleaf/alloc.h:20:

./aerospike-client-c/include/citrusleaf/cf_atomic.h:232:54: error: invalid output size for constraint ‘=a’

    __asm__ __volatile__ ("lock; cmpxchgq %1,%2" : "=a"(p) : "q"(x), "m"(*(a)), "0"(b) : "memory");

                                                        ^

1 error generated.

error: command ‘cc’ failed with exit status 1


Cleaning up… Command /usr/bin/python -c “import setuptools, tokenize;file=’/private/tmp/pip_build_root/aerospike/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-_SFnOA-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/aerospike Traceback (most recent call last): File “/usr/local/bin/pip”, line 9, in load_entry_point(‘pip==1.5.6’, ‘console_scripts’, ‘pip’)() File “/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/init.py”, line 185, in main return command.main(cmd_args) File “/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py”, line 161, in main text = ‘\n’.join(complete_log) UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 8: ordinal not in range(128)


#2

This looks like a problem we’ve run into recently, dependent on the version of pip. Still looking into it, but there’s a workaround here:


#3

I removed the latest version of Xcode (Xcode 6.3) which came out 2-3 weeks ago. Then installed Xcode 6.1. Using pip 7.0.1 , I managed to install aerospace for python.

Here are my settings on Yosemite 10.10.3:

clang --version Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix

and

pip --version pip 7.0.1 from /Library/Python/2.7/site-packages/pip-7.0.1-py2.7.egg (python 2.7)

thank you for the useful link https://github.com/aerospike/aerospike-client-python/issues/53 :smile:


#4

Glad the workaround got it done. We’ll work to get it done for the particular combination of developer tools that is failing.


#5

Please verify if release >= 1.0.46 fixes your problem.