[py-lmdb] Re: Install problems OSX

  • From: David Wilson <dw@xxxxxxxx>
  • To: Ellery R Russell <ellery.russell@xxxxxxx>
  • Date: Tue, 10 Mar 2015 20:09:29 +0000

Hi Ellery,

I've just installed Anaconda on 10.9 and it seems to work fine. Does
your regular C compiler work outside the Anaconda environment? For
example, does this print any errors?

cat <<-EOF > a.c
#include <errno.h>
int main() { return errno; }
EOF
gcc -o a a.c

Looking at compile output, I see "-isysroot
/Developer/SDKs/MacOSX10.5.sdk", which not only seems to refer to an old
XCode release, but also references a location that doesn't exist in
modern XCode installs (IIRC the SDKs directory now lives within the
/Applications/XCode.app folder itself).

Are you using any software written by silly people? (*cough* for
example, Ruby-based package management tool who's name rhymes with
"stew" that turns /usr/local into a Git repository).

Have you ever used the xcode-select command line tool? In any case this
looks like a system config issue. xcode-select is the most likely
candidate for fixing it, though I'm not sure what's broken so you're on
your own :)

It's also possible Anaconda does weird things specifically on 10.10, but
I haven't got a machine around to test it on just now. If you're still
stuck, I can setup a VM.


David

On Mon, Mar 09, 2015 at 09:13:15PM -0400, Ellery R Russell wrote:
> I've been trying to install lmdb on OSX 10.10 and an anaconda python
> distribution with no luck. For some reason gcc can't find the header files.  I
> have the latest command line tools installed, and am using gcc 4.2.1. Not sure
> what to do, can anyone help?
> 
> ~/anaconda$pip install lmdb
> Collecting lmdb
>   Using cached lmdb-0.84.tar.gz
>     py-lmdb: Using bundled liblmdb; override with LMDB_FORCE_SYSTEM=1.
>     py-lmdb: Using CPython extension; override with LMDB_FORCE_CFFI=1.
>     warning: no directories found matching '.'
> Installing collected packages: lmdb
>   Running setup.py install for lmdb
>     py-lmdb: Using bundled liblmdb; override with LMDB_FORCE_SYSTEM=1.
>     py-lmdb: Using CPython extension; override with LMDB_FORCE_CFFI=1.
>     building 'cpython' extension
>     gcc -fno-strict-aliasing -I/Users/err258/anaconda/include -arch x86_64
> -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall
> -Wstrict-prototypes -I/Users/err258/anaconda/pkgs/python-2.7.9-1/include/
> python2.7/ -Ilib -I/Users/err258/anaconda/include/python2.7 -c lmdb/cpython.c
> -o build/temp.macosx-10.5-x86_64-2.7/lmdb/cpython.o -UNDEBUG -w
>     lmdb/cpython.c:28:10: fatal error: 'errno.h' file not found
>     #include <errno.h>
>              ^
>     1 error generated.
>     error: command 'gcc' failed with exit status 1
>     Complete output from command /Users/err258/anaconda/bin/python -c "import
> setuptools, tokenize;__file__='/private/var/folders/bf/
> wm3420f57y3gldklrhj7mn3h0000gn/T/pip-build-ww3c02/lmdb/setup.py';exec(compile
> (getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),
> __file__, 'exec'))" install --record /var/folders/bf/
> wm3420f57y3gldklrhj7mn3h0000gn/T/pip-OORG2M-record/install-record.txt
> --single-version-externally-managed --compile:
>     py-lmdb: Using bundled liblmdb; override with LMDB_FORCE_SYSTEM=1.
> 
>     py-lmdb: Using CPython extension; override with LMDB_FORCE_CFFI=1.
> 
>     running install
> 
>     running build
> 
>     running build_py
> 
>     creating build
> 
>     creating build/lib.macosx-10.5-x86_64-2.7
> 
>     creating build/lib.macosx-10.5-x86_64-2.7/lmdb
> 
>     copying lmdb/__init__.py -> build/lib.macosx-10.5-x86_64-2.7/lmdb
> 
>     copying lmdb/__main__.py -> build/lib.macosx-10.5-x86_64-2.7/lmdb
> 
>     copying lmdb/_config.py -> build/lib.macosx-10.5-x86_64-2.7/lmdb
> 
>     copying lmdb/cffi.py -> build/lib.macosx-10.5-x86_64-2.7/lmdb
> 
>     copying lmdb/tool.py -> build/lib.macosx-10.5-x86_64-2.7/lmdb
> 
>     running build_ext
> 
>     building 'cpython' extension
> 
>     creating build/temp.macosx-10.5-x86_64-2.7
> 
>     creating build/temp.macosx-10.5-x86_64-2.7/lmdb
> 
>     creating build/temp.macosx-10.5-x86_64-2.7/lib
> 
>     gcc -fno-strict-aliasing -I/Users/err258/anaconda/include -arch x86_64
> -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall
> -Wstrict-prototypes -I/Users/err258/anaconda/pkgs/python-2.7.9-1/include/
> python2.7/ -Ilib -I/Users/err258/anaconda/include/python2.7 -c lmdb/cpython.c
> -o build/temp.macosx-10.5-x86_64-2.7/lmdb/cpython.o -UNDEBUG -w
> 
>     lmdb/cpython.c:28:10: fatal error: 'errno.h' file not found
> 
>     #include <errno.h>
> 
>              ^
> 
>     1 error generated.
> 
>     error: command 'gcc' failed with exit status 1
> 
>     ----------------------------------------
>     Command "/Users/err258/anaconda/bin/python -c "import setuptools, 
> tokenize;
> __file__='/private/var/folders/bf/wm3420f57y3gldklrhj7mn3h0000gn/T/
> pip-build-ww3c02/lmdb/setup.py';exec(compile(getattr(tokenize, 'open', open)
> (__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record 
> /
> var/folders/bf/wm3420f57y3gldklrhj7mn3h0000gn/T/pip-OORG2M-record/
> install-record.txt --single-version-externally-managed --compile" failed with
> error code 1 in /private/var/folders/bf/wm3420f57y3gldklrhj7mn3h0000gn/T/
> pip-build-ww3c02/lmdb

Other related posts: