-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Description
Issue summary
Compilation fails with clang
Steps to reproduce
Cloned a fresh checkout from the OpenCL branch of Caffe. Used default CMake settings and set build to Release
Tried solutions
??
System configuration
- Operating system: Ubuntu 16.0.4 LTS
- Compiler: clang 6.0
- CUDA version (if applicable): NA
- CUDNN version (if applicable): NA
- BLAS: CLBlast/ViennaCL
- Python version (if using pycaffe):
- MATLAB version (if using matcaffe):
Issue checklist
- [ x] read the guidelines and removed the first paragraph
- [x ] written a short summary and detailed steps to reproduce
- [x ] explained how solutions to related problems failed (tick if found none)
- [ x] filled system configuration
- attached relevant logs/config files (tick if not applicable)
Summary of build log
naths@naths-HP-Laptop-15-bs1xx:~/build/caffe$ make
[ 0%] Running C++/Python protocol buffer compiler on /home/naths/srcs/caffe/src/caffe/proto/caffe.proto
Scanning dependencies of target caffeproto
[ 1%] Building CXX object src/caffe/CMakeFiles/caffeproto.dir///include/caffe/proto/caffe.pb.cc.o
[ 1%] Linking CXX static library ../../lib/libcaffeproto.a
[ 1%] Built target caffeproto
[ 1%] Generating test macros source (python -> C++).
[ 1%] Generating macros source (python -> C++).
[ 2%] Generating layer creator source (python -> C++).
[ 2%] Generating blob creator source (python -> C++).
[ 2%] Generating quantizer creator source (python -> C++).
Scanning dependencies of target pre_build
[ 4%] Linking CXX static library ../../lib/libpre_build.a
[ 4%] Built target pre_build
Scanning dependencies of target caffe
[ 4%] Building CXX object src/caffe/CMakeFiles/caffe.dir/backend/backend.cpp.o
In file included from /home/naths/srcs/caffe/src/caffe/backend/backend.cpp:1:
In file included from /home/naths/srcs/caffe/include/caffe/backend/backend.hpp:7:
In file included from /home/naths/srcs/caffe/include/caffe/common.hpp:14:
In file included from /home/naths/srcs/caffe/include/caffe/definitions.hpp:25:
In file included from /home/naths/srcs/caffe/include/caffe/trait_helper.hpp:6:
In file included from /home/naths/srcs/caffe/include/caffe/util/half_fp.hpp:5:
/home/naths/srcs/caffe/include/3rdparty/half/half.hpp:1080:12: warning: class
'numeric_limits' was previously declared as a struct [-Wmismatched-tags]
friend class std::numeric_limits<half_fp>;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.4.0/../../../../include/c++/6.4.0/limits:315:12: note:
previous use is here
struct numeric_limits : public __numeric_limits_base
^
1 warning generated.
[ 4%] Building CXX object src/caffe/CMakeFiles/caffe.dir/backend/cuda/caffe_cuda.cpp.o
[ 4%] Building CXX object src/caffe/CMakeFiles/caffe.dir/backend/cuda/cuda_dev_ptr.cpp.o
In file included from /home/naths/srcs/caffe/src/caffe/backend/cuda/cuda_dev_ptr.cpp:1:
In file included from /home/naths/srcs/caffe/include/caffe/common.hpp:14:
In file included from /home/naths/srcs/caffe/include/caffe/definitions.hpp:25:
In file included from /home/naths/srcs/caffe/include/caffe/trait_helper.hpp:6:
In file included from /home/naths/srcs/caffe/include/caffe/util/half_fp.hpp:5:
/home/naths/srcs/caffe/include/3rdparty/half/half.hpp:1080:12: warning: class
'numeric_limits' was previously declared as a struct [-Wmismatched-tags]
friend class std::numeric_limits<half_fp>;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.4.0/../../../../include/c++/6.4.0/limits:315:12: note:
previous use is here
struct numeric_limits : public __numeric_limits_base
^
1 warning generated.
[ 5%] Building CXX object src/caffe/CMakeFiles/caffe.dir/backend/cuda/cuda_device.cpp.o
[ 5%] Building CXX object src/caffe/CMakeFiles/caffe.dir/backend/cuda/cuda_device_kernel.cpp.o
In file included from /home/naths/srcs/caffe/src/caffe/backend/cuda/cuda_device_kernel.cpp:3:
In file included from /home/naths/srcs/caffe/include/caffe/backend/cuda/cuda_device_kernel.hpp:4:
In file included from /home/naths/srcs/caffe/include/caffe/backend/device_kernel.hpp:4:
In file included from /home/naths/srcs/caffe/include/caffe/common.hpp:14:
In file included from /home/naths/srcs/caffe/include/caffe/definitions.hpp:25:
In file included from /home/naths/srcs/caffe/include/caffe/trait_helper.hpp:6:
In file included from /home/naths/srcs/caffe/include/caffe/util/half_fp.hpp:5:
/home/naths/srcs/caffe/include/3rdparty/half/half.hpp:1080:12: warning: class
'numeric_limits' was previously declared as a struct [-Wmismatched-tags]
friend class std::numeric_limits<half_fp>;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.4.0/../../../../include/c++/6.4.0/limits:315:12: note:
previous use is here
struct numeric_limits : public __numeric_limits_base
^
1 warning generated.
[ 5%] Building CXX object src/caffe/CMakeFiles/caffe.dir/backend/cuda/cuda_device_program.cpp.o
[ 5%] Building CXX object src/caffe/CMakeFiles/caffe.dir/backend/device.cpp.o
In file included from /home/naths/srcs/caffe/src/caffe/backend/device.cpp:6:
In file included from /home/naths/srcs/caffe/include/caffe/backend/device.hpp:12:
In file included from /home/naths/srcs/caffe/include/caffe/blob.hpp:8:
In file included from /home/naths/srcs/caffe/include/caffe/common.hpp:14:
In file included from /home/naths/srcs/caffe/include/caffe/definitions.hpp:25:
In file included from /home/naths/srcs/caffe/include/caffe/trait_helper.hpp:6:
In file included from /home/naths/srcs/caffe/include/caffe/util/half_fp.hpp:5:
/home/naths/srcs/caffe/include/3rdparty/half/half.hpp:1080:12: warning: class
'numeric_limits' was previously declared as a struct [-Wmismatched-tags]
friend class std::numeric_limits<half_fp>;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.4.0/../../../../include/c++/6.4.0/limits:315:12: note:
previous use is here
struct numeric_limits : public _numeric_limits_base
^
/home/naths/srcs/caffe/src/caffe/backend/device.cpp:280:50: error: ordered
comparison between pointer and zero ('int32_t *' (aka 'int *') and 'int')
if (*lock_id < buffer_flags.size() && lock_id > 0) {
~~~~~~~ ^ ~
1 warning and 1 error generated.
src/caffe/CMakeFiles/caffe.dir/build.make:140: recipe for target 'src/caffe/CMakeFiles/caffe.dir/backend/device.cpp.o' failed
make[2]: *** [src/caffe/CMakeFiles/caffe.dir/backend/device.cpp.o] Error 1
CMakeFiles/Makefile2:348: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2