Skip to content
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

fatal error: caffe/proto/caffe.pb.h: No such file or directory #105

Closed
cancan101 opened this issue May 14, 2015 · 9 comments
Closed

fatal error: caffe/proto/caffe.pb.h: No such file or directory #105

cancan101 opened this issue May 14, 2015 · 9 comments

Comments

@cancan101
Copy link

When I ran make all --jobs=4 I got:

In file included from ./include/caffe/util/device_alternate.hpp:40:0,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/net.hpp:10,
                 from src/caffe/solver.cpp:7:
./include/caffe/util/cudnn.hpp:8:34: fatal error: caffe/proto/caffe.pb.h: No such file or directory
 #include "caffe/proto/caffe.pb.h"
                                  ^
compilation terminated.

I solved this by running:

$ protoc src/caffe/proto/caffe.proto --cpp_out=.
$ mkdir include/caffe/proto
$ mv src/caffe/proto/caffe.pb.h include/caffe/proto

Should those steps be in the Makefile?

@lukeyeager
Copy link
Member

Were you following the install instructions in the DIGITS README, or the default Caffe instructions? I've never run into that issue before (though a little googling shows that other people have). That step is definitely not necessary for everyone, so I'm not going to add it to the install instructions. Do you have any clues as to why you ran into this problem and I (and most others) didn't?

@cancan101
Copy link
Author

Following the DIGITS README.

Not sure and when I built (nvidia fork of) caffe on another box, I did not observe.

Could there be some race with the parallel build?

@lukeyeager
Copy link
Member

Could there be some race with the parallel build?

I'm not sure what you mean. Were you building the multi-GPU branch of caffe? That's not going to work with DIGITS (yet).

@cancan101
Copy link
Author

No, the normal fork with standard build instructions. I was just spitballing if the make has some issue in when is runs protoc.

@lukeyeager
Copy link
Member

Yep, I think you're right. According to @moconnor725, this is a problem with the parallel build path in caffe. Try it without the --jobs=4 flag and see if you still get the error.

@sallymmx
Copy link

Also solved my problem, thank you!
@cancan101

@yhlleo
Copy link

yhlleo commented May 16, 2016

I solved it by inputting the commands:

$ make clean
$ make all -j8

@seashell9
Copy link

@yhlleo I try your method and it works. It is beacause the first time i try to bulid caffe, i dont use 'sudo', and so I get this error. Then I add 'sudo' in front of the command. But I still get the error, beacause the wrong building is still in the caffe folder. So I need to 'make clean' before 'sudo make all'.

@Po-Hsuan-Huang
Copy link

@seashell9 Your answer helped me as well. I didn't include sudo and I got the error. I am not sure why. make all -j8 is also better than make -j8. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants