Git Product home page Git Product logo

Comments (5)

willyd avatar willyd commented on May 28, 2024 1

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.

from caffe-builder.

lunzueta avatar lunzueta commented on May 28, 2024 1

@willyd

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.

from caffe-builder.

willyd avatar willyd commented on May 28, 2024

The strange thing is that as far as I understand from your CMake builder, it's downloading Boost (version 1_58_0) to the folder "(MY_BUILD_PATH)\install\lib", which I guess should be used, but then it's not pointing at it. Nevertheless, those specific Boost libraries that the compiler is looking for aren't downloaded, but others which begin with "libboost_" instead of "boost_". I already had another version of Boost installed (version 1_56_0 mentioned by the compiler) and it seems the compiler is pointing at it, which I don't understand how, as I can't see any reference to it at the "leveldb" VS project preferences (not sure if this is something related to how CMake generates the VS project).

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.

from caffe-builder.

lunzueta avatar lunzueta commented on May 28, 2024

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):
2> if given arguments:
2>
2> "NOT" "optimized" "C:/Anaconda/libs/python27.lib" "debug" "C:/Anaconda/libs/python27_d.lib" "EQUAL" ""
2>
2> Unknown arguments specified
2> Call Stack (most recent call first):
2> cmake/OpenCVDetectPython.cmake:219 (find_python)
2> CMakeLists.txt:551 (include)
2>
2>
2> -- Configuring incomplete, errors occurred!

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?

from caffe-builder.

willyd avatar willyd commented on May 28, 2024

@lunzueta Great! Good to hear that you succeeded.

from caffe-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.