Panda3D OSX issues Python linking

I’m having issues with getting Panda3D to run on my Macbook Pro with version 10.12.1. I compiled the source on my Windows PC relatively easily. However, this OSX install is confusing and I keep running into errors.

I can compile the source code from the master branch of Panda3d on github as long as I go:
python2.7 makepanda/ --everything --installer --no-pandatool

If I include pandatool I get errors mainly with pandatool/maya/MTypes.h cannot be found.
Once I have compiled I try to run the examples and I get this error in the code snippit below:

home$ python
Traceback (most recent call last):
  File "", line 16, in <module>
    from direct.showbase.ShowBase import ShowBase
  File "/Developer/Panda3D/direct/showbase/", line 12, in <module>
    from panda3d.core import *
ImportError: dlopen(/Developer/Panda3D/panda3d/, 2): Symbol not found: __ZN10ParamValueISbIwSt11char_traitsIwESaIwEEE14get_class_typeEv
  Referenced from: /Developer/Panda3D/panda3d/
  Expected in: flat namespace
 in /Developer/Panda3D/panda3d/

My guess is that I’ve got issues with multiple python versions installed. If so how can I make it link to the correct python version that Panda is linked against?
I have tried the devel pre-built installs as well. I get the same error as the version I build.

I would like to get Panda working on my Mac as I can play with Panda while I’m away from PC.

Sorry for the late response.

Apparently this is caused by a bug in GCC. I’m still looking into a workaround, but if you compile with clang instead, you shouldn’t have trouble. You can do this by setting the CC and CXX env variables to clang and clang++ respectively before invoking makepanda. You may have to make a clean build by deleting your “built” directory first.