mattjj / pyhsmm

MIT License
546 stars 173 forks source link

problem compiling pyhsmm on Mac OS X 10.9.4 #30

Closed yarden closed 9 years ago

yarden commented 9 years ago

Hi,

I'm having trouble compiling pyhsmm on Mac OS X 10.9.4, using the default Apple clang compiler (which if I understood correctly the README says it is supported, although g++ is favored).

I recursively cloned pyhsmm and then installed it in my local virtualenv, using:

$ python setup.py build_ext --inplace

which results in:

$ python setup.py build_ext --inplace
running build_ext
building 'internals.hmm_messages_interface' extension
creating build
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/internals
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Ideps/Eigen3/ -I/Users/yarden/Software/pyenv/lib/python2.7/site-packages/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c internals/hmm_messages_interface.cpp -o build/temp.macosx-10.9-intel-2.7/internals/hmm_messages_interface.o -Ofast -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
internals/hmm_messages_interface.cpp:10976:604: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:11254:612: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:11532:604: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:11810:612: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:12088:604: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:12366:612: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:12644:604: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:12922:612: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:13200:604: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:13478:612: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:13756:604: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:14034:612: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:14312:604: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:14590:612: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:14868:604: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:15146:612: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:269:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:44750:385: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:279:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:44993:389: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:279:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
internals/hmm_messages_interface.cpp:45236:385: error: cannot initialize a parameter of type 'int *' with an rvalue of type
      '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...(&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_stateseq.diminfo[0].strides)))...
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hmm_messages.h:279:22: note: passing argument to parameter 'stateseq' here
            IntType *stateseq, FloatType *randseq)
                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'cc' failed with exit status 1

My version information:

$ python --version
Python 2.7.5
$ python -c 'import numpy; print numpy.__version__'
1.8.2

Any thoughts on this? Thanks! Yarden

alexbw commented 9 years ago

Hi, pyhsmm works best with gcc 4.8 or 4.9. The fastest path forward might be to install gcc-4.9 with homebrew, and then do

export CC=gcc-4.9
export CXX=g++-4.9
mattjj commented 9 years ago

I'd like to keep clang working.

I think this came up in #23 as well. It looks like __pyx_t_5numpy_int32_t is aliased to long *, which means cython is doing something weird.

Can you try out 05d3320, which I just pushed to the issue-30 branch, and tell me if that fixes the compile problem?

Also, which cython version are you on? You can check with this:

import cython
print cython.__version__
yarden commented 9 years ago

Thanks, guys. My Cython version is:

>>> import cython
>>> print cython.__version__
0.20.2

I tried Matt's suggestion and used the new commit from branch issue-30, and it gave these errors:

$ git checkout 05d33203560a3de9d3f01caec70944873554d885
Note: checking out '05d33203560a3de9d3f01caec70944873554d885'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 05d3320... change arguments to typed memoryviews, c.f. #30

$ python setup.py build_ext --inplace
Compiling internals/hmm_messages_interface.pyx because it changed.
Compiling internals/hsmm_messages_interface.pyx because it changed.
Compiling util/cstats.pyx because it changed.
Cythonizing internals/hmm_messages_interface.pyx
Cythonizing internals/hsmm_messages_interface.pyx
Cythonizing util/cstats.pyx
running build_ext
building 'internals.hmm_messages_interface' extension
creating build
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/internals
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Ideps/Eigen3/ -I/Users/yarden/Software/pyenv/lib/python2.7/site-packages/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c internals/hmm_messages_interface.cpp -o build/temp.macosx-10.9-intel-2.7/internals/hmm_messages_interface.o -Ofast -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
c++ -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.9-intel-2.7/internals/hmm_messages_interface.o -o /Users/yarden/Software/pyhsmm/internals/hmm_messages_interface.so
building 'internals.hsmm_messages_interface' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Ideps/Eigen3/ -I/Users/yarden/Software/pyenv/lib/python2.7/site-packages/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c internals/hsmm_messages_interface.cpp -o build/temp.macosx-10.9-intel-2.7/internals/hsmm_messages_interface.o -Ofast -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
internals/hsmm_messages_interface.cpp:24164:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:24480:923: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:24796:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:25112:923: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:25428:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:25744:923: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:26060:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:26376:923: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:26692:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:27008:923: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:27324:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:27640:923: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:27956:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:28272:923: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:28588:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:28904:923: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:29220:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:29536:923: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
internals/hsmm_messages_interface.cpp:29852:911: error: cannot initialize a parameter of type 'int *' with an rvalue of type '__pyx_t_5numpy_int32_t *' (aka 'long *')
  ...)))), (&(*__Pyx_BufPtrCContig1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_stateseq.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_stateseq.diminfo[0].strides))), (&(...
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
internals/hsmm_messages.h:189:18: note: passing argument to parameter 'stateseq' here
        IntType *stateseq, FloatType *randseq)
                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'cc' failed with exit status 1

update: I installed gcc with homebrew as Alex suggested set the env vars:

export CC=gcc-4.9
export CXX=g++-4.9

This led to this installation problem:

$ python setup.py clean
running clean
removing 'build/temp.macosx-10.9-intel-2.7' (and everything under it)
removing 'build'
$ python setup.py build_ext --inplace
running build_ext
building 'internals.hsmm_messages_interface' extension
creating build
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/internals
gcc-4.9 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Ideps/Eigen3/ -I/Users/yarden/Software/pyenv/lib/python2.7/site-packages/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c internals/hsmm_messages_interface.cpp -o build/temp.macosx-10.9-intel-2.7/internals/hsmm_messages_interface.o -Ofast -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
gcc-4.9: error: unrecognized command line option '-Wshorten-64-to-32'
error: command 'gcc-4.9' failed with exit status 1
mattjj commented 9 years ago

That shorten-64-to-32 flag is weird, and it might be the root of this problem.

Those comiler flags come from cython, which in turn gets them from how Python was compiled. Are you using the OS X built-in python? Does which python return something like /usr/bin/python?

We might also try dropping the flags to see if it compiles without them. Does this command work?

gcc-4.9 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -pipe -Ideps/Eigen3/ -I/Users/yarden/Software/pyenv/lib/python2.7/site-packages/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c internals/hsmm_messages_interface.cpp -o build/temp.macosx-10.9-intel-2.7/internals/hsmm_messages_interface.o -Ofast -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
mattjj commented 9 years ago

Btw my version of cython is 0.21.2. I don't think this is a cython version issue but it couldn't hurt to upgrade.

I'm able to build this with clang on OS X 10.10 using the anaconda Python distribution.

yarden commented 9 years ago

I'm using a local Python since this is all within a virtual environment:

$ which python
/Users/yarden/Software/pyenv/bin/python
mattjj commented 9 years ago

Where'd that python come from, though? Is it from the OS X system install? If you installed virtualenv with pip which itself was installed against the system python, I'm pretty sure that would be the default (unless you supplied the -p flag when you created the venv).

Since I can build things with clang, I'm pretty convinced the problem is with the flags that the original python binary was built with. Both anaconda and macports python distributions work for me on my mac.

Can you try using anaconda?

yarden commented 9 years ago

If I remember correctly, I installed Python 2.7 through virtualenv, but it's also possible it was the default OS X one. Not sure and don't know how to check it. In case it helps, see:

$ pip show python
---
Name: Python
Version: 2.7.5
Location: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
Requires: 

I'm assuming that means it's the default OS X one.

Also, I tried upgrading Cython and that didn't fix it. I'll try anaconda, though the nice thing about virtualenv is that I can control the versions of numpy/matplotlib/scipy/etc. and I'm worried that since anaconda comes with those prepackaged that it'll create a big mess of competing sci-related Python packages.

yarden commented 9 years ago

I installed Anaconda Python using the Mac OS X installer. It gave the helpful error message attached...

anaconda_failed

In spite of that, Anaconda Python is accessible (Anaconda modified my PATH to add it) and seems to run fine:

$ which python
/Users/yarden/anaconda/bin/python
$ python
Python 2.7.8 |Anaconda 2.1.0 (x86_64)| (default, Aug 21 2014, 15:21:46) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> 

When I try to install pyhsmm with it, I get a new error message:

$ echo $CC
gcc-4.9
$ python setup.py build_ext --inplace
running build_ext
building 'internals.hmm_messages_interface' extension
creating build/temp.macosx-10.5-x86_64-2.7
creating build/temp.macosx-10.5-x86_64-2.7/internals
gcc-4.9 -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ideps/Eigen3/ -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c internals/hmm_messages_interface.cpp -o build/temp.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.o -Ofast -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from /usr/local/Cellar/gcc/4.9.2/lib/gcc/x86_64-apple-darwin13.4.0/4.9.2/include/stdint.h:9:0,
                 from /Developer/SDKs/MacOSX10.5.sdk/usr/include/inttypes.h:255,
                 from /Users/yarden/anaconda/include/python2.7/pyport.h:9,
                 from /Users/yarden/anaconda/include/python2.7/Python.h:58,
                 from internals/hmm_messages_interface.cpp:16:
/usr/local/Cellar/gcc/4.9.2/lib/gcc/x86_64-apple-darwin13.4.0/4.9.2/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
 #include <sys/_types/_int8_t.h>
                                ^
compilation terminated.
error: command 'gcc-4.9' failed with exit status 1

For what it's worth, if I try the same on the master branch, I get the same error:

$ git checkout master
Previous HEAD position was 05d3320... change arguments to typed memoryviews, c.f. #30
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
$ python setup.py build_ext --inplace
Compiling internals/hmm_messages_interface.pyx because it changed.
Cythonizing internals/hmm_messages_interface.pyx
running build_ext
building 'internals.hmm_messages_interface' extension
creating build/temp.macosx-10.5-x86_64-2.7
creating build/temp.macosx-10.5-x86_64-2.7/internals
gcc-4.9 -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ideps/Eigen3/ -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c internals/hmm_messages_interface.cpp -o build/temp.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.o -Ofast -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from /usr/local/Cellar/gcc/4.9.2/lib/gcc/x86_64-apple-darwin13.4.0/4.9.2/include/stdint.h:9:0,
                 from /Developer/SDKs/MacOSX10.5.sdk/usr/include/inttypes.h:255,
                 from /Users/yarden/anaconda/include/python2.7/pyport.h:9,
                 from /Users/yarden/anaconda/include/python2.7/Python.h:58,
                 from internals/hmm_messages_interface.cpp:16:
/usr/local/Cellar/gcc/4.9.2/lib/gcc/x86_64-apple-darwin13.4.0/4.9.2/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
 #include <sys/_types/_int8_t.h>
                                ^
compilation terminated.
error: command 'gcc-4.9' failed with exit status 1
mattjj commented 9 years ago

Ah, that's one I have seen in the last week since upgrading to Yosemite! I think it's because anaconda was built with compatibility back to OS X 10.5.

Try doing this:

MACOSX_DEPLOYMENT_TARGET=10.9 python setup.py build_ext --inplace
yarden commented 9 years ago

I assume you meant put that in the environment variable? I tried:

$ echo $MACOSX_DEPLOYMENT_TARGET
10.9
$ python setup.py clean
running clean
removing 'build/temp.macosx-10.5-x86_64-2.7' (and everything under it)
$ python setup.py build_ext --inplace
running build_ext
building 'internals.hmm_messages_interface' extension
creating build/temp.macosx-10.5-x86_64-2.7
creating build/temp.macosx-10.5-x86_64-2.7/internals
gcc-4.9 -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ideps/Eigen3/ -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c internals/hmm_messages_interface.cpp -o build/temp.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.o -Ofast -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from /usr/local/Cellar/gcc/4.9.2/lib/gcc/x86_64-apple-darwin13.4.0/4.9.2/include/stdint.h:9:0,
                 from /Developer/SDKs/MacOSX10.5.sdk/usr/include/inttypes.h:255,
                 from /Users/yarden/anaconda/include/python2.7/pyport.h:9,
                 from /Users/yarden/anaconda/include/python2.7/Python.h:58,
                 from internals/hmm_messages_interface.cpp:16:
/usr/local/Cellar/gcc/4.9.2/lib/gcc/x86_64-apple-darwin13.4.0/4.9.2/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
 #include <sys/_types/_int8_t.h>
                                ^
compilation terminated.
error: command 'gcc-4.9' failed with exit status 1
mattjj commented 9 years ago

Yeah. If you're in bash or zsh you can just put it on the same line like that and any child process will get that assigned in its environment.

Hrm, I definitely ran into that problem earlier, and I thought that was the tweak that fixed things for me, but apparently not. It's still reading from /Developer/SDKs/MacOSX10.5.sdk/, which has that weird problem with its inttypes.h. It looks like I might have rm -rf'd the contents of my /Developer/SDKs/. I remember reinstalling XCode and rerunning xcode-select --install as well.

Googling (and seeing a lot of purple links) suggests that a lot of projects have run into this problem.

Ideas:

#ifndef _INT8_T
#define _INT8_T
typedef __signed char       int8_t;
#endif /* _INT8_T */
mattjj commented 9 years ago

You could also try running the compile line without that -isysroot /Developer/SDKs/MacOSX10.5.sdk thing:

gcc-4.9 -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ideps/Eigen3/ -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c internals/hmm_messages_interface.cpp -o build/temp.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.o -Ofast -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
yarden commented 9 years ago

If I revert back to clang (with export CC="cc"), I get the error below:

$ python setup.py build_ext --inplace
running build_ext
building 'internals.hmm_messages_interface' extension
creating build/temp.macosx-10.5-x86_64-2.7
creating build/temp.macosx-10.5-x86_64-2.7/internals
cc -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ideps/Eigen3/ -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c internals/hmm_messages_interface.cpp -o build/temp.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.o -Ofast -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
In file included from internals/hmm_messages_interface.cpp:240:
In file included from internals/hmm_messages.h:4:
In file included from deps/Eigen3/Eigen/Core:56:
In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/complex:246:
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1342:9: error: no member named 'llrint' in the global namespace; did you mean 'lrint'?
using ::llrint;
      ~~^
/Developer/SDKs/MacOSX10.5.sdk/usr/include/architecture/i386/math.h:382:17: note: 'lrint' declared here
extern long int lrint ( double );
                ^
In file included from internals/hmm_messages_interface.cpp:240:
In file included from internals/hmm_messages.h:4:
In file included from deps/Eigen3/Eigen/Core:56:
In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/complex:246:
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1343:9: error: no member named 'llrintf' in the global namespace; did you mean 'lrintf'?
using ::llrintf;
      ~~^
/Developer/SDKs/MacOSX10.5.sdk/usr/include/architecture/i386/math.h:383:17: note: 'lrintf' declared here
extern long int lrintf ( float );
                ^
In file included from internals/hmm_messages_interface.cpp:240:
In file included from internals/hmm_messages.h:4:
In file included from deps/Eigen3/Eigen/Core:56:
In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/complex:246:
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1345:86: error: use of undeclared identifier 'llrintf'
inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __x) _NOEXCEPT       {return llrintf(__x);}
                                                                                     ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1346:86: error: use of undeclared identifier 'llrintl'
inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __x) _NOEXCEPT {return llrintl(__x);}
                                                                                     ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1351:35: error: call to 'llrint' is ambiguous
llrint(_A1 __x) _NOEXCEPT {return llrint((double)__x);}
                                  ^~~~~~
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1345:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __x) _NOEXCEPT       {return llrintf(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1346:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __x) _NOEXCEPT {return llrintl(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1355:9: error: no member named 'llround' in the global namespace; did you mean 'lround'?
using ::llround;
      ~~^
/Developer/SDKs/MacOSX10.5.sdk/usr/include/architecture/i386/math.h:388:17: note: 'lround' declared here
extern long int lround ( double );
                ^
In file included from internals/hmm_messages_interface.cpp:240:
In file included from internals/hmm_messages.h:4:
In file included from deps/Eigen3/Eigen/Core:56:
In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/complex:246:
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1356:9: error: no member named 'llroundf' in the global namespace; did you mean 'lroundf'?
using ::llroundf;
      ~~^
/Developer/SDKs/MacOSX10.5.sdk/usr/include/architecture/i386/math.h:389:17: note: 'lroundf' declared here
extern long int lroundf ( float );
                ^
In file included from internals/hmm_messages_interface.cpp:240:
In file included from internals/hmm_messages.h:4:
In file included from deps/Eigen3/Eigen/Core:56:
In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/complex:246:
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1358:87: error: use of undeclared identifier 'llroundf'
inline _LIBCPP_INLINE_VISIBILITY long long llround(float __x) _NOEXCEPT       {return llroundf(__x);}
                                                                                      ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1359:87: error: use of undeclared identifier 'llroundl'
inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __x) _NOEXCEPT {return llroundl(__x);}
                                                                                      ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1364:36: error: call to 'llround' is ambiguous
llround(_A1 __x) _NOEXCEPT {return llround((double)__x);}
                                   ^~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1358:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long llround(float __x) _NOEXCEPT       {return llroundf(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1359:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __x) _NOEXCEPT {return llroundl(__x);}
                                           ^
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1663:9: error: no member named 'llrintl' in the global namespace; did you mean 'lrintl'?
using ::llrintl;
      ~~^
/Developer/SDKs/MacOSX10.5.sdk/usr/include/architecture/i386/math.h:475:17: note: 'lrintl' declared here
extern long int lrintl(long double);
                ^
In file included from internals/hmm_messages_interface.cpp:240:
In file included from internals/hmm_messages.h:4:
In file included from deps/Eigen3/Eigen/Core:56:
In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/complex:246:
/Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/cmath:1664:9: error: no member named 'llroundl' in the global namespace; did you mean 'lroundl'?
using ::llroundl;
      ~~^
/Developer/SDKs/MacOSX10.5.sdk/usr/include/architecture/i386/math.h:477:17: note: 'lroundl' declared here
extern long int lroundl(long double);
                ^
12 errors generated.
error: command 'cc' failed with exit status 1

However, if I rename the 10.5 SDK as you suggested, it looks like it works, I think:

$ mv /Developer/SDKs/MacOSX10.5.sdk/ /Developer/SDKs/MacOSX10.5.sdk.bak
$ python setup.py build_ext --inplace
running build_ext
building 'internals.hmm_messages_interface' extension
cc -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ideps/Eigen3/ -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c internals/hmm_messages_interface.cpp -o build/temp.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.o -Ofast -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
g++-4.9 -bundle -undefined dynamic_lookup -L/Users/yarden/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.o -L/Users/yarden/anaconda/lib -o /Users/yarden/Software/pyhsmm/internals/hmm_messages_interface.so
building 'internals.hsmm_messages_interface' extension
cc -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ideps/Eigen3/ -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c internals/hsmm_messages_interface.cpp -o build/temp.macosx-10.5-x86_64-2.7/internals/hsmm_messages_interface.o -Ofast -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
g++-4.9 -bundle -undefined dynamic_lookup -L/Users/yarden/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/internals/hsmm_messages_interface.o -L/Users/yarden/anaconda/lib -o /Users/yarden/Software/pyhsmm/internals/hsmm_messages_interface.so
building 'util.cstats' extension
creating build/temp.macosx-10.5-x86_64-2.7/util
cc -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c util/cstats.c -o build/temp.macosx-10.5-x86_64-2.7/util/cstats.o -Ofast -w -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
cc -bundle -undefined dynamic_lookup -L/Users/yarden/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/util/cstats.o -L/Users/yarden/anaconda/lib -o /Users/yarden/Software/pyhsmm/util/cstats.so

It still doesn't do a complete install though (pyhsmm doesn't get placed in the relevant site-packages dir, even after doing pip install .). I think Anaconda might be messing it up, still investigating. Basically after compiling the extension, I do:

$ pip install -U .
Unpacking /Users/yarden/Software/pyhsmm
  Running setup.py (path:/var/folders/fk/qdjdmlm50pz_jt5lng_rkn480000gn/T/pip-oXTziG-build/setup.py) egg_info for package from file:///Users/yarden/Software/pyhsmm

Installing collected packages: UNKNOWN
  Found existing installation: UNKNOWN 0.0.0
    Uninstalling UNKNOWN:
      Successfully uninstalled UNKNOWN
  Running setup.py install for UNKNOWN
    building 'internals.hmm_messages_interface' extension
    gcc -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ideps/Eigen3/ -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c internals/hmm_messages_interface.cpp -o build/temp.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.o -Ofast -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
    gcc -bundle -undefined dynamic_lookup -L/Users/yarden/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.o -L/Users/yarden/anaconda/lib -o build/lib.macosx-10.5-x86_64-2.7/internals/hmm_messages_interface.so
    building 'internals.hsmm_messages_interface' extension
    gcc -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ideps/Eigen3/ -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c internals/hsmm_messages_interface.cpp -o build/temp.macosx-10.5-x86_64-2.7/internals/hsmm_messages_interface.o -Ofast -w -DNDEBUG -std=c++11 -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
    gcc -bundle -undefined dynamic_lookup -L/Users/yarden/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/internals/hsmm_messages_interface.o -L/Users/yarden/anaconda/lib -o build/lib.macosx-10.5-x86_64-2.7/internals/hsmm_messages_interface.so
    building 'util.cstats' extension
    gcc -fno-strict-aliasing -I/Users/yarden/anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yarden/anaconda/lib/python2.7/site-packages/numpy/core/include -I/Users/yarden/anaconda/include/python2.7 -c util/cstats.c -o build/temp.macosx-10.5-x86_64-2.7/util/cstats.o -Ofast -w -DHMM_TEMPS_ON_HEAP -DNDEBUG -w
    gcc -bundle -undefined dynamic_lookup -L/Users/yarden/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/util/cstats.o -L/Users/yarden/anaconda/lib -o build/lib.macosx-10.5-x86_64-2.7/util/cstats.so

Successfully installed UNKNOWN
Cleaning up...
$ python
Python 2.7.8 |Anaconda 2.1.0 (x86_64)| (default, Aug 21 2014, 15:21:46) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> import pyshmm
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pyshmm
mattjj commented 9 years ago

The pyhsmm setup.py won't work with pip and it can't install pyhsmm into site-packages (we'll get around to writing a decent setup.py someday!); pretty much all it can currently do is an in-place extension module build, so you'd need to put the pyhsmm directory on your PYTHONPATH (e.g. have '.' in your PYTHONPATH and go up a directory) to import it.

(Also, I probably should make clear in the readme that you don't need to build anything to import and use pyhsmm; there are (or should be) python versions of all the computational methods, though they're slower and require using class names with the 'Python' suffix. If these build problems drive you nuts, it might be worth trying the Python-only versions.)

yarden commented 9 years ago

I see, thanks for clarification. Putting the pyhsmm directory on path won't allow to import unless you're right above it as you say. It would be easier if you had a directory structure like this:

  pyhsmm/
  setup.py
  pyhsmm/
    __init__.py
    *.py

then you wouldn't have to have current dir in PYTHONPATH - you could just have /path/to/pyhsmm/ added to PYTHONPATH.

mattjj commented 9 years ago

You're right! I know that's the standard way to package something. Someday #28 will be closed, but it is not this day.

My habit is to have a ~/code and put that on my PYTHONPATH. Then I check out all my personal repositories there.

yarden commented 9 years ago

Sounds great, thanks for all the help! I fought with Python packaging a lot in the past, so I'm happy to try to help with this later/contribute code too, once I understand pyhsmm more. It's also possible to make setup.py produce only C/C++ files without pyx. Then you can distribute a version of pyhsmm that is fast but only requires C compilation and doesn't require the user to have Cython at all. Never tried it with Eigen as dependency but don't see why it wouldn't work. (Though this might be less useful to you as most of your users are probably not afraid of messing with Cython/installing it.)

mattjj commented 9 years ago

No problem! Hope this wasn't too much of a headache.

So to summarize, I think the eventual fixes were:

  1. avoid building against the OS X python, which had some compiler flags that didn't seem to work with the int types used in this cython code, by using anaconda instead, and
  2. avoid a new build issue with anaconda with stdint.h in the OS X 10.5 SDK by renaming /Developer/SDKs/MacOSX10.5.sdk/

Maybe the second fix wouldn't have been necessary if the first hadn't been remedied by using anaconda. (I never had this issue when using macports versions of everything.)

Does that sound right to you?

yarden commented 9 years ago

Your summary is correct. Just to clarify: I uninstalled Anaconda and tried it with the renamed 10.5 SDK directory (hoping to use my previous Python setup, Anaconda-free). That didn't work, so I reinstalled Anaconda and then it did. So it seems like you have to get rid of the 10.5 SDK and use Anaconda to make it work, at least on my setup.