代码拉取完成,页面将自动刷新
【标题描述】-O3 -fllc-allocate --param=filter-kernels=1 --param=branch-prob-threshold=50选项导致Greenplum编译卡死
一、缺陷信息
【环境信息】
软件信息
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/10.3.1/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,objc,obj-c++,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --without-cloog --enable-gnu-indirect-function --build=aarch64-linux-gnu --with-stage1-ldflags=' -Wl,-z,relro,-z,now' --with-boot-ldflags=' -Wl,-z,relro,-z,now' --disable-bootstrap --with-multilib-list=lp64 --enable-bolt
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.1 (GCC)
【问题复现步骤】
一、配置编译环境
1.安装依赖
yum -y install curl-devel bzip2-devel python-devel openssl-devel readline-devel perl-ExtUtils-Embed libxml2-devel openldap-devel pam pam-devel perl-devel apr-devel libevent-devel libyaml libyaml-devel libedit-devel libffi-devel bison flex flex-devel
2.安装zstd-dev
1.获取源码:https://github.com/facebook/zstd/releases,选择1.4.3版本源码下载
2、执行以下命令编译安装
tar xf zstd-1.4.3.tar.gz
cd zstd-1.4.3
make -j96
make DESTDIR=/path/zstd-1.4.3 install
export INCLUDE=/path/zstd-1.4.3/include:$INCLUDE
export LD_LIBRARY_PATH=/path/zstd-1.4.3/lib:$LD_LIBRARY_PATH
3.安装 Xerces
1.获取源码:https://github.com/greenplum-db/gp-xerces/releases/tag/v3.1.2-p1,选择v3.1.2-p1版本源码下载
2、执行以下命令编译安装
unzip gp-xerces-3.1.2-p1.zip
cd gp-xerces-3.1.2-p1
./configure --prefix=/path/gp-xerces-3.1.2-p1
make -j96
make install
export INCLUDE=/path/gp-xerces-3.1.2-p1/include:$INCLUDE
export LD_LIBRARY_PATH=/path/gp-xerces-3.1.2-p1/lib:$LD_LIBRARY_PATH
4.安装re2c
1.获取源码:https://github.com/skvadrik/re2c/releases,选择2.0.3版本源码下载
2、执行以下命令编译安装
unzip re2c-2.0.3.zip
cd re2c-2.0.3
./autogen.sh
./configure --prefix=/path/re2c-2.0.3
make -j96
make install
export INCLUDE=/path/re2c-2.0.3/include:$INCLUDE
export LD_LIBRARY_PATH=/path/re2c-2.0.3/lib:$LD_LIBRARY_PATH
5.安装gporca
1.获取源码:https://github.com/greenplum-db/gporca/releases,选择v3.65.3版本源码下载
2、执行以下命令编译安装
unzip gporca-3.65.3.zip
cd gporca-3.65.3
cmake . -DCMAKE_INSTALL_PREFIX=/path/gporca-3.65.3 -DXERCES_INCLUDE_DIR=/path/gp-xerces-3.1.2-p1/include -DXERCES_LIBRARY=/path/gp-xerces-3.1.2-p1/lib/libxerces-c.so
sed -i "167d" libgpos/src/common/CStackDescriptor.cpp
make -j96
make install
export INCLUDE=/path/gporca-3.65.3/include:$INCLUDE
export LD_LIBRARY_PATH=/path/gporca-3.65.3/lib:$LD_LIBRARY_PATH
二、编译安装
1.获取源码:https://github.com/greenplum-db/gpdb/releases,选择6.0.0版本源码下载
2.执行以下命令进行编译安装
export CC="gcc -O3 -fllc-allocate --param=filter-kernels=1 --param=branch-prob-threshold=50"
export CXX="g++ -O3 -fllc-allocate --param=filter-kernels=1 --param=branch-prob-threshold=50"
export FC="gfortran -O3 -fllc-allocate --param=filter-kernels=1 --param=branch-prob-threshold=50"
tar xf 6.0.0.tar.gz
cd gpdb-6.0.0
./configure --with-perl --with-python --with-libxml --disable-gpfdist --prefix=/path/gpdb-6.0.0 --with-includes=${INCLUDE} --with-libraries=${LD_LIBRARY_PATH} CFLAGS="-Wmaybe-uninitialized -fcommon" CXXFLAGS="-Wmaybe-uninitialized -fcommon"
make
【实际结果】
编译卡死
【其他相关附件信息】
应用编译安装过程可参考:https://www.hikunpeng.com/document/detail/zh/kunpengdbs/ecosystemEnable/Greenplum/kunpenggreenplum_02_0001.html
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论
FileDragTip