forcedotcom / distributions

Low-level primitives for collapsed Gibbs sampling in python and C++
BSD 3-Clause "New" or "Revised" License
33 stars 25 forks source link

pip install distributions fails #62

Open stephentu opened 10 years ago

stephentu commented 10 years ago

I'm trying to install distributions via pip install distributions on OS X, and I get the following error (after a lot of spew):

distributions/lp/models/_bb.cpp:6342:42: error: expected the class name after '~' to name a destructor

  p->scores.distributions::VectorFloat::~VectorFloat();

                                         ^

5 warnings and 1 error generated.

error: command 'gcc' failed with exit status 1

My environment:

(x)stephentu@ibanez:~$ python --version
Python 2.7.7 :: Anaconda 2.0.1 (x86_64)
(x)stephentu@ibanez:~$ uname -a
Darwin ibanez 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun  3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
(x)stephentu@ibanez:~$ python -c 'import Cython; print Cython.__version__'
0.20.2

This error I believe is related to cython generator invalid C++ code for clang (gcc is OK with it). A simple fix I believe is to require cython>=0.20.2b1 when compiling with clang