cxxnet run build.sh: compilation error for im2rec on Ubuntu 14.04 LTS
Closed this issue · 2 comments
Hello,
I try to compile cxxnet on Ubuntu 64-bit machine, have the following error, could anyone point me out where is problem?
OpenCV is well configured, I think.
Regards,
Yi
nvcc -c -o nnet_gpu.o --use_fast_math -g -O3 -ccbin g++ -Xcompiler "-DMSHADOW_FORCE_STREAM -Wall -g -O3 -I./mshadow/ -I./dmlc-core/include -fPIC -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -I/usr/lib/nvidia-cuda-toolkit/include -I~/intel/mkl/include -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DCXXNET_USE_OPENCV=1 -DCXXNET_USE_OPENCV_DECODER=1 -fopenmp " src/nnet/nnet_impl.cu
g++ -DMSHADOW_FORCE_STREAM -Wall -g -O3 -I./mshadow/ -I./dmlc-core/include -fPIC -msse3 -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -I/usr/lib/nvidia-cuda-toolkit/include -I~/intel/mkl/include -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DCXXNET_USE_OPENCV=1 -DCXXNET_USE_OPENCV_DECODER=1 -fopenmp -o bin/im2rec tools/im2rec.cc dmlc-core/libdmlc.a -pthread -lm -lcudart -lcublas -lcurand -L/usr/lib/nvidia-cuda-toolkit/lib64 -L~/intel/mkl/lib/intel64 -L~/intel/lib/intel64 -Wl,--start-group ~/intel/mkl/lib/intel64/libmkl_intel_lp64.a ~/intel/mkl/lib/intel64/libmkl_core.a ~/intel/mkl/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -liomp5 -ldl -lpthread -lm -lrt -fopenmp pkg-config --libs opencv
-ljpeg
In file included from ./dmlc-core/include/dmlc/timer.h:13:0,
from tools/im2rec.cc:18:
tools/../src/io/image_recordio.h: In member function ‘void cxxnet::ImageRecordIO::Load(void_, size_t)’:
./dmlc-core/include/dmlc/./logging.h:33:37: error: ‘LogMessageFatal’ was not declared in this scope
LogMessageFatal(FILE, LINE).stream() << "Check "
^
tools/../src/io/image_recordio.h:59:5: note: in expansion of macro ‘CHECK’
CHECK(size >= sizeof(header));
^
./dmlc-core/include/dmlc/./logging.h:33:37: note: suggested alternative:
LogMessageFatal(FILE, LINE).stream() << "Check "
^
tools/../src/io/image_recordio.h:59:5: note: in expansion of macro ‘CHECK’
CHECK(size >= sizeof(header));
^
./dmlc-core/include/dmlc/./logging.h:147:7: note: ‘dmlc::LogMessageFatal’
class LogMessageFatal : public LogMessage {
^
tools/im2rec.cc: In function ‘int main(int, char__)’:
./dmlc-core/include/dmlc/./logging.h:69:47: error: ‘LogMessage’ was not declared in this scope
#define LOG_INFO LogMessage(FILE, LINE)
^
./dmlc-core/include/dmlc/./logging.h:78:23: note: in expansion of macro ‘LOG_INFO’
#define LOG(severity) LOG_##severity.stream()
^
tools/im2rec.cc:48:5: note: in expansion of macro ‘LOG’
LOG(INFO) << "New Image Size: Short Edge " << new_size;
^
./dmlc-core/include/dmlc/./logging.h:69:47: note: suggested alternative:
#define LOG_INFO LogMessage(FILE, LINE)
^
./dmlc-core/include/dmlc/./logging.h:78:23: note: in expansion of macro ‘LOG_INFO’
#define LOG(severity) LOG_##severity.stream()
^
tools/im2rec.cc:48:5: note: in expansion of macro ‘LOG’
LOG(INFO) << "New Image Size: Short Edge " << new_size;
^
./dmlc-core/include/dmlc/./logging.h:122:7: note: ‘dmlc::LogMessage’
class LogMessage {
^
./dmlc-core/include/dmlc/./logging.h:69:47: error: ‘LogMessage’ was not declared in this scope
#define LOG_INFO LogMessage(FILE, LINE)
^
./dmlc-core/include/dmlc/./logging.h:78:23: note: in expansion of macro ‘LOG_INFO’
#define LOG(severity) LOG_##severity.stream()
^
tools/im2rec.cc:50:5: note: in expansion of macro ‘LOG’
LOG(INFO) << "Keep origin image size";
^
./dmlc-core/include/dmlc/./logging.h:69:47: note: suggested alternative:
#define LOG_INFO LogMessage(FILE, LINE)
^
./dmlc-core/include/dmlc/./logging.h:78:23: note: in expansion of macro ‘LOG_INFO’
#define LOG(severity) LOG_##severity.stream()
^
tools/im2rec.cc:50:5: note: in expansion of macro ‘LOG’
LOG(INFO) << "Keep origin image size";
^
./dmlc-core/include/dmlc/./logging.h:122:7: note: ‘dmlc::LogMessage’
class LogMessage {
^
make: *_* [bin/im2rec] Error 1
make: *** Waiting for unfinished jobs....
My guess is the problem lies in 'glog/logging.h' ??
On the machine, this lib is located at : /usr/include/glog/logging.h
./dmlc-core/include/dmlc/./logging.h:33:37: error: ‘LogMessageFatal’ was not declared in this scope
namespace dmlc {
// Always-on checking
#define CHECK(x)
if (!(x))
Line 33 --> LogMessageFatal(FILE, LINE).stream() << "Check "
"failed: " #x << ' '
#define CHECK_LT(x, y) CHECK((x) < (y))
#define CHECK_GT(x, y) CHECK((x) > (y))
#define CHECK_LE(x, y) CHECK((x) <= (y))
#define CHECK_GE(x, y) CHECK((x) >= (y))
#define CHECK_EQ(x, y) CHECK((x) == (y))
#define CHECK_NE(x, y) CHECK((x) != (y))
#define CHECK_NOTNULL(x) CHECK((x) != NULL)
Thanks reporting the issue, I pushed a fix to dmlc-core, it should be OK now