Build Debug version error
Created by: chuanqi129
When we build Paddle using the cmake command below with Dubug version, the following error occurs in the build process, please have a look on it.
cmake command:
cmake .. -DWITH_DOC=OFF -DWITH_GPU=OFF -DWITH_DISTRIBUTE=OFF -DWITH_MKLDNN=ON -DWITH_GOLANG=OFF -DWITH_SWIG_PY=ON -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_TIMER=OFF -DWITH_PROFILER=OFF -DWITH_FLUID_ONLY=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWITH_INFERENCE_API_TEST=ON
error infomation:
[ 16%] Linking CXX executable data_layout_transform_test libdata_layout_transform.a(data_layout_transform.cc.o): In function
paddle::framework::ToMKLDNNDataType(paddle::framework::proto::VarType_Type)': /home/chuanqiw/paddle/baidu_paddle/paddle/fluid/framework/data_layout_transform.h:59: undefined reference to
paddle::framework::DataTypeTrait::DataType' libdata_layout_transform.a(data_layout_transform.cc.o): In functionpaddle::framework::ToMKLDNNDataType(paddle::framework::proto::VarType_Type)': data_layout_transform.cc:(.text._ZN6paddle9framework16ToMKLDNNDataTypeENS0_5proto12VarType_TypeE[_ZN6paddle9framework16ToMKLDNNDataTypeENS0_5proto12VarType_TypeE]+0x8f): undefined reference to
paddle::framework::DataTypeTrait::DataType' data_layout_transform.cc:(.text._ZN6paddle9framework16ToMKLDNNDataTypeENS0_5proto12VarType_TypeE[_ZN6paddle9framework16ToMKLDNNDataTypeENS0_5proto12VarType_TypeE]+0xb7): undefined reference topaddle::framework::DataTypeTrait<unsigned char>::DataType' data_layout_transform.cc:(.text._ZN6paddle9framework16ToMKLDNNDataTypeENS0_5proto12VarType_TypeE[_ZN6paddle9framework16ToMKLDNNDataTypeENS0_5proto12VarType_TypeE]+0xdf): undefined reference to
paddle::framework::DataTypeTrait::DataType' data_layout_transform.cc:(.text._ZN6paddle9framework16ToMKLDNNDataTypeENS0_5proto12VarType_TypeE[_ZN6paddle9framework16ToMKLDNNDataTypeENS0_5proto12VarType_TypeE]+0x107): undefined reference to `paddle::framework::DataTypeTrait::DataType' collect2: error: ld returned 1 exit status make[2]: *** [paddle/fluid/framework/data_layout_transform_test] Error 1 make[1]: *** [paddle/fluid/framework/CMakeFiles/data_layout_transform_test.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....
Other information:
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) CentOS Linux release 7.4.1708 (Core)