-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Boost 1_57 not working with version 18.14 of dlib #9
Comments
Well, you are ahead of the game because I haven't gotten boost.python to work on windows with anything but Python 2.7 32bit. However, that works with all versions of boost. I've only tried the precompiled boost binaries though. So as you say, I can imagine they are just not compiled correctly. I also just tried compiling using python 3.4 on windows 8.1 with visual studio 2013 in 64bit mode and I get a linker error (just one error though). It's that boost::python::detail::init_module is missing and googling for this shows a bunch of people complaining about the same thing. By the way, did you set the BOOST_ROOT and BOOST_LIBRARYDIR environment variables before running cmake? That should make it all work (aside from the eventual linker error because boost-python is broken). These variables need to be set to something like this: |
I managed to build boost python 3.4 64 bit lib and dll without problems I only set the env var for BOOST_ROOT and changed the config jam file to
and compiling with I also managed to build dlib but with a lot of hassles, first i had to rename the libs in BOOST_LIBRARYDIR to "boost_python-py34" to satisfy the cmake module find of cmake I am able to use your library now, so if you update the buildfile python3.4 dlib should be no problem I suggest you add some documentation that clarifies the path's you are looking for boost in the add_python_module script, or better make a config file for the python build script Additionally I suggest you add a requirements.txt for python that includes at least This would make it much easier to start using your library with python 3.4 keep up the great work! |
Thanks for the info. I just tweaked the cmake scripts so it's more straight forward to compile. In particular, I just tested it on linux with python 2.7 and 3.4 as well as on windows with your particular configuration as well as a few others and cmake now correctly builds everything (so long as BOOT_ROOT and BOOST_LIBRARYDIR env variables are set). I also added cmake messages that print when boost.python isn't found and give instructions for compiling and setting up boost.python. If you pull from the repo you will get the new changes. Let me know if they don't work out. |
i was able to compile under windows 64bit by following @superphil0 's comments above, and i get the dlib.pyd, however, when i import in python, i got "ImportError: DLL load failed: The specified module could not be found." thanks! |
You are probably missing something from your path, maybe the boost dlls. The compile_dlib_python_module.bat should output the dlls that are needed. Make sure they are in your path or in the current working folder. |
i found out that i need to rename the boost_python dll from boost_python to boost_python3, that saved me . |
Huh, yeah, the filenames in boost and related python libraries are always changing. This makes it really hard to keep the cmake scripts working on all configurations. It's kinda aggravating. What version of windows, visual studio, boost, and python are you using exactly? I'll see if I can roll in whatever changes are necessary to the cmake script to cover that configuration. |
win 7 64bit, python3.4 64 bit, visual studio community version 2013, boost thanks! On Wed, Aug 5, 2015 at 9:33 PM, Davis E. King notifications@github.com
warm regards Zhijia Yuan |
Thanks, I'll see what I can do. The general idea is to make cmake just
work automatically regardless of the environment. Also, you are using dlib
18.16 right?
|
yes, i am using the most updated one On Wed, Aug 5, 2015 at 9:58 PM, Davis E. King notifications@github.com
warm regards Zhijia Yuan |
I've run through a few configurations but haven't been able to reproduce this. For example, I just did the following:
What did you do? |
i think the problem i have is that i am using vs2013, while the boost i still i think it would be very helpful if a notice can be put in the thanks :) On Sat, Aug 15, 2015 at 12:12 PM, Davis E. King notifications@github.com
warm regards Zhijia Yuan |
did you download boost source code and compiled urself? it seems to be a common problem for many OSS on windows.... On Thu, Aug 20, 2015 at 1:40 PM, zhijia yuan zhijia.yuan@gmail.com wrote:
warm regards Zhijia Yuan |
Yes, I compiled boost from source.
|
After I compiled boost_1_59_0 version , I compile dlib-master for python (python setup.py install) from github I got error : -- Could NOT find Boost I set vars to What is wrong? |
I have no idea. |
Hey, when trying to build the dlib python module I receive errors, because boost can not be found, I believe this is because the boost folder structure has changed
https://github.com/davisking/dlib/blob/master/dlib/add_python_module#L119-L127
I had to build the shared libraries as well, this is very bad documented
also I had to rename the lib and dll files because they are not recognized
I was building for python3.4 on windows8.1 64 bit
I now built the python bindings with boost 1_55 successfully but had to copy and rename the boost libs anyway to the build folder during compilation and before linking
The text was updated successfully, but these errors were encountered: