Skip to content

Instantly share code, notes, and snippets.

@aguynamedben
Created May 4, 2010 21:59
Show Gist options
  • Save aguynamedben/390081 to your computer and use it in GitHub Desktop.
Save aguynamedben/390081 to your computer and use it in GitHub Desktop.
Best match: pylibmc 1.0
Downloading http://pypi.python.org/packages/source/p/pylibmc/pylibmc-1.0.tar.gz#md5=182d95a6d493f3cbb7bc83ae7e275816
Processing pylibmc-1.0.tar.gz
Running pylibmc-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-utpYCY/pylibmc-1.0/egg-dist-tmp-wHUG5H
_pylibmcmodule.c:36:20: error: zlib.h: No such file or directory
_pylibmcmodule.c: In function ‘_PylibMC_Deflate’:
_pylibmcmodule.c:168: error: ‘z_stream’ undeclared (first use in this function)
_pylibmcmodule.c:168: error: (Each undeclared identifier is reported only once
_pylibmcmodule.c:168: error: for each function it appears in.)
_pylibmcmodule.c:168: error: expected ‘;’ before ‘strm’
_pylibmcmodule.c:183: error: ‘strm’ undeclared (first use in this function)
_pylibmcmodule.c:185: error: ‘Byte’ undeclared (first use in this function)
_pylibmcmodule.c:185: error: expected expression before ‘)’ token
_pylibmcmodule.c:186: error: expected expression before ‘)’ token
_pylibmcmodule.c:188: error: ‘alloc_func’ undeclared (first use in this function)
_pylibmcmodule.c:189: error: ‘free_func’ undeclared (first use in this function)
_pylibmcmodule.c:189: error: expected ‘;’ before ‘Z_NULL’
_pylibmcmodule.c:192: warning: implicit declaration of function ‘deflateInit’
_pylibmcmodule.c:192: error: ‘z_streamp’ undeclared (first use in this function)
_pylibmcmodule.c:192: error: ‘Z_BEST_SPEED’ undeclared (first use in this function)
_pylibmcmodule.c:192: error: ‘Z_OK’ undeclared (first use in this function)
_pylibmcmodule.c:197: warning: implicit declaration of function ‘deflate’
_pylibmcmodule.c:197: error: ‘Z_FINISH’ undeclared (first use in this function)
_pylibmcmodule.c:197: error: ‘Z_STREAM_END’ undeclared (first use in this function)
_pylibmcmodule.c:202: warning: implicit declaration of function ‘deflateEnd’
_pylibmcmodule.c: In function ‘_PylibMC_Inflate’:
_pylibmcmodule.c:218: error: ‘z_stream’ undeclared (first use in this function)
_pylibmcmodule.c:218: error: expected ‘;’ before ‘strm’
_pylibmcmodule.c:229: error: ‘strm’ undeclared (first use in this function)
_pylibmcmodule.c:230: error: ‘uInt’ undeclared (first use in this function)
_pylibmcmodule.c:230: error: expected ‘;’ before ‘rvalsz’
_pylibmcmodule.c:231: error: ‘Byte’ undeclared (first use in this function)
_pylibmcmodule.c:231: error: expected expression before ‘)’ token
_pylibmcmodule.c:232: error: expected expression before ‘)’ token
_pylibmcmodule.c:234: error: ‘alloc_func’ undeclared (first use in this function)
_pylibmcmodule.c:235: error: ‘free_func’ undeclared (first use in this function)
_pylibmcmodule.c:235: error: expected ‘;’ before ‘Z_NULL’
_pylibmcmodule.c:238: warning: implicit declaration of function ‘inflateInit’
_pylibmcmodule.c:238: error: ‘z_streamp’ undeclared (first use in this function)
_pylibmcmodule.c:238: error: ‘Z_OK’ undeclared (first use in this function)
_pylibmcmodule.c:244: warning: implicit declaration of function ‘inflate’
_pylibmcmodule.c:244: error: ‘Z_FINISH’ undeclared (first use in this function)
_pylibmcmodule.c:247: error: ‘Z_STREAM_END’ undeclared (first use in this function)
_pylibmcmodule.c:251: error: ‘Z_BUF_ERROR’ undeclared (first use in this function)
_pylibmcmodule.c:254: warning: implicit declaration of function ‘inflateEnd’
_pylibmcmodule.c:265: error: expected expression before ‘)’ token
error: Setup script exited with error: command 'gcc' failed with exit status 1
To see coverage details run 'coverage report' or open htmlcov/index.html.
No data to report.
@zookos
Copy link

zookos commented May 4, 2010

Best match: pylibmc 1.0
Downloading http://pypi.python.org/packages/source/p/pylibmc/pylibmc-1.0.tar.gz#md5=182d95a6d493f3cbb7bc83ae7e275816
Processing pylibmc-1.0.tar.gz
Running pylibmc-1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-utpYCY/pylibmc-1.0/egg-dist-tmp-wHUG5H
_pylibmcmodule.c:36:20: error: zlib.h: No such file or directory
error: Setup script exited with error: command 'gcc' failed with exit status 1
To see coverage details run 'coverage report' or open htmlcov/index.html.
No data to report.

@lericson
Copy link

lericson commented May 5, 2010

The reason is that your compiler can't find your zlib.h, which you're very likely to have one of.

You have two options: compile without compression support (setup.py build --without-zlib), or specify where your zlib installation is (either ZLIB=/usr/local easy_install pylibmc or setup.py build --with-zlib=/usr/local)

@aguynamedben
Copy link
Author

lericson, thanks for the help. Yeah I realized I needed to install the zlib1g-dev Ubuntu package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment