-
Notifications
You must be signed in to change notification settings - Fork 114
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
caffe-builder finds already installed boost version #5
Comments
You are right that caffe-builder downloads boost and builds boost. Boost prefixes the static library names with lib. caffe-builder relies on CMake find_package to find Boost (and only looks for the static variant). Your install of boost probably only has the dynamic variants so BOOST_INCLUDE_DIR is correctly found but no libraries are found. I forgot to configure LevelDB so that it finds the caffe-builder built Boost. Please try the following change: set(leveldb_CMAKE_ARGS
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_DEBUG_POSTFIX=d
####################################################
# add this line
-DBOOST_ROOT=${CMAKE_INSTALL_PREFIX}
# or add those two
-DBOOST_LIBRARYDIR=${CMAKE_INSTALL_PREFIX}/lib
-DBOOST_INCLUDEDIR=${CMAKE_INSTALL_PREFIX}/include
###################################################
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_MULTITHREAD=ON
-DBoost_USE_STATIC_RUNTIME=OFF
) Apply the same change to every project that has a dependency on Boost. For OpenCV 3.x support please use this branch opencv3-support as reported in #1. |
Thanks @willyd. With your changes and suggestions now I can compile the "leveldb" project correctly, both in Debug and Release. However, this time I'm getting other two errors; one linking error in the "Caffe" project with "python27.lib" (both in Debug and Release), and a CMake error in the "OpenCV" project which appears when compiling (only in Release, not in Debug): 2> CMake Error at cmake/OpenCVDetectPython.cmake:78 (if): As you can see both are related to Python. I already had Python libraries installed from Anaconda (http://continuum.io/downloads), but as before, I'm not sure how to make your CMake files find it and link those projects to it. Any suggestion, please? |
AFAIK Anaconda does not come with the python debug library. Did you mess with your python install by copying the release lib and renaming it to python27_d.lib? I also have anaconda and do not have any of the problems you reported. |
Yes, you're right. I tried that "trick", but without success, so it wasn't a good idea. Just in case, I've removed that file again and I've restarted the whole process, but again without success. Then, I've checked what was being done at line 78 of OpenCVDetectPython.cmake (as pointed by the compiler&CMake) and it seems that it was checking if I had an environment variable with the path to the libraries of Python (which I didn't have), so I've added the environment variable PYTHONHOME (mentioned here: https://docs.python.org/2/using/cmdline.html#envvar-PYTHONHOME) with the value "C:\Anaconda", and now I've been able to compile everything correctly both in Debug and Release :-D Many thanks for this great Windows version of Caffe and for your assistance @willyd! Just to comment, I've tested all this using Visual Studio 2013 with a 64-bit build in Windows 10. |
@lunzueta Great! Good to hear that you succeeded. |
As reported in Caffe #15 by @lunzueta.
The text was updated successfully, but these errors were encountered: