It appears that the python-snappy library assumes that the snappy library has already been installed. I saw similar errors, but once I installed snappy (I use homebrew, so 'brew install snappy') python-snappy installs fine.
HTH, Joe On Wed, Dec 14, 2011 at 8:23 PM, Russell Jurney <[email protected]>wrote: > I am unable to build Avro for Python on OS X 10.6.8 because python-snappy > fails to build. Is there a way around this? > > I wrote a post here > http://datasyndrome.com/post/13707537045/booting-the-analytics-application-events-rubyabout > how to use Avro with Pig and Ruby. The code is here: > https://github.com/rjurney/Booting-the-Analytics-Application I am trying > to create Python instructions that parallel the Ruby ones. > > I've tried multiple install methods, and I am unable to build > snappy-python, so the avro build fails. This is the error message: > > Installed > /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/avro-_AVRO_VERSION_-py2.6.egg > Processing dependencies for avro==-AVRO-VERSION- > Searching for python-snappy > Reading http://pypi.python.org/simple/python-snappy/ > Reading http://github.com/andrix/python-snappy > Best match: python-snappy 0.3.2 > Downloading > http://pypi.python.org/packages/source/p/python-snappy/python-snappy-0.3.2.tar.gz#md5=94ec3eb54a780fac3b15a6c141af973f > Processing python-snappy-0.3.2.tar.gz > Running python-snappy-0.3.2/setup.py -q bdist_egg --dist-dir > /tmp/easy_install-0KEFAv/python-snappy-0.3.2/egg-dist-tmp-1BPj3j > cc1plus: warning: command line option "-Wstrict-prototypes" is valid for > C/ObjC but not for C++ > 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 > snappymodule.cc: At global scope: > snappymodule.cc:41: warning: ‘_state’ defined but not used > error: Setup script exited with error: command '/usr/bin/gcc-4.2' failed > with exit status 1 > > -- > Russell Jurney > twitter.com/rjurney > [email protected] > datasyndrome.com >
