DDMAL / libmei

C++ library and Python bindings for the Music Encoding Initiative format
http://music-encoding.org
Other
63 stars 23 forks source link

Python Bindings: -lboost_python-mt not found (already checked troubleshooting) #104

Closed martha-thomae closed 6 years ago

martha-thomae commented 6 years ago

This issue happened using either python2 or python3. Using the libmei code from the develop branch (and from the previous release, the 2.0.0 version) when I do python setup.py build I got the message:

Library not found for -lboost_python-mt

Even though I did export CFLAGS="-F /Library/Frameworks -I /usr/local/include -L /usr/local/lib" to tell the system where lboost_python-mt is, as indicated in the Troubleshooting section of the python bindings in the wiki.

noahbaxter commented 6 years ago

I'm experiencing the same issues. lboost_python-mt is not in /usr/local/lib for me it seems.

martha-thomae commented 6 years ago

In setup.py where you have:

if sys.platform == "darwin":
    link_args = ["-F", "/Library/Frameworks","-framework", "mei"]
    libraries = ["boost_python-mt"]
    library_dirs = []
    runtime_library_dirs = []
    include_dirs = []

Try using libraries = ["boost_python27-mt"] instead. Since I changed computers, I needed to install boost-python again, and I think that the new version of boost-python is a little different. You don't have something called boost_python-mt anymore, but boost_python27-mt and boost_python36-mt. Let me know how it turns out. I used libraries = ["boost_python27-mt"] and it works. I wasn't able to make it work for python3 though (using libraries = ["boost_python36-mt"] didn't work).

karend27 commented 6 years ago

Thanks! I finally got around to trying to install and got stumped by this error. Your fix worked for me!

noahbaxter commented 6 years ago

fixed in develop branch https://github.com/DDMAL/libmei/commit/4ef5c1a91d34060855237a7d2cc6d44287a9435d. For Python 3.6, you must pip install boost_python3. pip install boost_python will only work for Python 2.7