andrix/python-snappy — Issue #7: Compile errors on mac osx
Author: await
Created: 2011-11-30 18:39:49+00:00
State: open

Seems like make is missing an include for os x.

[andrew-tsos-macbook-pro] atso% port list |grep snappy
snappy @1.0.4 archivers/snappy

[andrew-tsos-macbook-pro] atso% uname -a
Darwin andrew-tsos-macbook-pro.local 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386

[andrew-tsos-macbook-pro] atso% pip install python-snappy
Downloading/unpacking python-snappy
Running setup.py egg_info for package python-snappy

Installing collected packages: python-snappy
Running setup.py install for python-snappy
building 'snappy' extension
cc -arch x86_64 -fPIC -Wimplicit -I/Users/atso/.virtualenv/subscribed-pypy-1.6/include -c snappymodule.cc -o build/temp.macosx-10.6-x86_64-2.7/snappymodule.o
snappymodule.cc:31:22: error: snappy-c.h: No such file or directory
snappymodule.cc: In function ‘PyObject* snappy__compress(PyObject*, PyObject*)’:
snappymodule.cc:62: error: ‘snappy_status’ was not declared in this scope
snappymodule.cc:62: error: expected `;' before ‘status’
snappymodule.cc:75: error: ‘snappy_max_compressed_length’ was not declared in this scope
snappymodule.cc:79: error: ‘status’ was not declared in this scope
snappymodule.cc:79: error: ‘snappy_compress’ was not declared in this scope
snappymodule.cc:81: error: ‘SNAPPY_OK’ was not declared in this scope
snappymodule.cc: In function ‘PyObject* snappy__uncompress(PyObject*, PyObject*)’:
snappymodule.cc:107: error: ‘snappy_status’ was not declared in this scope
snappymodule.cc:107: error: expected `;' before ‘status’
snappymodule.cc:120: error: ‘status’ was not declared in this scope
snappymodule.cc:120: error: ‘snappy_uncompressed_length’ was not declared in this scope
snappymodule.cc:121: error: ‘SNAPPY_OK’ was not declared in this scope
snappymodule.cc:128: error: ‘snappy_uncompress’ was not declared in this scope
snappymodule.cc:129: error: ‘SNAPPY_OK’ was not declared in this scope
snappymodule.cc: In function ‘PyObject* snappy__is_valid_compressed_buffer(PyObject*, PyObject*)’:
snappymodule.cc:151: error: ‘snappy_status’ was not declared in this scope
snappymodule.cc:151: error: expected `;' before ‘status’
snappymodule.cc:156: error: ‘status’ was not declared in this scope
snappymodule.cc:156: error: ‘snappy_validate_compressed_buffer’ was not declared in this scope
snappymodule.cc:157: error: ‘SNAPPY_OK’ was not declared in this scope
error: command 'cc' failed with exit status 1
Complete output from command /Users/atso/.virtualenv/subscribed-pypy-1.6/bin/pypy -c "import setuptools;__file__='/Users/atso/.virtualenv/subscribed-pypy-1.6/build/python-snappy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/8u/8uRxBUB4FseEZBUr-aAi3k+++TI/-Tmp-/pip-Alvsc4-record/install-record.txt --install-headers /Users/atso/.virtualenv/subscribed-pypy-1.6/include/site/python2.7:
running install

running build

running build_ext

building 'snappy' extension

cc -arch x86_64 -fPIC -Wimplicit -I/Users/atso/.virtualenv/subscribed-pypy-1.6/include -c snappymodule.cc -o build/temp.macosx-10.6-x86_64-2.7/snappymodule.o

snappymodule.cc:31:22: error: snappy-c.h: No such file or directory

snappymodule.cc: In function ‘PyObject* snappy__compress(PyObject*, PyObject*)’:

snappymodule.cc:62: error: ‘snappy_status’ was not declared in this scope

snappymodule.cc:62: error: expected `;' before ‘status’

snappymodule.cc:75: error: ‘snappy_max_compressed_length’ was not declared in this scope

snappymodule.cc:79: error: ‘status’ was not declared in this scope

snappymodule.cc:79: error: ‘snappy_compress’ was not declared in this scope

snappymodule.cc:81: error: ‘SNAPPY_OK’ was not declared in this scope

snappymodule.cc: In function ‘PyObject* snappy__uncompress(PyObject*, PyObject*)’:

snappymodule.cc:107: error: ‘snappy_status’ was not declared in this scope

snappymodule.cc:107: error: expected `;' before ‘status’

snappymodule.cc:120: error: ‘status’ was not declared in this scope

snappymodule.cc:120: error: ‘snappy_uncompressed_length’ was not declared in this scope

snappymodule.cc:121: error: ‘SNAPPY_OK’ was not declared in this scope

snappymodule.cc:128: error: ‘snappy_uncompress’ was not declared in this scope

snappymodule.cc:129: error: ‘SNAPPY_OK’ was not declared in this scope

snappymodule.cc: In function ‘PyObject* snappy__is_valid_compressed_buffer(PyObject*, PyObject*)’:

snappymodule.cc:151: error: ‘snappy_status’ was not declared in this scope

snappymodule.cc:151: error: expected `;' before ‘status’

snappymodule.cc:156: error: ‘status’ was not declared in this scope

snappymodule.cc:156: error: ‘snappy_validate_compressed_buffer’ was not declared in this scope

snappymodule.cc:157: error: ‘SNAPPY_OK’ was not declared in this scope

error: command 'cc' failed with exit status 1

----------------------------------------
Command /Users/atso/.virtualenv/subscribed-pypy-1.6/bin/pypy -c "import setuptools;__file__='/Users/atso/.virtualenv/subscribed-pypy-1.6/build/python-snappy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/8u/8uRxBUB4FseEZBUr-aAi3k+++TI/-Tmp-/pip-Alvsc4-record/install-record.txt --install-headers /Users/atso/.virtualenv/subscribed-pypy-1.6/include/site/python2.7 failed with error code 1
Storing complete log in /Users/atso/.pip/pip.log