willyd / caffe-builder

CMake build scripts to automate building the Caffe library and its dependencies.
BSD 2-Clause "Simplified" License
186 stars 116 forks source link

Build with Ninja fails #27

Closed lunzueta closed 8 years ago

lunzueta commented 8 years ago

Hi @willyd. I'm happy to see the upgrade of this project. I hope the related pull request to get Caffe built on Windows with CMake (https://github.com/BVLC/caffe/pull/3990) is finally merged in BVLC's Caffe repo.

I've been testing it and I can get this compiled with Visual Studio by using the CMake GUI, but when I follow your instructions to compile this with CMake console commands and Ninja I get the following error:

-- verifying file...
     file='C:/LUI/Procrast/Software/caffe-builder-willyd/build/packages/boost/boost_download-prefix/src/boost_1_60_0.7z'
-- verifying file... warning: did not verify file - no URL_HASH specified?
-- extracting...
     src='C:/LUI/Procrast/Software/caffe-builder-willyd/build/packages/boost/boost_download-prefix/src/boost_1_60_0.7z'
     dst='C:/LUI/Procrast/Software/caffe-builder-willyd/build/packages/boost/boost_download-prefix/src/boost_download'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
ninja: build stopped: subcommand failed.

I don't know how to interpret this. Any clue?

willyd commented 8 years ago

@lunzueta I noticed that sometimes downloads from SourceForge fail. Does running:

ninja boost

Again do any good? Is there any error message earlier in the console? Can you pipe or tee the output to a file and send it to me?

lunzueta commented 8 years ago

@willyd I attach a couple of files with the console output. The output1.txt file contains the output of the CMake configuration step and of the "ninja" command (which fails as shown above). The second one has the output of the "ninja boost" command, which I run just after having run "ninja" (which failed, not sure if that influences something). After running "ninja boost" I see that the Boost libraries are generated but there are also some error messages in the process which I'm not sure if they are very important.

output1.txt output2.txt

willyd commented 8 years ago

@lunzueta Looking at the output files it looks like that git fails to checkout the required files. See line 1887. So the error is not related to boost at all. Maybe you can try to use solutions proposed in this post or use a shorter prefix for building caffe-builder.

lunzueta commented 8 years ago

Thanks @willyd. Following those instructions I could compile all libraries. More specifically, I shortened the path of caffe-builder to just "C:\cb" and I also run the command git config core.longpaths true in the console before running ninja. One thing I noticed is that I still needed to run ninja a few times. It didn't work directly the first time and the error message wasn't too descriptive either. This was a bit confusing, but as said, in the end I had all the libraries built. Not sure if we can say this issue is totally solved. I guess more testing should be done. I'm going to use the generated libraries in your Caffe CMake-Windows branch to see if everything is ok and I'll tell you.

willyd commented 8 years ago

@lunzueta Thanks for letting me know. As I mentioned I just found out that the layers and solvers are not correctly registered in the tests and python and command line interfaces. I have a fix for this but haven't pushed it yet. You will be able to build both of them but you will get runtime errors.

lunzueta commented 8 years ago

Yes, you are right, I just tried that. I got this error when using caffe.exe (so the functions weren't exported): F0420 09:04:57.519930 21252 solver_factory.hpp:76] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown solver type: SGD (known types: )

lunzueta commented 8 years ago

@willyd After your last update, I've tested this again, in combination with the updated windows-cmake branch from your caffe fork, and it worked for me correctly using Ninja. Thank you for that.

Moore123 commented 5 years ago

two items should be added in requirment.tx scikit-build ninja

ghost commented 5 years ago

I am waiting for permission to continue build to test caffe for operation 1.