facebookresearch / Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Apache License 2.0
26.24k stars 5.45k forks source link

fatal error: google/protobuf/stubs/strutil.h: No such file or directory #758

Open NIEYALI opened 5 years ago

NIEYALI commented 5 years ago

Expected results

make ops successfully

Actual results

nyl@nyl:~/Detectron$ make ops mkdir -p build && cd build && cmake .. && make -j24 -- Caffe2: CUDA detected: 8.0 -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr/local/cuda -- Caffe2: Header version is: 8.0 -- Found cuDNN: v6.0.21 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so) -- Autodetected CUDA architecture(s): 7.5;7.5 -- Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75 -- Summary: -- CMake version : 3.13.0 -- CMake command : /usr/local/bin/cmake -- System name : Linux -- C++ compiler : /usr/bin/c++ -- C++ compiler version : 5.4.0 -- CXX flags : -std=c++11 -O2 -fPIC -Wno-narrowing -- Caffe2 version : 1.0.0 -- Caffe2 include path : /home/nyl/pytorch/torch/lib/tmp_install/lib/include -- Caffe2 found CUDA : True -- CUDA version : 8.0 -- CuDNN version : 6.0.21 -- Configuring done -- Generating done -- Build files have been written to: /home/nyl/Detectron/build make[1]: Entering directory '/home/nyl/Detectron/build' make[2]: Entering directory '/home/nyl/Detectron/build' make[3]: Entering directory '/home/nyl/Detectron/build' make[3]: Entering directory '/home/nyl/Detectron/build' [ 40%] Building NVCC (Device) object CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o make[3]: Leaving directory '/home/nyl/Detectron/build' make[3]: Entering directory '/home/nyl/Detectron/build' [ 40%] Building CXX object CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o nvcc fatal : Unsupported gpu architecture 'compute_75' CMake Error at caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o.cmake:219 (message): Error generating /home/nyl/Detectron/build/CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/./caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o

CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/build.make:63: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o' failed make[3]: [CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o] Error 1 make[3]: Leaving directory '/home/nyl/Detectron/build' CMakeFiles/Makefile2:109: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/all' failed make[2]: [CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/all] Error 2 make[2]: Waiting for unfinished jobs.... In file included from /home/nyl/pytorch/torch/lib/tmp_install/include/google/protobuf/wire_format_lite_inl.h:45:0, from /home/nyl/pytorch/torch/lib/tmp_install/include/google/protobuf/map_type_handler.h:35, from /home/nyl/pytorch/torch/lib/tmp_install/include/google/protobuf/map.h:49, from /home/nyl/pytorch/torch/lib/tmp_install/include/google/protobuf/generated_message_table_driven.h:34, from /home/nyl/pytorch/torch/lib/tmp_install/include/caffe2/proto/caffe2.pb.h:26, from /home/nyl/pytorch/torch/lib/tmp_install/include/caffe2/proto/caffe2_pb.h:4, from /home/nyl/pytorch/torch/lib/tmp_install/include/caffe2/core/context_base.h:7, from /home/nyl/pytorch/torch/lib/tmp_install/include/caffe2/core/context.h:10, from /home/nyl/Detectron/detectron/ops/zero_even_op.h:20, from /home/nyl/Detectron/detectron/ops/zero_even_op.cc:17: /home/nyl/pytorch/torch/lib/tmp_install/include/google/protobuf/message_lite.h:49:43: fatal error: google/protobuf/stubs/strutil.h: No such file or directory compilation terminated. CMakeFiles/caffe2_detectron_custom_ops.dir/build.make:62: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o' failed make[3]: [CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o] Error 1 make[3]: Leaving directory '/home/nyl/Detectron/build' CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops.dir/all' failed make[2]: [CMakeFiles/caffe2_detectron_custom_ops.dir/all] Error 2 make[2]: Leaving directory '/home/nyl/Detectron/build' Makefile:129: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/home/nyl/Detectron/build' Makefile:13: recipe for target 'ops' failed make: *** [ops] Error 2

Detailed steps to reproduce

make ops I put export Caffe2_DIR=/home/nyl/pytorch/torch/lib/tmp_install/share/cmake/Caffe2 in the file bashrc.

System information

NIEYALI commented 5 years ago

now I met new problem after I reinstall protobuf. nyl@nyl:~/Detectron$ make ops mkdir -p build && cd build && cmake .. && make -j24 -- Caffe2: CUDA detected: 8.0 -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr/local/cuda -- Caffe2: Header version is: 8.0 -- Found cuDNN: v6.0.21 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so) -- Autodetected CUDA architecture(s): 7.5;7.5 -- Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75 -- Summary: -- CMake version : 3.13.0 -- CMake command : /usr/local/bin/cmake -- System name : Linux -- C++ compiler : /usr/bin/c++ -- C++ compiler version : 5.4.0 -- CXX flags : -std=c++11 -O2 -fPIC -Wno-narrowing -- Caffe2 version : 1.0.0 -- Caffe2 include path : /home/nyl/pytorch/torch/lib/tmp_install/lib/include -- Caffe2 found CUDA : True -- CUDA version : 8.0 -- CuDNN version : 6.0.21 -- Configuring done -- Generating done -- Build files have been written to: /home/nyl/Detectron/build make[1]: Entering directory '/home/nyl/Detectron/build' make[2]: Entering directory '/home/nyl/Detectron/build' make[3]: Entering directory '/home/nyl/Detectron/build' make[3]: Entering directory '/home/nyl/Detectron/build' [ 60%] Building NVCC (Device) object CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o make[3]: Leaving directory '/home/nyl/Detectron/build' make[3]: Entering directory '/home/nyl/Detectron/build' [ 60%] Building CXX object CMakeFiles/caffe2_detectron_custom_ops.dir/detectron/ops/zero_even_op.cc.o nvcc fatal : Unsupported gpu architecture 'compute_75' CMake Error at caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o.cmake:219 (message): Error generating /home/nyl/Detectron/build/CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/./caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o

CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/build.make:63: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o' failed make[3]: [CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/detectron/ops/caffe2_detectron_custom_ops_gpu_generated_zero_even_op.cu.o] Error 1 make[3]: Leaving directory '/home/nyl/Detectron/build' CMakeFiles/Makefile2:109: recipe for target 'CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/all' failed make[2]: [CMakeFiles/caffe2_detectron_custom_ops_gpu.dir/all] Error 2 make[2]: Waiting for unfinished jobs.... [ 60%] Linking CXX shared library libcaffe2_detectron_custom_ops.so make[3]: Leaving directory '/home/nyl/Detectron/build' [ 60%] Built target caffe2_detectron_custom_ops make[2]: Leaving directory '/home/nyl/Detectron/build' Makefile:129: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/home/nyl/Detectron/build' Makefile:13: recipe for target 'ops' failed make: *** [ops] Error 2

Anyone has good ideas. Thanks a lot.

xujin1184104394 commented 5 years ago

Is your problem solved? I have a problem similar to yours.

pangold commented 5 years ago

I got the same problem, include directories '${PROTOBUF_PATH}/src' can solve this problem. Because I found that there is 'strutil.h' under the directory 'src/google/protobuf/'