【 使用环境 】 测试环境
【 OB 】
【 使用版本 】最新版本
【问题描述】在docker中构建ob出错 fatal error: ‘os/signpost.h’ file not found
【复现路径】
dockerfile如下
FROM centos:7
RUN yum install -y yum-utils
RUN yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
RUN yum install -y obclient
RUN yum install -y ob-deploy
RUN source /etc/profile.d/obd.sh
RUN yum -y install git
RUN git clone https://github.com/oceanbase/oceanbase.git
WORKDIR /oceanbase/
RUN yum install -y wget rpm* cpio make glibc-devel glibc-headers binutils
RUN sh build.sh --init
【问题现象及影响】
运行
sh build.sh --init
输出
-- observer_add_target ob_sql_simd
CMake Error at src/sql/CMakeLists.txt:1129 (message):
Generate sql parser failed and check error in
/oceanbase/src/sql/parser/_gen_parser.error
-- Configuring incomplete, errors occurred!
See also "/oceanbase/build_debug/CMakeFiles/CMakeOutput.log".
See also "/oceanbase/build_debug/CMakeFiles/CMakeError.log".
[build.sh][ERROR] Failed to generate Makefile
其中 /oceanbase/build_debug/CMakeFiles/CMakeError.log 的内容为
Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
clang version 11.0.1 (git@gitlab.alibaba-inc.com:oceanbase-ce-publish/ob-deps.git 0235b6078aa2a9f8dc8f65ec5e94ce5d1394f022)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /oceanbase/deps/3rd/usr/local/oceanbase/devtools/bin
Determining if the os_signpost_interval_begin exist failed with the following output:
Change Dir: /oceanbase/build_debug/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_81cc0/fast && /usr/bin/gmake -f CMakeFiles/cmTC_81cc0.dir/build.make CMakeFiles/cmTC_81cc0.dir/build
gmake[1]: Entering directory `/oceanbase/build_debug/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_81cc0.dir/CheckSymbolExists.c.o
/oceanbase/deps/3rd/usr/local/oceanbase/devtools/bin/clang --gcc-toolchain=/oceanbase/deps/3rd/usr/local/oceanbase/devtools -fdebug-prefix-map=/oceanbase=. -fcolor-diagnostics -ffunction-sections -funique-internal-linkage-names -fdebug-info-for-profiling -fmax-type-align=8 -DFATAL_ERROR_HANG -fPIC -Werror=date-time -Werror=unguarded-availability-new -w -fPIE -MD -MT CMakeFiles/cmTC_81cc0.dir/CheckSymbolExists.c.o -MF CMakeFiles/cmTC_81cc0.dir/CheckSymbolExists.c.o.d -o CMakeFiles/cmTC_81cc0.dir/CheckSymbolExists.c.o -c /oceanbase/build_debug/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/oceanbase/build_debug/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: 'os/signpost.h' file not found
#include <os/signpost.h>
^~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [CMakeFiles/cmTC_81cc0.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: Leaving directory `/oceanbase/build_debug/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_81cc0/fast] Error 2
File /oceanbase/build_debug/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <os/signpost.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef os_signpost_interval_begin
return ((int*)(&os_signpost_interval_begin))[argc];
#else
(void)argc;
return 0;
#endif
}
【附件】