问题描述
doris core在make的过程中报错如下:
g++ -O -Wno-deprecated -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE-D__USE_FFTW_LIBRARY__ -I/StaMPS/fftw-3.2.1/include -c -o processor.o In file included from constants.hh:52:0,from matrixbk.hh:59,from :44:bk_messages.hh: In member function ‘void bk_messages::setidentifyer(const char*)’:bk_messages.hh:214:26: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]strcat(name_,'\0');// terminate id^In file included from /usr/include/features.h:424:0,from /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39,from /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533,from /usr/include/c++/7/iostream:38,from bk_messages.hh:42,from constants.hh:52,from matrixbk.hh:59,from :44:/usr/include/x86_64-linux-gnu/bits/string_fortified.h:126:1: note: initializing argument 2 of ‘char* strcat(char*, const char*)’__NTH (strcat (char *__restrict __dest, const char *__restrict __src))^In file included from constants.hh:52:0,from matrixbk.hh:59,from :44:bk_messages.hh:214:26: warning: null argument where non-null required (argument 2) [-Wnonnull]strcat(name_,'\0');// terminate id^: In function ‘int main(int, char**)’::363:15: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]system(cmd);// this does the work~~~~~~^~~~~:1198:15: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]system(cmd);// This does the actual work~~~~~~^~~~~:2132:41: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]if (input_i_fine.plotoffsets) system(cmd);~~~~~~^~~~~:2323:37: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]if (input_i_coregpm.plot) system(cmd);~~~~~~^~~~~: In function ‘void handleinput(int, char**, input_gen&)’::3546:17: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]system("helpdoris");~~~~~~^~~~~~~~~~~~~:3555:17: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]system(cmd);~~~~~~^~~~~: In function ‘void preview(int32, int32, int32, const char*, const string&, const string&)’::4074:11: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]system(DEBUG.get_str());~~~~~~^~~~~~~~~~~~~~~~~:4079:11: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]system(INFO.get_str());~~~~~~^~~~~~~~~~~~~~~~Makefile:158: recipe for target 'processor.o' failedmake: *** [processor.o] Error 1cnu@cnu-ThinkStation-P920:/StaMPS/doris_v4.0
解决方法:
找到src文件夹下的bk_messages.hh文件,将第214行的
strcat(name_,'\0');// terminate id
更改为
name_[9] = '\0';// terminate id