From: <boy...@gm...> - 2013-02-14 04:43:40
|
Hello Steve, I did read that, but I have't tried yet. I'm interested in trying to install boost with homebrew. I made a few changes with the boost installation complied by homebrew (I not do their basic install for 10.8. Before I had chosen some options that I didn't really need). The strange c++ error has gone. Instead 'import visual' generated the following Fatal error: Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6 Do you think this could be because I linked with the dylibs. I remember when I did some ctypes work with python on OSX that there was a problem importing dylib files that gave a similar error. Best wishes, Dan On 13 Feb 2013, at 22:42, Steve Spicklemire <st...@sp...> wrote: > Hi Dan, > > When you built boost did you use the bootstrap/b2 parameters suggest in MAC-OSX.txt or some variation? > > I think __ZN5boost6python7objects15function_objectERKNS1_11py_functionERKSt4pairIPKNS0_6detail7keywordES9_E is a c++ mangled name for some specific method, but it's not included in your library somehow. > > -steve > > On Feb 13, 2013, at 6:18 AM, "boy...@gm..." <boy...@gm...> wrote: > >> Hello Steve, Tom, >> >> find /usr/local/lib -name *boost_python* -ls reveals that there is a .dylib and .a versions, symlinked to /usr/local/lib, >> >> /usr/local/lib/libboost_python-mt.a -> ../Cellar/boost/1.52.0/lib/libboost_python-mt.a >> /usr/local/lib/libboost_python-mt.dylib -> ../Cellar/boost/1.52.0/lib/libboost_python-mt.dylib >> >> So Tom suggestion was right, the libraries have a "-mt" appended. >> >> I changed line 135 of setup.py to read, >> >> libraries = ['boost_python-mt','boost_signals-mt'] >> >> I re-built. This time the build finishes successfully, but there is error when import visual in python: >> >> ---------------------------------- >> File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual/__init__.py", line 33, in <module> >> from visual.visual_all import * # this statement not included in vis/__init__.py >> File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual/visual_all.py", line 10, in <module> >> from visual_common.cvisual import vector >> ImportError: dlopen(/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual_common/cvisual.so, 2): Symbol not found: __ZN5boost6python7objects15function_objectERKNS1_11py_functionERKSt4pairIPKNS0_6detail7keywordES9_E >> Referenced from: /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual_common/cvisual.so >> Expected in: flat namespace >> in /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/VPython-6.02-py2.7-macosx-10.8-x86_64.egg/visual_common/cvisual.so >> --------------------------------- >> >> I think the function named "__ZN5boost6python7objects15function_objectERKNS1_11py_functionERKSt4pairIPKNS0_6detail7keywordES9_E" is a hint that headers didn't get processed or some obscure problem with building against a dynamic library (the .dylib) files. >> >> Any suggestions? >> >> The includes directory has the following structure, >> >> /usr/local/include/boost/<all boost files and folders> >> >> Should I specify the boost subdirectory as, >> >> [build_ext] >> include-dirs=/usr/local/include/boost <---- ? >> library-dirs=/usr/local/lib >> >> Should I only link against the static library (is that what the .a files are?). If so, how to do that? >> >> Best wishes, >> >> Dan >> >> PS. I should probably say, this is a fresh install of 10.8.2, with a latest Xcode (4.6), and latest homebrew (0.9.4, completely up-to-date). >> > |