1、开源组件Impala-3.1.0、3.2.0、3.3.0版本进行编译操作。
2、Impala是交互式查询系统,内嵌了监控代理,保持原生功能,它提供SQL语义,能查询存储在Hadoop的HDFS和HBase中的PB级大数据
将源码下载后,在1000c版本环境下进行编译、适配。
Impala链接地址:
https://github.com/apache/impala/archive/refs/tags/3.1.0.tar.gz
https://github.com/apache/impala/archive/refs/tags/3.2.0.tar.gz
https://codeload.github.com/apache/impala/tar.gz/refs/tags/3.3.0
1、源码编译前安装必要的依赖
yum -y install boost-test boost-program-options libevent-devel automake libtool flex bison gcc-c++ openssl-devel make cmake glib-devel boost-devel bzip2-devel svn libevent-devel cyrus-sasl-devel wget git unzip python2-pip python-devel python java-devel
yum -y install redhat-lsb-submod-security redhat-lsb-core
2、由于cmake、gcc、maven版本过低,需要先进行编译安装对应版本
1)编译cmake
卸载cmake
yum remove cmake
下载cmake
wget https://github.com/Kitware/CMake/releases/download/v3.8.2/cmake-3.8.2.tar.gz
下载补丁包
wget https://github.com/cloudera/native-toolchain/archive/refs/heads/master.zip
拷贝进行打补丁
cp /home/native-toolchain-master/source/cmake/cmake-3.8.2-patches/0001-IMPALA-3191.patch /home/cmake-3.8.2
cd /home/cmake-3.8.2
patch -p1 < 0001-IMPALA-3191.patch
编译安装
./bootstrap
gmake -j
make install -j
添加环境变量
vim /etc/profile
export PATH=/usr/local/cmake-3.8.2/bin:$PATH
source /etc/profile
使环境变量生效
source /etc/profile
2)编译gcc
下载gcc
wget http://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.gz
执行脚本下载依赖
cd /home/gcc-4.9.2/
./contrib/download_prerequisites
编译安装
cd /home/gcc-4.9.2/
./configure --prefix=/usr/local/gcc-4.9.2 --enable-languages=c,c++,fortran --disable-multilib --with-build-config=bootstrap-debug
make -j
make install -j
添加环境变量
vim /etc/profile
export PATH=/usr/local/gcc-4.9.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/gcc-4.9.2/lib64:$LD_LIBRARY_PATH
使环境变量生效
source /etc/profile
3)编译maven
下载maven
wget https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
添加maven环境变量
mv apache-maven-3.6.3 /opt/tools/installed/
vim /etc/profile
export MAVEN_HOME=/opt/tools/installed/apache-maven-3.6.3
export PATH=$MAVEN_HOME/bin:$PATH
使环境变量生效
source /etc/profile
3、设置JDK环境变量
添加JAVA环境变量
vim /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-1.uelc20.x86_64
export PATH=$JAVA_HOME/bin:$PATH
使环境变量生效
source /etc/profile
4、安装impyla
pip install impyla
出现错误
pip install impyla
WARNING: Running pip install with root privileges is generally not a
good idea. Trypip install --user
instead.
Collecting impyla Downloading
https://files.pythonhosted.org/packages/37/8f/0eb42391ef971698585aa6d8d76546be13c4beb08b9c09fcac645d4a1034/impyla-0.16.3.tar.gz
(232kB)
100% |████████████████████████████████| 235kB 1.5MB/s
Complete output from command python setup.py egg_info:The required version of setuptools (>=3.4.4) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U setuptools'. (Currently using setuptools 0.9.8 (/usr/lib/python2.7/site-packages)) ---------------------------------------- Command "python setup.py egg_info" failed with error code 2 in /tmp/pip-build-dQnfFT/impyla/
解决方案
#python -m pip install --upgrade --force pip
WARNING: Running pip install with root privileges is generally not a
good idea. Try__main__.py install --user
instead.
Collecting pip Downloading
https://files.pythonhosted.org/packages/27/79/8a850fe3496446ff0d584327ae44e7500daf6764ca1a382d2d02789accf7/pip-20.3.4-py2.py3-none-any.whl
(1.5MB)
100% |████████████████████████████████| 1.5MB 559kB/s Installing collected packages: pip Found existing installation: pip 9.0.3
Uninstalling pip-9.0.3:
Successfully uninstalled pip-9.0.3 Successfully installed pip-20.3.4 You are using pip version 20.3.4, however version 21.1.1 is
available. You should consider upgrading via the ‘pip install
–upgrade pip’ command.
#pip install setuptools33.1.1
DEPRECATION: Python 2.7 reached the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021.
More details about Python 2 support in pip can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
pip 21.0 will remove support for this functionality.
Collecting setuptools33.1.1 Downloading
setuptools-33.1.1-py2.py3-none-any.whl (472 kB)
|████████████████████████████████| 472 kB 796 kB/s Installing collected packages: setuptools Attempting uninstall: setuptools
Found existing installation: setuptools 0.9.8
Uninstalling setuptools-0.9.8:
Successfully uninstalled setuptools-0.9.8 Successfully installed setuptools-33.1.1
#pip install impyla
DEPRECATION: Python 2.7 reached the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021.
More details about Python 2 support in pip can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
pip 21.0 will remove support for this functionality.
Collecting impyla Using cached impyla-0.16.3.tar.gz (232 kB)
Requirement already satisfied: six in /usr/lib/python2.7/site-packages
(from impyla) (1.10.0) Collecting bitarray Downloading
bitarray-2.1.0.tar.gz (71 kB)
|████████████████████████████████| 71 kB 642 kB/s Collecting thrift==0.9.3 Downloading thrift-0.9.3.tar.gz (38 kB) Using legacy
‘setup.py install’ for impyla, since package ‘wheel’ is not installed.
Using legacy ‘setup.py install’ for bitarray, since package ‘wheel’ is
not installed. Using legacy ‘setup.py install’ for thrift, since
package ‘wheel’ is not installed. Installing collected packages:
bitarray, thrift, impyla
Running setup.py install for bitarray … done
Running setup.py install for thrift … done
Running setup.py install for impyla … done Successfully installed bitarray-2.1.0 impyla-0.16.3 thrift-0.9.3
1、下载impala-3.2.0
wget https://github.com/apache/impala/archive/refs/tags/3.2.0.tar.gz
2、执行编译
cd /home/impala-3.2.0
export IMPALA_HOME=/home/impala-3.2.0
./buildall.sh -skiptests -notests -release
出现错误 Downloading and extracting toolchain dependencies.
INFO:bootstrap_virtualenv:Creating python virtualenv
INFO:bootstrap_virtualenv:Installing packages into the virtualenv
INFO:bootstrap_virtualenv:Installing stage 2 packages into the
virtualenv 2021-05-17 14:12:48,643 MainThread ERROR: The following
packages are not in their expected locations. <main.Package
object at 0x7fec6b78ee50> (expected directory
/home/impala-3.2.0/toolchain/gcc-4.9.2 to exist) Pre-built toolchain
archives not available for your platform. Clone and build native
toolchain from source using this repository:
https://github.com/cloudera/native-toolchainTraceback (most recent call last): File
“/home/impala-3.2.0/bin/bootstrap_toolchain.py”, line 471, in
bootstrap(toolchain_root, [Package(“gcc”)]) File “/home/impala-3.2.0/bin/bootstrap_toolchain.py”, line 187, in
bootstrap
check_custom_toolchain(toolchain_root, packages) File “/home/impala-3.2.0/bin/bootstrap_toolchain.py”, line 239, in
check_custom_toolchain
raise Exception(“Toolchain bootstrap failed: required packages were missing”) Exception: Toolchain bootstrap failed: required
packages were missing
解决方案:
因为在编译过程依赖下载不了导致无法编译,该报错提示在/home/impala-3.2.0/toolchain/缺少gcc-4.9.2依赖
将编译好的gcc-4.9.2拷贝到/home/impala-3.2.0/toolchain/下重新执行编译
3、执行编译
cd /home/impala-3.2.0
export IMPALA_HOME=/home/impala-3.2.0
./buildall.sh -skiptests -notests -release
出现错误 No matching distribution found for thrift (from
impyla0.14.0->-r
/home/impala-3.2.0/bin/…/infra/python/deps/compiled-requirements.txt
(line 2)) Exception information: Traceback (most recent call last):
File
“/home/impala-3.2.0/infra/python/env/lib/python2.7/site-packages/pip/basecommand.py”,
line 223, in main
status = self.run(options, args) File “/home/impala-3.2.0/infra/python/env/lib/python2.7/site-packages/pip/commands/install.py”,
line 282, in run
requirement_set.prepare_files(finder) File “/home/impala-3.2.0/infra/python/env/lib/python2.7/site-packages/pip/req/req_set.py”,
line 334, in prepare_files
functools.partial(self._prepare_file, finder)) File “/home/impala-3.2.0/infra/python/env/lib/python2.7/site-packages/pip/req/req_set.py”,
line 321, in _walk_req_to_install
more_reqs = handler(req_to_install) File “/home/impala-3.2.0/infra/python/env/lib/python2.7/site-packages/pip/req/req_set.py”,
line 461, in _prepare_file
req_to_install.populate_link(finder, self.upgrade) File “/home/impala-3.2.0/infra/python/env/lib/python2.7/site-packages/pip/req/req_install.py”,
line 249, in populate_link
self.link = finder.find_requirement(self, upgrade) File “/home/impala-3.2.0/infra/python/env/lib/python2.7/site-packages/pip/index.py”,
line 571, in find_requirement
‘No matching distribution found for %s’ % req DistributionNotFound: No matching distribution found for thrift (from
impyla0.14.0->-r
/home/impala-3.2.0/bin/…/infra/python/deps/compiled-requirements.txt
(line 2))ERROR in /home/impala-3.2.0/bin/impala-python at line 31: Generated:
/home/impala-3.2.0/logs/extra_junit_xml_logs/generate_junitxml.buildall.impala-python.20210508_03_35_22.xml
解决方案:
缺少相关依赖包///官网下载thrift 将thrift包大于0.9.0版本放入infra/python/deps/重新进行编译
4、执行编译
cd /home/impala-3.2.0
export IMPALA_HOME=/home/impala-3.2.0
./buildall.sh -skiptests -notests -release出现错误 Downloading and extracting toolchain dependencies. n/an/a
INFO:bootstrap_virtualenv:Installing compiled requirements into the
virtualenv 2021-05-17 14:23:13,497 MainThread ERROR: The following
packages are not in their expected locations. <main.Package
object at 0x7fa28046e890> (expected directory
/home/impala-3.2.0/toolchain/thrift-0.11.0-p2 to exist)
<main.Package object at 0x7fa2804dcdd0> (expected directory
/home/impala-3.2.0/toolchain/llvm-5.0.1-asserts-p1 to exist)
<main.Package object at 0x7fa2804dcc90> (expected directory
/home/impala-3.2.0/toolchain/kudu-5211897 to exist)
<main.Package object at 0x7fa2804dccd0> (expected directory
/home/impala-3.2.0/toolchain/llvm-5.0.1-p1 to exist)
<main.Package object at 0x7fa2804dcf50> (expected directory
/home/impala-3.2.0/toolchain/avro-1.7.4-p4 to exist)
<main.Package object at 0x7fa2804dcfd0> (expected directory
/home/impala-3.2.0/toolchain/binutils-2.26.1 to exist)
<main.Package object at 0x7fa2804dcd90> (expected directory
/home/impala-3.2.0/toolchain/boost-1.57.0-p3 to exist)
<main.Package object at 0x7fa2804dced0> (expected directory
/home/impala-3.2.0/toolchain/breakpad-97a98836768f8f0154f8f86e5e14c2bb7e74132e-p2
to exist) <main.Package object at 0x7fa28046e050> (expected
directory /home/impala-3.2.0/toolchain/bzip2-1.0.6-p2 to exist)
<main.Package object at 0x7fa28046e090> (expected directory
/home/impala-3.2.0/toolchain/cctz-2.2 to exist) <main.Package
object at 0x7fa28046e0d0> (expected directory
/home/impala-3.2.0/toolchain/cmake-3.8.2-p1 to exist)
<main.Package object at 0x7fa28046e110> (expected directory
/home/impala-3.2.0/toolchain/crcutil-440ba7babeff77ffad992df3a10c767f184e946e-p1
to exist) <main.Package object at 0x7fa28046e650> (expected
directory /home/impala-3.2.0/toolchain/flatbuffers-1.6.0 to exist)
<main.Package object at 0x7fa28046e5d0> (expected directory
/home/impala-3.2.0/toolchain/gdb-7.9.1-p1 to exist)
<main.Package object at 0x7fa28046e6d0> (expected directory
/home/impala-3.2.0/toolchain/gflags-2.2.0-p2 to exist)
<main.Package object at 0x7fa28046e710> (expected directory
/home/impala-3.2.0/toolchain/glog-0.3.4-p3 to exist)
<main.Package object at 0x7fa28046e750> (expected directory
/home/impala-3.2.0/toolchain/gperftools-2.5 to exist)
<main.Package object at 0x7fa28046e7d0> (expected directory
/home/impala-3.2.0/toolchain/gtest-1.6.0 to exist) <main.Package
object at 0x7fa28046e790> (expected directory
/home/impala-3.2.0/toolchain/libev-4.20 to exist) <main.Package
object at 0x7fa28046e810> (expected directory
/home/impala-3.2.0/toolchain/libunwind-1.3-rc1-p3 to exist)
<main.Package object at 0x7fa28046e350> (expected directory
/home/impala-3.2.0/toolchain/lz4-1.7.5 to exist) <main.Package
object at 0x7fa28046e310> (expected directory
/home/impala-3.2.0/toolchain/openldap-2.4.47 to exist)
<main.Package object at 0x7fa28046e390> (expected directory
/home/impala-3.2.0/toolchain/openssl-1.0.2l to exist)
<main.Package object at 0x7fa28046e3d0> (expected directory
/home/impala-3.2.0/toolchain/orc-1.4.3-p3 to exist)
<main.Package object at 0x7fa28046e290> (expected directory
/home/impala-3.2.0/toolchain/protobuf-3.5.1 to exist)
<main.Package object at 0x7fa28046e4d0> (expected directory
/home/impala-3.2.0/toolchain/rapidjson-1.1.0 to exist)
<main.Package object at 0x7fa28046e510> (expected directory
/home/impala-3.2.0/toolchain/re2-20130115-p1 to exist)
<main.Package object at 0x7fa28046e450> (expected directory
/home/impala-3.2.0/toolchain/snappy-1.1.4 to exist)
<main.Package object at 0x7fa28046e550> (expected directory
/home/impala-3.2.0/toolchain/thrift-0.9.3-p5 to exist)
<main.Package object at 0x7fa28046e590> (expected directory
/home/impala-3.2.0/toolchain/tpc-h-2.17.0 to exist)
<main.Package object at 0x7fa28046e250> (expected directory
/home/impala-3.2.0/toolchain/tpc-ds-2.1.0 to exist)
<main.Package object at 0x7fa28046e850> (expected directory
/home/impala-3.2.0/toolchain/zlib-1.2.8 to exist) Pre-built toolchain
archives not available for your platform. Clone and build native
toolchain from source using this repository:
https://github.com/cloudera/native-toolchainTraceback (most recent call last): File
“/home/impala-3.2.0/bin/bootstrap_toolchain.py”, line 485, in
bootstrap(toolchain_root, packages) File “/home/impala-3.2.0/bin/bootstrap_toolchain.py”, line 187, in
bootstrap
check_custom_toolchain(toolchain_root, packages) File “/home/impala-3.2.0/bin/bootstrap_toolchain.py”, line 239, in
check_custom_toolchain
raise Exception(“Toolchain bootstrap failed: required packages were missing”) Exception: Toolchain bootstrap failed: required
packages were missing
解决方案
跟上述gcc状况一样都是下载依赖包失败,找不到相关依赖 需要进行单独编译每一个依赖包
cmake-3.8.2上述已编译安装完成。
拷贝对应目录
cp -r /usr/local/cmake-3.8.2 /home/impala-3.2.0/toolchain/
修改命名
mv cmake-3.8.2 cmake-3.8.2-p1
下载thrift
wget https://github.com/apache/thrift/archive/refs/tags/0.11.0.tar.gz
安装补丁
cd /home/thrift-0.11.0
cp /home/native-toolchain-master/source/thrift/thrift-0.11.0-patches/* /home/thrift-0.11.0
./bootstrap.sh
configure.ac:93: installing './config.guess'
configure.ac:93: installing './config.sub'
configure.ac:27: installing './install-sh'
configure.ac:27: installing './missing'
compiler/cpp/Makefile.am: installing './depcomp'
configure.ac: installing './ylwrap'
进行编译
./configure \
--with-pic \
--prefix="/usr/local/thrift-0.11.0" \
--enable-tutorial=no \
--with-c_glib=no \
--with-php=no \
--with-java=no \
--with-perl=no \
--with-erlang=no \
--with-csharp=no \
--with-ruby=no \
--with-haskell=no \
--with-erlang=no \
--with-d=no \
--with-boost="/usr/local/boost_1_57_0" \
--with-zlib="/usr/local/zlib-1.2.8" \
--with-nodejs=no \
--with-lua=no \
--with-go=no \
--with-qt4=no \
--with-qt5=no \
--with-libevent=no \
--with-openssl="/usr/local/openssl-1.0.2l"
C++ Library: C++ compiler … : g++ -std=c++11 Build
TZlibTransport … : yes Build TNonblockingServer … : Build
TQTcpServer (Qt4) … : no Build TQTcpServer (Qt5) … : no C++
compiler version … : g++_4.9.2 (GCC) 4.9.2Python Library: Using Python … : /usr/bin/python
Using Python version … : Python 2.7.5If something is missing that you think should be present, please skim
the output of configure to find the missing component. Details are
present in config.log.
make -j
make install -j
make[3]: 离开目录“/home/thrift-0.11.0/test/py.tornado” make[2]:
离开目录“/home/thrift-0.11.0/test/py.tornado” make[2]:
进入目录“/home/thrift-0.11.0/test” make[3]: 进入目录“/home/thrift-0.11.0/test”
make[3]: 对“install-exec-am”无需做任何事。 make[3]: 对“install-data-am”无需做任何事。
make[3]: 离开目录“/home/thrift-0.11.0/test” make[2]:
离开目录“/home/thrift-0.11.0/test” make[1]: 离开目录“/home/thrift-0.11.0/test”
make[1]: 进入目录“/home/thrift-0.11.0” make[2]: 进入目录“/home/thrift-0.11.0”
make[2]: 对“install-exec-am”无需做任何事。 make[2]: 对“install-data-am”无需做任何事。
make[2]: 离开目录“/home/thrift-0.11.0” make[1]: 离开目录“/home/thrift-0.11.0”
拷贝信息
cp -r /usr/local/thrift-0.11.0 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv thrift-0.11.0 thrift-0.11.0-p2
3.3.编译安装llvm-5.0.1
下载llvm-5.0.1
cd /home
wget https://releases.llvm.org/5.0.1/llvm-5.0.1.src.tar.xz
wget https://releases.llvm.org/5.0.1/cfe-5.0.1.src.tar.xz
wget https://releases.llvm.org/5.0.1/compiler-rt-5.0.1.src.tar.xz
wget https://releases.llvm.org/5.0.1/clang-tools-extra-5.0.1.src.tar.xz
tar -xvf llvm-5.0.1.src.tar.xz
将依赖组件放入相对应目录
cd /home
tar xf cfe-5.0.1.src.tar.xz
mv cfe-5.0.1.src /home/llvm-5.0.1.src/tools/clang
tar xf clang-tools-extra-5.0.1.src.tar.xz
mv clang-tools-extra-5.0.1.src /home/llvm-5.0.1.src/tools/clang/tools/extra
tar xf compiler-rt-5.0.1.src.tar.xz
mv compiler-rt-5.0.1.src /home/llvm-5.0.1.src/tools/compiler-rt
编译release版本
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-5.0.1-p1 -DLLVM_TARGETS_TO_BUILD="AArch64" -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_TERMINFO=OFF -DPYTHON_EXECUTABLE=/usr/bin/python ..
make -j
make install -j
cd tools/clang
make install -j
编译release-asserts版本
cd /home/llvm-5.0.1.src
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-5.0.1-asserts -DLLVM_TARGETS_TO_BUILD="AArch64" -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_TERMINFO=OFF -DPYTHON_EXECUTABLE=/usr/bin/python ..
make -j
make install -j
cd tools/clang
make install -j
拷贝信息
cp -r /usr/local/llvm-5.0.1-p1 /home/impala-3.2.0/toolchain/
cp -r /usr/local/llvm-5.0.1-asserts/ /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv llvm-5.0.1-asserts llvm-5.0.1-asserts-p1
下载zlib包并解压
cd /home
wget http://zlib.net/fossils/zlib-1.2.8.tar.gz
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
进行编译
./configure --prefix=/usr/local/zlib-1.2.8
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/zlib-1.2.8 /home/impala-3.2.0/toolchain/
安装依赖
yum -y install boost boost-build boost-devel boost-thread boost-system boost-regex boost-static boost-filesystem boost-date-time
下载boost包并解压
cd /home
wget https://nchc.dl.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.tar.gz
tar -zxvf boost_1_57_0.tar.gz
cd boost_1_57_0
拷贝补丁到目录
cp /home/native-toolchain-master/source/boost/boost-1.57.0-patches/* /home/boost_1_57_0
进行编译
./bootstrap.sh --prefix=/usr/local/boost_1_57_0 --with-libraries=all --with-toolset=gcc --with-libraries=/usr/local/openssl-1.0.2l
./b2 -s"NO_BZIP2=1" --without-python install
确认版本信息
cat /usr/local/boost_1_57_0/include/boost/version.hpp
拷贝信息到toolchain
cp -r /usr/local/boost_1_57_0 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv boost_1_57_0 boost-1.57.0-p3
下载openssl包并解压
cd /home
wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_0_2l.tar.gz
tar -zxvf OpenSSL_1_0_2l.tar.gz
进行编译
./config --prefix=/usr/local/openssl-1.0.2l shared
make -j
make install -j
查看版本
cd /usr/local/openssl-1.0.2l/bin
./openssl version
拷贝信息到toolchain
cp -r /usr/local/openssl-1.0.2l /home/impala-3.2.0/toolchain/
下载thrift包并解压
cd /home
wget https://github.com/apache/thrift/archive/refs/tags/0.9.3.tar.gz
tar -zxvf 0.9.3.tar.gz
安装补丁
cd /home/thrift-0.9.3
cp /home/native-toolchain-master/source/thrift/thrift-0.9.3-patches/* /home/thrift-0.9.3
./bootstrap.sh
修改参数
vim configure
删除23899行,新增如下内容
LIBS="-L/usr/local/openssl-1.0.2l/lib -lcrypto $LIBS"
编译
./configure \
--with-pic \
--prefix="/usr/local/thrift-0.9.3" \
--enable-tutorial=no \
--with-c_glib=no \
--with-php=no \
--with-java=no \
--with-perl=no \
--with-erlang=no \
--with-csharp=no \
--with-ruby=no \
--with-haskell=no \
--with-erlang=no \
--with-d=no \
--with-boost="/usr/local/boost_1_57_0" \
--with-zlib="/usr/local/zlib-1.2.8" \
--with-nodejs=no \
--with-lua=no \
--with-go=no \
--with-qt4=no \
--with-qt5=no \
--with-libevent=no \
--with-openssl="/usr/local/openssl-1.0.2l" \
PY_PREFIX=/usr/local/thrift-0.9.3/python
make -j
make install -j
cd contrib/fb303/
./bootstrap.sh --with-boost="/usr/local/boost_1_57_0"
CPPFLAGS="-I /usr/local/thrift-0.9.3/include" ./configure --with-boost="/usr/local/boost_1_57_0" --with-java=no --with-php=no --prefix=/usr/local/thrift-0.9.3 --with-thriftpath=/usr/local/thrift-0.9.3 PY_PREFIX=/usr/local/thrift-0.9.3/python
make -j
make install
查看版本
cd /usr/local/thrift-0.9.3/bin
./thrift -version
拷贝信息到toolchain
cp -r /usr/local/thrift-0.9.3 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv thrift-0.9.3 thrift-0.9.3-p5
下载thrift包并解压
cd /home
wget https://github.com/google/snappy/archive/refs/tags/1.1.4.tar.gz
tar -zxvf 1.1.4.tar.gz
cd /home/snappy-1.1.4
进行编译
./autogen.sh
./configure --prefix=/usr/local/snappy-1.1.4
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/snappy-1.1.4 /home/impala-3.2.0/toolchain/
下载thrift包并解压
cd /home
wget https://github.com/google/re2/archive/refs/tags/2015-05-01.tar.gz
tar -zxvf 2015-05-01.tar.gz
cd re2-2015-05-01
修改编译目录
vim Makefile
修改23行
prefix=/usr/local/re2
进行编译
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/re2 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv re2 re2-20130115-p1
下载protobuf包并解压
cd /home
wget https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.5.1.tar.gz
tar -zxvf v3.5.1.tar.gz
cd protobuf-3.5.1
编译软件
./autogen.sh
./configure --prefix=/usr/local/protobuf-3.5.1
make -j
make install -j
查看版本
cd /usr/local/protobuf-3.5.1/bin
./protoc --version
拷贝信息到toolchain
cp -r /usr/local/protobuf-3.5.1 /home/impala-3.2.0/toolchain/
3.11.编译安装lz4-1.7.5
下载lz4包并解压
cd /home
wget https://github.com/lz4/lz4/archive/refs/tags/v1.7.5.tar.gz
tar -zxvf v1.7.5.tar.gz
cd lz4-1.7.5
yum install lz4-devel
编译
make -j
make install -j
拷贝信息到toolchain
cp -r /home/lz4-1.7.5 /home/impala-3.2.0/toolchain/
3.12.编译安装openldap-2.4.47
下载openldap包并解压
cd /home
wget http://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.47.tgz
tar -zxvf openldap-2.4.47.tgz
cd openldap-2.4.47
yum -y install libtool-ltdl-devel libdb libdb-devel
修改configure文件
vim configure
删除12688和5727行“-V -qversion”
15583行改为
TLS_LIBS="-L/usr/local/openssl-1.0.2l/lib -lssl -lcrypto"
编译
CPPFLAGS='-L/usr/local/openssl-1.0.2l/lib -lssl -lcrypto -I/usr/local/openssl-1.0.2l/include' ./configure --prefix=/usr/local/openldap-2.4.47 --build=arm-linux --with-tls=openssl
make depend
make -j
make install
查看版本
cd /usr/local/openldap-2.4.47/bin
./ldapadd -V
拷贝信息到toolchain
cp -r /usr/local/openldap-2.4.47 /home/impala-3.2.0/toolchain/
下载breakpad包并解压
cd /home
wget https://chromium.googlesource.com/breakpad/breakpad/+archive/97a98836768f8f0154f8f86e5e14c2bb7e74132e.tar.gz
mkdir breakpad
tar -zxvf breakpad-97a98836768f8f0154f8f86e5e14c2bb7e74132e.tar.gz -C ./breakpad
cd breakpad
打补丁
cd /home
wget git clone https://chromium.googlesource.com/linux-syscall-support
unzip linux-syscall-support.zip
mkdir -p /home/breakpad/src/third_party/lss
cp /home/linux-syscall-support/linux_syscall_support.h /home/breakpad/src/third_party/lss/
cp /home/native-toolchain-master/source/breakpad/breakpad-97a98836768f8f0154f8f86e5e14c2bb7e74132e-patches/* /home/breakpad
patch -p1 < 0001-Add-basic-support-for-dwz-dwarf-extension.patch
patch -p1 < 0002-Build-breakpad-97a98836-on-ppc64le.patch
编译
./configure --prefix=/usr/local/breakpad
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/breakpad /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv breakpad breakpad-97a98836768f8f0154f8f86e5e14c2bb7e74132e-p2
3.14.编译安装glog-0.3.4
下载glog包并解压
cd /home
wget https://github.com/google/glog/archive/v0.3.4.zip
unzip v0.3.4.zip
cd glog-0.3.4
打补丁
cp /home/native-toolchain-master/source/glog/glog-0.3.4-patches/* /home/glog-0.3.4
patch -p1 < 0001-Allow-glog-to-accept-a-message-listener.patch
patch -p1 < 0002-Preserve-custom-signal-handler-for-dcheck.patch
patch -p1 < 0003-rate-limit-calls-to-posix_fadvise.patch
编译
./configure --with-pic --prefix=/usr/local/glog-0.3.4 CFLAGS="-fPIC -DPIC" -build=arm
make -j
make install
拷贝信息到toolchain
cp -r /usr/local/glog-0.3.4 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv glog-0.3.4 glog-0.3.4-p3
3.15.编译安装avro-1.7.4
下载avro包并解压
cd /home
wget https://archive.apache.org/dist/avro/avro-1.7.4/avro-src-1.7.4.tar.gz
tar -zxvf avro-src-1.7.4.tar.gz
cd avro-src-1.7.4
打补丁
cp /home/native-toolchain-master/source/avro/avro-1.7.4-patches/* /home/avro-src-1.7.4
patch -p2 < 0001-Patch-Avro-library-to-support-schemas-with-default-v.patch
patch -p2 < 0002-Changes-to-Avro-C-library-to-allow-parsing-decimal-s.patch
patch -p2 < 0003-IMPALA-1136-Skip-u0000-characters-when-dealing-Avro-.patch
patch -p2 < 0004-AVRO-1617-Fix-equality-checking-of-record-schemas.patch
patch -p2 < 0005-Changes-to-Avro-C-library-to-allow-parsing-DATE.patch
编译
cd lang/c
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/avro-1.7.4 ..
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/avro-1.7.4 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv avro-1.7.4 avro-1.7.4-p4
下载gperftools包并解压
cd /home
wget https://github.com/gperftools/gperftools/archive/refs/tags/gperftools-2.5.tar.gz
tar -zxvf gperftools-2.5.tar.gz
cd gperftools-gperftools-2.5
编译
./autogen.sh
./configure --enable-frame-pointers --with-pic --enable-emergency-malloc -- prefix=/usr/local/gperftools-2.5
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/gperftools-2.5 /home/impala-3.2.0/toolchain/
下载gflags包并解压
cd /home
wget https://github.com/gflags/gflags/archive/refs/tags/v2.2.0.tar.gz
tar -zxvf v2.2.0.tar.gz
cd gflags-2.2.0
打补丁
cp /home/native-toolchain-master/source/gflags/gflags-2.2.0-patches/* /home/gflags-2.2.0
patch -p1 < 0001-Allow-hidden-flags-e.g.-DEFINE_int32_hidden.patch
patch -p1 < 0002-Add-show_hidden-parameter-in-GetAllFlags-function.patch
编译
mkdir build
cd build
cmake -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local/gflags-2.2.0 -DCMAKE_BUILD_TYPE=RELEASE ..
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/gflags-2.2.0 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv gflags-2.2.0 gflags-2.2.0-p2
下载binutils包并解压
cd /home
wget https://ftp.gnu.org/gnu/binutils/binutils-2.26.1.tar.gz
tar -zxvf binutils-2.26.1.tar.gz
cd binutils-2.26.1
编译
./configure --enable-gold --enable-plugins --disable-x86-relax-relocations --prefix=/usr/local/binutils-2.26.1
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/binutils-2.26.1 /home/impala-3.2.0/toolchain/
3.19.编译安装flatbuffers-1.6.0
下载flatbuffers包并解压
cd /home
wget https://github.com/google/flatbuffers/archive/refs/tags/v1.6.0.tar.gz
tar -zxvf v1.6.0.tar.gz
cd flatbuffers-1.6.0
编译
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local/flatbuffers-1.6.0 ..
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/flatbuffers-1.6.0 /home/impala-3.2.0/toolchain/
下载bzip包并解压
cd /home
wget wget https://sourceware.org/pub/bzip2/bzip2-1.0.6.tar.gz
tar -zxvf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
打补丁
cp /home/native-toolchain-master/source/bzip2/bzip2-1.0.6-patches/* /home/bzip2-1.0.6
patch -p1 < 001-adjust-makefile-to-env-variables.diff
patch -p2 < 002-directoryless-executable-symlinks.diff
编译
CFLAGS="-fPIC -DPIC" CXXFLAGS="$CXXFLAGS -fPIC -DPIC" make install PREFIX=/usr/local/bzip2-1.0.6
拷贝信息到toolchain
cp -r /usr/local/bzip2-1.0.6 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv bzip2-1.0.6 bzip2-1.0.6-p2
下载crcutil包并解压
cd /home
wget http://d3dr9sfxru4sde.cloudfront.net/crcutil-440ba7babeff77ffad992df3a10c767f184e946e.tar.gz
tar -zxvf crcutil-440ba7babeff77ffad992df3a10c767f184e946e.tar.gz
cd crcutil-440ba7babeff77ffad992df3a10c767f184e946e
打补丁
cp /home/native-toolchain-master/source/crcutil/crcutil-440ba7babeff77ffad992df3a10c767f184e946e-patches/* /home/crcutil-440ba7babeff77ffad992df3a10c767f184e946e
patch -p1 < 0001-Build-crcutil-440ba7b-on-ppc64le.patch
patch -p1 < 0002-Build-crcutil-440ba7b-on-aarch64.patch
编译
./autogen.sh
./configure --with-pic --prefix=/usr/local/crcutil-440ba7babeff77ffad992df3a10c767f184e946e
make -j
make install
拷贝信息到toolchain
cp -r /usr/local/crcutil-440ba7babeff77ffad992df3a10c767f184e946e /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv crcutil-440ba7babeff77ffad992df3a10c767f184e946e crcutil-440ba7babeff77ffad992df3a10c767f184e946e-p1
下载cctz包并解压
cd /home
wget https://github.com/google/cctz/archive/refs/tags/v2.2.tar.gz
tar -zxvf v2.2.tar.gz
cd cctz-2.2
修改Makefile文件
vim Makefile
修改35行内容
PREFIX ?= /usr/local/cctz-2.2
编译
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/cctz-2.2 /home/impala-3.2.0/toolchain/
下载gdb包并解压
cd /home
wget http://ftp.gnu.org/gnu/gdb/gdb-7.9.1.tar.gz
tar -zxvf gdb-7.9.1.tar.gz
cd gdb-7.9.1
打补丁
cp /home/native-toolchain-master/source/gdb/gdb-7.9.1-patches/* /home/gdb-7.9.1
patch -p1 < 0001-Based-on-https-sourceware.org-ml-gdb-patches-2016-08.patch
编译安装依赖包termcap
cd /home
wget wget https://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
tar -zxvf termcap-1.3.1.tar.gz
cd termcap-1.3.1/
./configure --prefix=/usr/local/termcap-1.3.1 --build=arm-linux
make -j
make install -j
编译
cd /home/gdb-7.9.1
./configure --prefix=/usr/local/gdb-7.9.1
make -j
make install -j
查看版本
cd /usr/local/gdb-7.9.1/bin
./gdb --version
拷贝信息到toolchain
cp -r /usr/local/gdb-7.9.1 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv gdb-7.9.1 gdb-7.9.1-p1
下载gtest包并解压
cd /home
wget https://codeload.github.com/google/googletest/zip/release-1.6.0
mv release-1.6.0 gtest-1.6.0.zip
unzip gtest-1.6.0.zip
cd googletest-release-1.6.0
编译
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/gtest-1.6.0 ..
make -j
拷贝信息到toolchain
mkdir -p /home/impala-3.2.0/toolchain/gtest-1.6.0
mkdir -p /home/impala-3.2.0/toolchain/gtest-1.6.0/lib
cp -r /home/googletest-release-1.6.0/include/ /home/impala-3.2.0/toolchain/gtest-1.6.0
cp /home/googletest-release-1.6.0/build/*.a /home/impala-3.2.0/toolchain/gtest-1.6.0/lib
cp -arf /home/googletest-release-1.6.0/* /home/impala-3.2.0/toolchain/gtest-1.6.0
下载libev包并解压
cd /home
wget https://src.fedoraproject.org/lookaside/pkgs/libev/libev-4.20.tar.gz/1cac539cfc560f381a490c9fba940de9/libev-4.20.tar.gz
tar -zxvf libev-4.20.tar.gz
cd libev-4.20
编译
./configure --prefix=/usr/local/libev-4.20
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/libev-4.20 /home/impala-3.2.0/toolchain/
3.26.编译安装libunwind-1.3-rc1
下载libunwind包并解压
cd /home
wget https://github.com/libunwind/libunwind/archive/refs/tags/v1.3-rc1.zip
unzip v1.3-rc1.zip
cd libunwind-1.3-rc1
编译
./autogen.sh
./configure --prefix=/usr/local/libunwind-1.3-rc1
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/libunwind-1.3-rc1 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv libunwind-1.3-rc1 libunwind-1.3-rc1-p3
下载orc包并解压
cd /home
wget https://github.com/apache/orc/archive/refs/tags/rel/release-1.5.5.zip
unzip release-1.5.5.zip
cd orc-rel-release-1.5.5
打补丁
cp /home/native-toolchain-master/source/orc/orc-1.5.5-patches/* /home/orc-rel-release-1.5.5
patch -p1 < 0001-ORC-396-also-look-for-LZ4-libs-in-lib64-subdir.patch
编译
mkdir build
cd build
cmake .. -DBUILD_JAVA=OFF -DCMAKE_INSTALL_PREFIX=/home/impala-3.2.0/toolchain/orc-1.4.3-p3
make -j
make install -j
下载doxygen包并解压
cd /home
wget https://codeload.github.com/doxygen/doxygen/tar.gz/Release_1_8_16
tar -zxvf Release_1_8_16
cd doxygen-Release_1_8_16
编译
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local/doxygen-1.8.16 ..
make -j
make install -j
配置环境变量
vim /etc/profile
最后新增如下内容
export PATH=/usr/local/doxygen-1.8.16/bin:$PATH
source /etc/profile
查看版本
doxygen --version
下载rapidjson包并解压
cd /home
wget https://github.com/Tencent/rapidjson/archive/refs/tags/v1.1.0.tar.gz
tar -zxvf v1.1.0.tar.gz
cd rapidjson-1.1.0
编译
git init
git submodule update --init
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/rapidjson-1.1.0
vim /home/rapidjson-1.1.0/CMakeLists.txt
修改53和76行内容
-march=native 改为 -march=armv8-a+crc
make -j
make install -j
拷贝信息到toolchain
cp -r /usr/local/rapidjson-1.1.0 /home/impala-3.2.0/toolchain/
下载tpc-h包并解压
cd /home
git clone https://github.com/gregrahn/tpch-kit.git
cd tpch-kit
编译
cd dbgen
make MACHINE=LINUX DATABASE=POSTGRESQL
拷贝信息到toolchain
mkdir -p /home/impala-3.2.0/toolchain/tpc-h-2.17.0
下载tpc-ds包并解压
cd /home
wget https://github.com/RunningJon/TPC-DS/archive/refs/heads/2.1.0.zip
unzip 2.1.0.zip
cd TPC-DS-2.1.0
编译
cd 00_compile_tpcds/tools
make
拷贝信息到toolchain
mkdir -p /home/impala-3.2.0/toolchain/tpc-ds-2.1.0/
cp /home/TPC-DS-2.1.0/00_compile_tpcds/tools/ds* /home/impala-3.2.0/toolchain/tpc-ds-2.1.0/
kudu编译很麻烦所以直接下载编译好的拷贝信息到kudu-5211897
wget https://native-toolchain.s3.amazonaws.com/build/cdh_components/1173663/tarballs/kudu-1.10.0-cdh6.x-SNAPSHOT-redhat7.tar.gz
tar -zxvf kudu-1.10.0-cdh6.x-SNAPSHOT-redhat7.tar.gz
cp -r kudu-1.10.0 /home/impala-3.2.0/toolchain/
cd /home/impala-3.2.0/toolchain/
mv kudu-1.10.0 kudu-5211897
1、执行编译
cd /home/impala-3.2.0
export IMPALA_HOME=/home/impala-3.2.0
./buildall.sh -skiptests -notests -release
出现错误 make[3]: *** [be/build/debug/service/impalad] Error 1 make[2]:
*** [be/src/service/CMakeFiles/impalad.dir/all] Error 2 make[1]: *** [be/src/service/CMakeFiles/impalad.dir/rule] Error 2 make: ***
[impalad] Error 2
解决方案 这个可以归于impala的一个bug,原因是调用了glog-0.3.4 中的logging.h头文件
然后本地os层面也安装了glog-0.3.4出现的报错
- 移除 os 层面安装的 glog 的头文件. 以及对应lib.
- 将 /home/impala-3.2.0/toolchain/glog-0.3.4-p3/include/glog copy 到/usr/local/include 下面
/home/impala-3.2.0/toolchain/glog-0.3.4-p3/lib/* copy 到 /usr/local/lib 下面.
2、执行编译
cd /home/impala-3.2.0
export IMPALA_HOME=/home/impala-3.2.0
./buildall.sh -skiptests -notests -release
解决方案:修改错误的仓库地址
vim /home/impala-3.2.0/impala-parent/pom.xml
修改121、132行内容
<url>https://repository.cloudera.com/content/repositories/third-party</url>
改为
<url>https://repository.cloudera.com/artifactory/public/</url>
3、执行编译
cd /home/impala-3.2.0
export IMPALA_HOME=/home/impala-3.2.0
./buildall.sh -skiptests -notests -release
修改文件
mkdir -p /home/impala-3.2.0/toolchain/thrift-0.9.3-p5/python/lib64/python2.7/site-packages
cp -r /usr/lib64/python2.7/site-packages/thrift /home/impala-3.2.0/toolchain/thrift-0.9.3-p5/python/lib64/python2.7/site-packages
4、执行编译
export IMPALA_HOME=/home/impala-3.2.0
./buildall.sh -skiptests -notests -release
编译完成后,编译debug
export IMPALA_HOME=/home/impala-3.2.0
./buildall.sh -v
1、创建脚本,生成服务路径
#!/bin/bash
IMPALA_HOME=/home/impala-3.2.0
IMPALA_BUILD=/home/impala-build
#if exist the dest directory then clear it.
if [ -d "${IMPALA_BUILD}" ]; then
rm -rf ${IMPALA_BUILD}/*
else
mkdir -p ${IMPALA_BUILD}
fi
mkdir -p ${IMPALA_BUILD}/etc/default/
mkdir -p ${IMPALA_BUILD}/etc/hadoop/
mkdir -p ${IMPALA_BUILD}/be
mkdir -p ${IMPALA_BUILD}/lib64/
mkdir ${IMPALA_BUILD}/hadoop/
mkdir ${IMPALA_BUILD}/dependency/
mkdir ${IMPALA_BUILD}/shell
cp -rf ${IMPALA_HOME}/be/build/debug/* ${IMPALA_BUILD}/be/
cp -rf ${IMPALA_HOME}/toolchain/gcc-4.9.2/lib64/* ${IMPALA_BUILD}/lib64/
cp -rf ${IMPALA_HOME}/fe/target/impala-frontend-0.1-SNAPSHOT.jar ${IMPALA_BUILD}/dependency/
cp -rf ${IMPALA_HOME}/fe/target/dependency/* ${IMPALA_BUILD}/dependency/
cp -rf ${IMPALA_HOME}/shell/build/impala-shell-3.2.0-SNAPSHOT/* ${IMPALA_BUILD}/shell
cp -r ${IMPALA_HOME}/www ${IMPALA_BUILD}/
echo "Finished"
依赖版本大致一样,根据上述编译后的依赖打包,放入所需要编译的impala版本进行验证。
impala-3.3.0的cmake版本为3.14.3
wget https://github.com/Kitware/CMake/releases/download/v3.14.3/cmake-3.14.3.tar.gz
tar -zxvf cmake-3.14.3.tar.gz
cd cmake-3.14.3
./bootstrap
./configure --prefix=/usr/local/cmake-3.14.3
make -j
make install
/usr/local/cmake-3.14.3替换到impala-3.3.0/toolchain/cmake-3.14.3目录
下载Impala-3.3.0
cd /home/
wget https://codeload.github.com/apache/impala/tar.gz/refs/tags/3.3.0
tar -zxvf 3.3.0
cd /home/impala-3.3.0/
按照以上步骤来搭建3.3.0,修改地方如下:
cp toolchain-3.3.0.tar.gz /home/impala-3.3.0/
cd /home/impala-3.3.0/
rm -rf toolchain
tar -zxvf toolchain-3.3.0.tar.gz
将toolchain中的cmake拷贝/usr/local/下
cd /home/impala-3.3.0/toolchain/
cp -r cmake-3.14.3 /usr/local
vim /etc/profile
export PATH=/usr/local/cmake-3.14.3/bin:$PATH
source /etc/profile
cmake --version #确认版本正确
下载Impala-3.1.0
cd /home/
wget https://github.com/apache/impala/archive/refs/tags/3.1.0.tar.gz
tar -zxvf 3.1.0.tar.gz
cd /home/impala-3.1.0/
按照以上步骤来搭建3.3.0,修改地方如下:
cp toolchain-3.1.0.tar.gz /home/impala-3.1.0/
cd /home/impala-3.1.0/
rm -rf toolchain
tar -zxvf toolchain-3.1.0.tar.gz
将toolchain中的cmake拷贝/usr/local/下
cd /home/impala-3.1.0/toolchain/
cp -r cmake-3.8.2-p1 /usr/local
cd /usr/local/
mv cmake-3.8.2-p1 cmake-3.8.2
vim /etc/profile
export PATH=/usr/local/cmake-3.8.2/bin:$PATH
source /etc/profile
cmake --version #确认版本正确
编译impala的过程,出现的错误刚开始是环境依赖项的问题,安装完所需要的依赖后编译,出现缺 少包、对应的组件源码包未能下载,然后找相对应的包进行编译的过程消耗了大量时间,解决报错的过程存在的问题是不能很快去找到问题的原因,从而不能及时处理问题但最后都相应的解决了各个错误问题编译成功,然后编译完成后会进行对应依赖组件的测试,测试过程出现maven库的环境问题导致整体的测试无法通过,无法清除缓存然后进行进一步的重新编译,因为提前把所需要的依赖都编译好了,重新编译的时候很快,出现的仓库问题也相应的解决.