Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error when importing boost #1235

Closed
roseperrone opened this issue Oct 7, 2014 · 4 comments
Closed

Runtime error when importing boost #1235

roseperrone opened this issue Oct 7, 2014 · 4 comments

Comments

@roseperrone
Copy link

I used boost 1.55 (rather than 1.56) to fix compilation errors, but I still get the following runtime error. What can I try to fix it?

(lldb) bt
* thread #1: tid = 0x9437e, 0x0000000000000000, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000000000000
    frame #1: 0x0000000103f3b37d Python`PyEval_GetGlobals + 23
    frame #2: 0x0000000103f49ea5 Python`PyImport_Import + 131
    frame #3: 0x0000000103f48687 Python`PyImport_ImportModule + 31
    frame #4: 0x0000000102ee9d4d _caffe.so`caffe::init_module__caffe() + 3149
    frame #5: 0x0000000103e5f071 libboost_python.dylib`boost::python::handle_exception_impl(boost::function0<void>) + 81
    frame #6: 0x0000000103e601e6 libboost_python.dylib`boost::python::detail::init_module(char const*, void (*)()) + 118
    frame #7: 0x000000010009fbc6 Python`_PyImport_LoadDynamicModule + 140
    frame #8: 0x000000010009f8d3 Python`import_submodule + 274
    frame #9: 0x000000010009f49d Python`load_next + 280
    frame #10: 0x000000010009d454 Python`PyImport_ImportModuleLevel + 589
    frame #11: 0x0000000100082e3b Python`builtin___import__ + 135
    frame #12: 0x000000010000e60f Python`PyObject_Call + 99
    frame #13: 0x000000010008d697 Python`PyEval_CallObjectWithKeywords + 93
    frame #14: 0x0000000100089eb2 Python`PyEval_EvalFrameEx + 9358
    frame #15: 0x0000000100087893 Python`PyEval_EvalCodeEx + 1608
    frame #16: 0x0000000100087245 Python`PyEval_EvalCode + 54
    frame #17: 0x000000010009c141 Python`PyImport_ExecCodeModuleEx + 236
    frame #18: 0x000000010009ecee Python`load_source_module + 813
    frame #19: 0x000000010009f8d3 Python`import_submodule + 274
    frame #20: 0x000000010009f49d Python`load_next + 280
    frame #21: 0x000000010009d454 Python`PyImport_ImportModuleLevel + 589
    frame #22: 0x0000000100082e3b Python`builtin___import__ + 135
    frame #23: 0x000000010000e60f Python`PyObject_Call + 99
    frame #24: 0x000000010008d697 Python`PyEval_CallObjectWithKeywords + 93
    frame #25: 0x0000000100089eb2 Python`PyEval_EvalFrameEx + 9358
    frame #26: 0x0000000100087893 Python`PyEval_EvalCodeEx + 1608
    frame #27: 0x0000000100087245 Python`PyEval_EvalCode + 54
    frame #28: 0x000000010009c141 Python`PyImport_ExecCodeModuleEx + 236
    frame #29: 0x000000010009ecee Python`load_source_module + 813
    frame #30: 0x000000010009f0f3 Python`load_package + 303
    frame #31: 0x000000010009f8d3 Python`import_submodule + 274
    frame #32: 0x000000010009f49d Python`load_next + 280
    frame #33: 0x000000010009d454 Python`PyImport_ImportModuleLevel + 589
    frame #34: 0x0000000100082e3b Python`builtin___import__ + 135
    frame #35: 0x000000010000e60f Python`PyObject_Call + 99
    frame #36: 0x000000010008d697 Python`PyEval_CallObjectWithKeywords + 93
    frame #37: 0x0000000100089eb2 Python`PyEval_EvalFrameEx + 9358
    frame #38: 0x0000000100087893 Python`PyEval_EvalCodeEx + 1608
    frame #39: 0x0000000100087245 Python`PyEval_EvalCode + 54
    frame #40: 0x00000001000a70c2 Python`run_mod + 53
    frame #41: 0x00000001000a7165 Python`PyRun_FileExFlags + 133
    frame #42: 0x00000001000a6d02 Python`PyRun_SimpleFileExFlags + 769
    frame #43: 0x00000001000b8256 Python`Py_Main + 2970
    frame #44: 0x00007fff85b825fd libdyld.dylib`start + 1

I followed the advice of https://github.com/Homebrew/homebrew/wiki/Common-Issues (in the segfaut section) with no luck.

@netheril96
Copy link
Contributor

Context, please?

@roseperrone
Copy link
Author

I'm on mac, not using anaconda, not using CUDA (I set CPU_ONLY=1 in the Makefile.config). make all runs cleanly, as do make runtests and make pycaffe. I use boost 1.55 rather than 1.56 because of this issue: #1193. Yet when I try to run classify.py, I get this runtime error. How else can I help you diagnose this problem?

@leonardt
Copy link

leonardt commented Oct 9, 2014

I saw this error and it was because I had my PYTHON_LIB set wrong in my Makefile.config

It should be where your libpython is, in my case for the homebrew python it was
/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib

@roseperrone
Copy link
Author

Thank you, @leonardt that fixed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants