Build errors with Mac OS X
Created by: wangkuiyi
When I run make
after cmake
succeeded, it complains that
[ 5%] Built target gen_proto_py
[ 9%] Built target paddle_proto
[ 11%] Built target paddle_cuda
[ 11%] Building CXX object paddle/utils/CMakeFiles/paddle_utils.dir/Util.cpp.o
In file included from /Users/yi/work/paddle/paddle/utils/Util.cpp:16:
In file included from /Users/yi/work/paddle/paddle/utils/Util.h:31:
In file included from /Users/yi/work/paddle/paddle/utils/Logging.h:183:
/usr/local/include/glog/logging.h:695:32: error: comparison of integers of different signs:
'const unsigned long long' and 'const int' [-Werror,-Wsign-compare]
DEFINE_CHECK_OP_IMPL(Check_NE, !=) // Use CHECK(x == NULL) instead.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/local/include/glog/logging.h:683:32: note: expanded from macro 'DEFINE_CHECK_OP_IMPL'
if (GOOGLE_PREDICT_TRUE(v1 op v2)) return NULL; \
^
/usr/local/include/glog/logging.h:133:53: note: expanded from macro 'GOOGLE_PREDICT_TRUE'
#define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
^
/Users/yi/work/paddle/paddle/utils/Util.cpp:109:3: note: in instantiation of function template specialization
'google::Check_NEImpl<unsigned long long, int>' requested here
CHECK_NE(tid, -1);
^
/usr/local/include/glog/logging.h:766:30: note: expanded from macro 'CHECK_NE'
#define CHECK_NE(val1, val2) CHECK_OP(_NE, !=, val1, val2)
^
/usr/local/include/glog/logging.h:741:3: note: expanded from macro 'CHECK_OP'
CHECK_OP_LOG(name, op, val1, val2, google::LogMessageFatal)
^
/usr/local/include/glog/logging.h:732:18: note: expanded from macro 'CHECK_OP_LOG'
google::Check##name##Impl( \
^
<scratch space>:165:1: note: expanded from here
Check_NEImpl
^
1 error generated.
make[2]: *** [paddle/utils/CMakeFiles/paddle_utils.dir/Util.cpp.o] Error 1
make[1]: *** [paddle/utils/CMakeFiles/paddle_utils.dir/all] Error 2
make: *** [all] Error 2
I am running Mac OS X 10.10.5 and Xcode 7.2.1.
$ clang --version
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix