Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build thirdparty may be failed #5187

Merged
merged 2 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,9 @@ option(WITH_MYSQL "Support access MySQL" ON)

# Check gcc
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.2")
message(FATAL_ERROR "Need GCC version at least 4.8.2")
endif()

if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "7.3.0")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.3.0")
message(FATAL_ERROR "Need GCC version at least 7.3.0")
message(STATUS "GCC version is greater than 7.3.0, disable -Werror. Be careful with compile warnings.")
else()
# -Werror: compile warnings should be errors when using the toolchain compiler.
set(CXX_GCC_FLAGS "${CXX_GCC_FLAGS} -Werror")
endif()
elseif (NOT APPLE)
message(FATAL_ERROR "Compiler should be GNU")
Expand Down
1 change: 1 addition & 0 deletions be/src/common/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "common/daemon.h"

#include <signal.h>
#include <gflags/gflags.h>
#include <gperftools/malloc_extension.h>

Expand Down
6 changes: 0 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,6 @@ if [ ${BUILD_BE} -eq 1 ] ; then
fi
mkdir -p ${CMAKE_BUILD_DIR}
cd ${CMAKE_BUILD_DIR}
GENERATOR="Unix Makefiles"
BUILD_SYSTEM="make"
if ninja --version 2>/dev/null; then
GENERATOR="Ninja"
BUILD_SYSTEM="ninja"
fi
${CMAKE_CMD} -G "${GENERATOR}" -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DMAKE_TEST=OFF -DWITH_MYSQL=${WITH_MYSQL} -DWITH_LZO=${WITH_LZO} ../
${BUILD_SYSTEM} -j${PARALLEL}
${BUILD_SYSTEM} install
Expand Down
4 changes: 2 additions & 2 deletions docs/en/installing/compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ You can try to compile Doris directly in your own Linux environment.

1. System Dependence

`GCC 5.3.1+, Oracle JDK 1.8+, Python 2.7+, Apache Maven 3.5+, CMake 3.11+`
`GCC 7.3+, Oracle JDK 1.8+, Python 2.7+, Apache Maven 3.5+, CMake 3.11+ Bison 3.0+`

If you are using Ubuntu 16.04 or newer, you can use the following command to install the dependencies

`sudo apt-get install build-essential openjdk-8-jdk maven cmake byacc flex automake libtool-bin bison binutils-dev libiberty-dev zip unzip libncurses5-dev curl git ninja-build python`

If you are using CentOS you can use the following command to install the dependencies

`sudo yum groupinstall 'Development Tools' && sudo yum install maven cmake byacc flex automake libtool bison binutils-devel zip unzip ncurses-devel curl git wget python2 glibc-static libstdc++-static`
`sudo yum groupinstall 'Development Tools' && sudo yum install maven cmake byacc flex automake libtool bison binutils-devel zip unzip ncurses-devel curl git wget python2 glibc-static libstdc++-static java-1.8.0-openjdk`

After installation, set environment variables `PATH`, `JAVA_HOME`, etc.

Expand Down
6 changes: 4 additions & 2 deletions docs/zh-CN/installing/compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ under the License.

1. 系统依赖

`GCC 5.3.1+, Oracle JDK 1.8+, Python 2.7+, Apache Maven 3.5+, CMake 3.11+`
`GCC 7.3+, Oracle JDK 1.8+, Python 2.7+, Apache Maven 3.5+, CMake 3.11+ Bison 3.0+`

如果使用Ubuntu 16.04 及以上系统 可以执行以下命令来安装依赖

`sudo apt-get install build-essential openjdk-8-jdk maven cmake byacc flex automake libtool-bin bison binutils-dev libiberty-dev zip unzip libncurses5-dev curl git ninja-build python`

如果是CentOS 可以执行以下命令
`sudo yum groupinstall 'Development Tools' && sudo yum install maven cmake byacc flex automake libtool bison binutils-devel zip unzip ncurses-devel curl git wget python2 glibc-static libstdc++-static`

`sudo yum groupinstall 'Development Tools' && sudo yum install maven cmake byacc flex automake libtool bison binutils-devel zip unzip ncurses-devel curl git wget python2 glibc-static libstdc++-static java-1.8.0-openjdk`

安装完成后,自行设置环境变量 `PATH`, `JAVA_HOME` 等。

Expand Down
11 changes: 10 additions & 1 deletion env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if [[ -z ${DORIS_GCC_HOME} ]]; then
fi

gcc_ver=`${DORIS_GCC_HOME}/bin/gcc -dumpfullversion -dumpversion`
required_ver="5.3.1"
required_ver="7.3.0"
if [[ ! "$(printf '%s\n' "$required_ver" "$gcc_ver" | sort -V | head -n1)" = "$required_ver" ]]; then
echo "Error: GCC version (${gcc_ver}) must be greater than or equal to ${required_ver}"
exit 1
Expand Down Expand Up @@ -100,3 +100,12 @@ if ! ${CMAKE_CMD} --version; then
exit 1
fi
export CMAKE_CMD

GENERATOR="Unix Makefiles"
BUILD_SYSTEM="make"
if ninja --version 2>/dev/null; then
GENERATOR="Ninja"
BUILD_SYSTEM="ninja"
fi
export GENERATOR
export BUILD_SYSTEM
7 changes: 0 additions & 7 deletions run-be-ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ if [ ! -d ${CMAKE_BUILD_DIR} ]; then
fi

cd ${CMAKE_BUILD_DIR}
GENERATOR="Unix Makefiles"
BUILD_SYSTEM="make"
if ninja --version 2>/dev/null; then
GENERATOR="Ninja"
BUILD_SYSTEM="ninja"
fi

${CMAKE_CMD} -G "${GENERATOR}" ../ -DWITH_MYSQL=OFF -DMAKE_TEST=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
${BUILD_SYSTEM} -j${PARALLEL}

Expand Down
Loading