cmake 版本 arm_在 ARM 架构服务器上编译 Greenplum6并制作rpm安装包

Greenplum 是一款开源MPP数据分析平台,提供包括数据分析、机器学习和人工智能等特色功能。目前 Greenplum 的二进制发行版本只能运行在 X86 服务器。github上的Greenplum releases只有x86的发行版,没有提供ARM 发行版。Greenplum 是开源软件,我们可以通过编译 Greenplum 源代码自行构建 Greenplum 的 ARM 版本。

本文将详细讲述如何在 ARM 服务器上编译并打包开源版 Greenplum。

编译环境:CentOS Linux release 7.6.1810 (AltArch)

需要提前准备OS镜像、python依赖包、cmake、zstd-dev、Xerces、re2c、ninja、gporca等源码包配置编译环境,另外Greenplum编译需要Greenplum源码包。

  • setuptools https://pypi.org/project/setuptools/33.1.1/#files
  • psutil-5.7.2 https://pypi.org/project/psutil/#files
  • pbr-5.4.5 https://pypi.org/project/pbr/#files
  • lockfile-0.12.2 https://pypi.org/project/lockfile/#files
  • pycparser-2.20 https://pypi.org/project/pycparser/#files
  • cffi-1.14.1 https://pypi.org/project/cffi/#files
  • bcrypt-3.1.7 https://pypi.org/project/bcrypt/#files
  • six-1.15.0 https://pypi.org/project/six/#files
  • PyNaCl-1.4.0 https://pypi.org/project/PyNaCl/#files
  • cryptography-3.0 https://pypi.org/project/cryptography/#files
  • ipaddress-1.0.23 https://pypi.org/project/ipaddress/#files
  • enum34-1.1.10 https://pypi.org/project/enum34/#files
  • paramiko-2.7.1 https://pypi.org/project/paramiko/#files
  • epydoc-3.0.1 https://pypi.org/project/epydoc/#files
  • cmake-3.9.2 https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz
  • zstd-dev-1.4.5 https://github.com/facebook/zstd
  • Xerces-3.1.2-p1 https://github.com/greenplum-db/gp-xerces
  • re2c-2.0 https://github.com/skvadrik/re2c
  • ninja-1.10.0 https://github.com/ninja-build/ninja
  • gporca-3.106.1 https://github.com/greenplum-db/gporca/tree/v3.65.3
  • Greenplum-6.9.1 https://github.com/greenplum-db/gpdb/releases/download/6.9.1/6.9.1-src-full.tar.gz

下载并上传如下软件包到服务器上:

bcrypt-3.1.7.tar.gz

cffi-1.14.1.tar.gz

cryptography-3.0.tar.gz

enum34-1.1.10.tar.gz

epydoc-3.0.1.zip

gporca-3.106.1.tar.gz

gp-xerces-3.1.2-p1.tar.gz

greenplum-6.9.1-src-full.tar.gz

ipaddress-1.0.23.tar.gz

lockfile-0.12.2.tar.gz

ninja-1.10.0.tar.gz

paramiko-2.7.1.tar.gz

pbr-5.4.5.tar.gz

psutil-5.7.2.tar.gz

pycparser-2.20.tar.gz

PyNaCl-1.4.0.tar.gz

re2c-2.0.tar.gz

setuptools-33.1.1.zip

six-1.15.0.tar.gz

zstd-1.4.5.tar.gz

安装依赖包。

#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

安装python依赖包:

安装setuptools

#cd setuptools-master

#python bootstrap.py

#python setup.py install

安装psutil

#cd psutil-5.7.2

#python setup.py install

安装pbr

#cd pbr-5.4.5

#python setup.py install

安装lockfile

#cd lockfile-0.12.2

#python setup.py install

安装pycparser

#cd pycparser-2.20

#python setup.py install

安装cffi

#cd cffi-1.14.1

#python setup.py install

安装six

#cd six-1.15.0

#python setup.py install

安装bcrypt

#cd bcrypt-3.1.7

#python setup.py install

安装PyNaCl

#cd PyNaCl-1.4.0

#python setup.py install

安装ipaddress

#cd ipaddress-1.0.23

#python setup.py install

安装enum34

#cd enum34-1.1.10

#python setup.py install

安装cryptography

#cd cryptography-3.0

#python setup.py install

安装paramiko

#cd paramiko-2.7.1

#python setup.py install

安装epydoc

#cd epydoc-3.0.1

#python setup.py install

安装cmake

#cd cmake-3.9.2

#./bootstrap

#make

#make install

#/usr/local/bin/cmake --version

31728ac004c4b64a4a62606c4379b551.png

cmake version

安装zstd

#cd zstd-1.4.5

#make

#make install

安装Xerces

# cd gp-xerces-3.1.2-p1

#./configure

#make

#make install

安装re2c

# cd re2c-2.0

#./autogen.sh

#./configure

#make

#make install

安装ninja

#cd ninja-1.10.0

#./configure.py --bootstrap

#cp ninja /usr/bin/

安装gporca

# cd gporca-3.106.1

#cmake -GNinja -H. -Bbuild

#vi libgpos/src/common/CStackDescriptor.cpp

第167行注释掉

0333a7235706cfe37185de91365bc204.png

backtrace

#ninja install -C build

#echo /usr/local/lib >/etc/ld.so.conf

#ldconfig

编译greenplum6.9.1

准备完成后可以编译greenplum6.9.1了

# cd gpdb_src/

#./configure --with-perl --with-python --with-libxml --prefix=/usr/local/gpdb

#make

531ea3b47e530ac6435d4524c36ba622.png

greenplum make

如果make成功了,就可以开始制作rpm安装包了。

安装rpm-build

yum install rpm-build

在/root目录下建rpmbuild目录

mkdir -p ~/rpmbuild/BUILD ~/rpmbuild/RPMS ~/rpmbuild/BUILDROOT ~/rpmbuild/SRPMS ~/rpmbuild/SOURCES ~/rpmbuild/SPECS

编辑greenplum6.9.1.spec

vi ~/rpmbuild/SPECS/greenplum6.9.1.spec

7e15a35361106fd7e5e474e40349ed51.png

gp spec

修改greenplum源代码目录名为greenplum-6.9.1并压缩:

mv gpdb_src greenplum-6.9.1

tar czvf greenplum-6.9.1.tar.gz greenplum-6.9.1

把greenplum源码包复制到rpmbuild源代码目录

cp greenplum-6.9.1.tar.gz ~/rpmbuild/SOURCES/

制作rpm安装包:

rpmbuild -ba ~/rpmbuild/SPECS/greenplum6.9.1.spec

0b871a04e1dfd66e99808fc20724f471.png

rpmbuild完成

查看制作好的rpm安装包:

f082b94dff0119ec7041e300213c8727.png

rpmfile

完。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
opencv2.4.4移植到ARM 一、编译环境及库文件 linux环境:ubuntu 11.10 交叉编译:4.6.1 opencv: opencv-2.4.4 cmake: cmake-2.8.1-Linux-i386.tar.gz 二、opencv-2.4.4的移植过程 解压cmake-2.8.1-Linux-i386.tar.gz到/usr/local/ cmake-2.8.1 #export PATH= /usr/local/ cmake-2.8.1/bin:$PATH 用到的主要目录说明: 交叉编译工具链所在目录 /usr/local/arm-4.6.1/ 安装opencv的目录 /usr/local/ opencv源码所在目录 /usr/local /opencv-2.4.4 编译好的opencv库所在目录 /usr/local /opencv-2.4.4/build 默认安装目录为/usr/local #mkdir build #cd build #cmake-gui 选择源代码目录 /usr/local /opencv-2.4.4 选择Build目录 /usr/local /opencv-2.4.4/build 点击Configure,保持generator为Unix Makefiles,选择Specify options for cross-compiling,点击Next, Operating System填写arm-linux C Compilers填写/usr/local/arm-4.6.1//bin/arm-none-linux-gnueabi-gcc C++ Compilers填写/usr/local/arm-4.6.1//bin/ arm-none-linux-gnueabi -g++ 程序库的Target Root填写/usr/local/arm-4.6.1/ 然后点击Finish,开始configure 点击Generate生成Makefile(等configure完之后按钮才能点击) #make 错误一: Linking CXX executable ../../bin/opencv_createsamples ../../lib/libopencv_core.so: undefined reference to `clock_gettime' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFerrorHandler' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFrealloc' ../../lib/libopencv_core.so: undefined reference to `pthread_key_create 解决方法: 修改CMakeCache.txt,CMAKE_EXE_LINKER_FLAGS原来为空,加上-lpthread -lrt,重新编译,错误消除 错误二: Linking CXX executable ../../bin/opencv_createsamples ../../lib/libopencv_highgui.so: undefined reference to `_TIFFerrorHandler' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFrealloc' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFmalloc' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFmemcpy' ../../lib/libopencv_highgui.so: undefined reference to `TIFFOpen' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFfree' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFwarningHandler' ../../lib/libopencv_highgui.so: undefined reference to `_TIFFmemcmp' ../../lib/libopencv_high
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值