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



&nbsp;




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "dev"                                                                                    <qinhao@newland.com.cn&gt;;
发送时间:&nbsp;2023年6月7日(星期三) 下午4:29
收件人:&nbsp;"dev"<dev@doris.apache.org&gt;;

主题:&nbsp;关于编译第三方库



各位好,

我尝试在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
&nbsp;&nbsp;&nbsp;&nbsp; if [[ "$(uname -s)" == 'Darwin' ]]; then
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DORIS_TOOLCHAIN=clang
&nbsp;&nbsp;&nbsp;&nbsp; else
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DORIS_TOOLCHAIN=clang
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DORIS_TOOLCHAIN=gcc
&nbsp;&nbsp;&nbsp;&nbsp; fi
&nbsp;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() {
&nbsp;&nbsp;&nbsp;&nbsp; check_if_source_exist "${OPENSSL_SOURCE}"
&nbsp;&nbsp;&nbsp;&nbsp; cd "${TP_SOURCE_DIR}/${OPENSSL_SOURCE}"

-&nbsp;&nbsp;&nbsp; CPPFLAGS="-I${TP_INCLUDE_DIR}" \
+&nbsp;&nbsp;&nbsp; CPPFLAGS="-I${TP_INCLUDE_DIR} -fPIC" \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXXFLAGS="-I${TP_INCLUDE_DIR}" \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LDFLAGS="-L${TP_LIB_DIR}" \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LIBDIR="lib" \
@@ -898,7 +898,7 @@ build_libunixodbc() {

&nbsp;&nbsp;&nbsp;&nbsp; cd "${TP_SOURCE_DIR}/${ODBC_SOURCE}"

-&nbsp;&nbsp;&nbsp; CFLAGS="-I${TP_INCLUDE_DIR} -Wno-int-conversion -Wno-implicit-function-declaration" \
+&nbsp;&nbsp;&nbsp; CFLAGS="-I${TP_INCLUDE_DIR} -Wno-int-conversion -Wno-implicit-function-declaration -fPIC" \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LDFLAGS="-L${TP_LIB_DIR}" \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ./configure --prefix="${TP_INSTALL_DIR}" --with-included-ltdl --enable-static=yes --enable-shared=no





新大陆软件 秦浩
mobile: 17625988619
e-mail:qinhao@newland.com.cn