You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by BiteTheDDDDt <px...@qq.com.INVALID> on 2023/06/07 08:34:16 UTC
回复:关于编译第三方库
你好。
在编aws-cpp时出错可能是因为没有清理掉原来的残留文件,可以试试把thridparty下面的额外文件删掉。prebuild的产物是流水线自动调用master代码生成的。
另外,我们可以通过环境变量来设置be的编译类型。
export BUILD_TYPE=Debug
BiteTheDDDDt
pxl290@qq.com
------------------ 原始邮件 ------------------
发件人: "dev" <qinhao@newland.com.cn>;
发送时间: 2023年6月7日(星期三) 下午4:29
收件人: "dev"<dev@doris.apache.org>;
主题: 关于编译第三方库
各位好,
我尝试在CentOS7.9上编译第三方库时遇到一些报错,然后我修改了下面这些,大多数第三方库都编译过了,但是在aws-cpp时又遇到错误,最后放弃了,因为我发现有prebuild的第三方库可用。
我用的doris源码是master,关于编译第三方库的脚本,是不是该维护一下了?
还有一个对我最重要的问题,如果想编译debug版本的be和fe,build.sh应该怎么改?如果能提供指点,万分感谢!
diff --git a/env.sh b/env.sh
index 76fa346..e300a6b 100755
--- a/env.sh
+++ b/env.sh
@@ -110,7 +110,7 @@ if [[ -z "${DORIS_TOOLCHAIN}" ]]; then
if [[ "$(uname -s)" == 'Darwin' ]]; then
DORIS_TOOLCHAIN=clang
else
- DORIS_TOOLCHAIN=clang
+ DORIS_TOOLCHAIN=gcc
fi
fi
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index ad348b7..2847bcb 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -359,7 +359,7 @@ build_openssl() {
check_if_source_exist "${OPENSSL_SOURCE}"
cd "${TP_SOURCE_DIR}/${OPENSSL_SOURCE}"
- CPPFLAGS="-I${TP_INCLUDE_DIR}" \
+ CPPFLAGS="-I${TP_INCLUDE_DIR} -fPIC" \
CXXFLAGS="-I${TP_INCLUDE_DIR}" \
LDFLAGS="-L${TP_LIB_DIR}" \
LIBDIR="lib" \
@@ -898,7 +898,7 @@ build_libunixodbc() {
cd "${TP_SOURCE_DIR}/${ODBC_SOURCE}"
- CFLAGS="-I${TP_INCLUDE_DIR} -Wno-int-conversion -Wno-implicit-function-declaration" \
+ CFLAGS="-I${TP_INCLUDE_DIR} -Wno-int-conversion -Wno-implicit-function-declaration -fPIC" \
LDFLAGS="-L${TP_LIB_DIR}" \
./configure --prefix="${TP_INSTALL_DIR}" --with-included-ltdl --enable-static=yes --enable-shared=no
新大陆软件 秦浩
mobile: 17625988619
e-mail:qinhao@newland.com.cn