当前位置: 代码迷 >> 综合 >> doris core安装报错Makefile:158: recipe for target 'processor.o' failed make: *** [processor.o] Error 1
  详细解决方案

doris core安装报错Makefile:158: recipe for target 'processor.o' failed make: *** [processor.o] Error 1

热度:6   发布时间:2023-12-17 04:53:46.0

问题描述

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 processor.cc
In file included from constants.hh:52:0,from matrixbk.hh:59,from processor.cc: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 processor.cc: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 processor.cc:44:
bk_messages.hh:214:26: warning: null argument where non-null required (argument 2) [-Wnonnull]strcat(name_,'\0');// terminate id^
processor.cc: In function ‘int main(int, char**)’:
processor.cc: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~~~~~~^~~~~
processor.cc: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~~~~~~^~~~~
processor.cc: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);~~~~~~^~~~~
processor.cc: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);~~~~~~^~~~~
processor.cc: In function ‘void handleinput(int, char**, input_gen&)’:
processor.cc:3546:17: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]system("helpdoris");~~~~~~^~~~~~~~~~~~~
processor.cc:3555:17: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]system(cmd);~~~~~~^~~~~
processor.cc: In function ‘void preview(int32, int32, int32, const char*, const string&, const string&)’:
processor.cc:4074:11: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]system(DEBUG.get_str());~~~~~~^~~~~~~~~~~~~~~~~
processor.cc: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' failed
make: *** [processor.o] Error 1
cnu@cnu-ThinkStation-P920:/StaMPS/doris_v4.0

解决方法:

找到src文件夹下的bk_messages.hh文件,将第214行的
strcat(name_,'\0');// terminate id更改为
name_[9] = '\0';// terminate id

  相关解决方案