Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

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

Closed
@cancan101

Description

@cancan101

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?

Activity

lukeyeager

lukeyeager commented on May 14, 2015

@lukeyeager
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

cancan101 commented on May 14, 2015

@cancan101
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

lukeyeager commented on May 14, 2015

@lukeyeager
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

cancan101 commented on May 14, 2015

@cancan101
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

lukeyeager commented on May 15, 2015

@lukeyeager
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

sallymmx commented on Mar 21, 2016

@sallymmx

Also solved my problem, thank you!
@cancan101

yhlleo

yhlleo commented on May 16, 2016

@yhlleo

I solved it by inputting the commands:

$ make clean
$ make all -j8
seashell9

seashell9 commented on Mar 16, 2017

@seashell9

@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

Po-Hsuan-Huang commented on Mar 29, 2017

@Po-Hsuan-Huang

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cancan101@lukeyeager@sallymmx@yhlleo@Po-Hsuan-Huang

        Issue actions

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