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

failed in build caffe, when i run make. #5671

Closed
chinesezyc opened this issue Jun 6, 2017 · 4 comments
Closed

failed in build caffe, when i run make. #5671

chinesezyc opened this issue Jun 6, 2017 · 4 comments

Comments

@chinesezyc
Copy link

chinesezyc commented Jun 6, 2017

Issue summary

make -j8
PROTOC src/caffe/proto/caffe.proto
CXX src/caffe/data_transformer.cpp
CXX src/caffe/blob.cpp
CXX src/caffe/solvers/adagrad_solver.cpp
CXX src/caffe/solvers/sgd_solver.cpp
CXX src/caffe/solvers/rmsprop_solver.cpp
CXX src/caffe/solvers/adam_solver.cpp
CXX src/caffe/solvers/adadelta_solver.cpp
CXX src/caffe/solvers/nesterov_solver.cpp
In file included from src/caffe/solvers/sgd_solver.cpp:7:0:
./include/caffe/util/io.hpp:192:40: error: ‘AnnotatedDatum_AnnotationType’ does not name a type
const std::string& encoding, const AnnotatedDatum_AnnotationType type,
^
./include/caffe/util/io.hpp:194:5: error: ‘AnnotatedDatum’ has not been declared
AnnotatedDatum* anno_datum);
^
./include/caffe/util/io.hpp:199:11: error: ‘AnnotatedDatum_AnnotationType’ does not name a type
const AnnotatedDatum_AnnotationType type, const string& labeltype,
^
./include/caffe/util/io.hpp:200:49: error: ‘AnnotatedDatum’ has not been declared
const std::map<string, int>& name_to_label, AnnotatedDatum* anno_datum) {
^
./include/caffe/util/io.hpp:208:5: error: ‘AnnotatedDatum’ has not been declared
AnnotatedDatum* anno_datum);
^
./include/caffe/util/io.hpp:212:5: error: ‘AnnotatedDatum’ has not been declared
AnnotatedDatum* anno_datum);
^
./include/caffe/util/io.hpp:215:22: error: ‘AnnotatedDatum’ has not been declared
const int width, AnnotatedDatum* anno_datum);
^
./include/caffe/util/io.hpp:218:30: error: ‘LabelMap’ has not been declared
const string& delimiter, LabelMap* map);
^
./include/caffe/util/io.hpp:221:32: error: ‘LabelMap’ has not been declared
bool include_background, LabelMap* map) {
^
./include/caffe/util/io.hpp:225:61: error: ‘LabelMap’ has not been declared
inline bool ReadLabelFileToLabelMap(const string& filename, LabelMap* map) {
^
./include/caffe/util/io.hpp:229:27: error: ‘LabelMap’ does not name a type
bool MapNameToLabel(const LabelMap& map, const bool strict_check,
^
./include/caffe/util/io.hpp:232:34: error: ‘LabelMap’ does not name a type
inline bool MapNameToLabel(const LabelMap& map,
^
./include/caffe/util/io.hpp:237:27: error: ‘LabelMap’ does not name a type
bool MapLabelToName(const LabelMap& map, const bool strict_check,
^
./include/caffe/util/io.hpp:240:34: error: ‘LabelMap’ does not name a type
inline bool MapLabelToName(const LabelMap& map,
^
./include/caffe/util/io.hpp:245:34: error: ‘LabelMap’ does not name a type
bool MapLabelToDisplayName(const LabelMap& map, const bool strict_check,
^
./include/caffe/util/io.hpp:248:41: error: ‘LabelMap’ does not name a type
inline bool MapLabelToDisplayName(const LabelMap& map,

Your system configuration

Operating system: Ubuntu16.04
Compiler: gcc V5.4
CUDA version (if applicable): CUDA8.0
CUDNN version (if applicable): CUDNN5.0
BLAS: openBLAS
Python or MATLAB version (for pycaffe and matcaffe respectively): anaconda python3.5

@Dulinn
Copy link

Dulinn commented Jul 3, 2017

Hey! Since you closed this issue, I guess you found a solution? Would you mind sharing the reason of the problem and the solution? I'm having the same issue at the moment...

Thanks in advance :)

@chinesezyc
Copy link
Author

chinesezyc commented Jul 4, 2017

@Dulinn the reason is other user executed the following command when they build caffe: make&make install.
so the os has two caffe repository.
solution 1: you can run "cd /usr & find -name caffe " then delete it
solution 2:
2.1open Makefile
2.2find the row COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-isystem $(includedir))
2.1modify the row COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I $(includedir))

anyway I solved the problem with solution 2

@vokhidovhusan
Copy link

@Dulinn thank you for request
@chinesezyc Thank you for helpful answer, it helped me

@zhukkang
Copy link

zhukkang commented Sep 8, 2018

as i used the method of 👍
"cd /usr & find -name caffe " then delete it

in /usr folder find the caffe file , as just delete the caffe.pb.h

then copy your own caffe.pb.h into the ${caffe_root} \include\caffe\proto folder
issue fixed

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

4 participants