【 使用环境 】测试环境
【 OB or 其他组件 】observer
【 使用版本 】4.3.1
【问题描述】在 Ubuntu 22.04 中,编译 OceanBase 4.3.1 时,出现如下错误:
Performing build step for ‘babassl’
CMake Error at /data/oceanbase/build_debug/deps/babassl-subbuild/src/babassl-stamp/babassl-build-Debug.cmake:49 (message):
Command failed: 2
‘make’
See also
/data/oceanbase/build_debug/deps/babassl-subbuild/src/babassl-stamp/babassl-build-*.log
查看 babassl-stamp/babassl-build-err.log 日志文件中详细的错误信息,如下(截取了部分信息,其它报错信息都是一样的):
In file included from /data/oceanbase/deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/9/include-fixed/limits.h:194,
from /data/oceanbase/deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/9/include-fixed/syslimits.h:7,
from /data/oceanbase/deps/3rd/usr/local/oceanbase/devtools/lib/gcc/x86_64-redhat-linux/9/include-fixed/limits.h:34,
from ./e_os.h:13,
from apps/apps.h:13,
from apps/app_rand.c:10:
/usr/include/limits.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory
26 | #include <bits/libc-header-start.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
经过查看,bits/libc-header-start.h 文件位于 /usr/include/x86_64-linux-gnu/bits/libc-header-start.h
/data/oceanbase/deps/3rd/usr/local/oceanbase/devtools/bin/gcc -v -E - 的输出如下:
Configured with: ./configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/home/jenkins/agent/workspace/rpm-obdevtools-gcc9-9.3.0-1.1.8/ob_source_code_dir/rpm/.rpm_build/BUILDROOT/obdevtools-gcc9-9.3.0-52022092914.el8.x86_64//usr/local/oceanbase/devtools/ --enable-shared --enable-threads=posix --enable-checking=release --disable-multilib --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --enable-gnu-indirect-function --build=x86_64-redhat-linux
Thread model: posix
gcc version 9.3.0 (GCC)
COLLECT_GCC_OPTIONS=’-v’ ‘-E’ ‘-mtune=generic’ ‘-march=x86-64’
/data/oceanbase/deps/3rd/usr/local/oceanbase/devtools/bin/…/libexec/gcc/x86_64-redhat-linux/9/cc1 -E -quiet -v -iprefix /data/oceanbase/deps/3rd/usr/local/oceanbase/devtools/bin/…/lib/gcc/x86_64-redhat-linux/9/ - -mtune=generic -march=x86-64
#include “…” search starts here:
#include <…> search starts here:
/data/oceanbase/deps/3rd/usr/local/oceanbase/devtools/bin/…/lib/gcc/x86_64-redhat-linux/9/include
/data/oceanbase/deps/3rd/usr/local/oceanbase/devtools/bin/…/lib/gcc/x86_64-redhat-linux/9/include-fixed
/usr/local/include
/data/oceanbase/deps/3rd/usr/local/oceanbase/devtools/bin/…/lib/gcc/…/…/include
/usr/include
End of search list.
从 gcc 的输出来看,它不会去 /usr/include/x86_64-linux-gnu 目录中寻找 bits/libc-header-start.h 头文件。
请问这个问题需要怎么解决?或者还缺少什么信息,需要我提供?