7 Star 38 Fork 7

Gitee 极速下载/ChubaoFS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/chubaofs/chubaofs
克隆/下载
build.sh 2.56 KB
一键复制 编辑 原始数据 按行查看 历史
slasher 提交于 2023-11-30 10:44 . chore(docs): fix some typo
#!/bin/bash
RootPath=$(cd $(dirname $0); pwd)
build_linux_x86_64() {
make
}
# build arm64 with amd64 docker ubuntu:focal, apt-get install -y gcc-9-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-9-aarch64-linux-gnu g++-aarch64-linux-gnu
# Support Ubuntu focal, not support CentOS7
build_linux_arm64_gcc9() {
echo "build linux arm64 gcc9"
get_rocksdb_compress_dep
export PORTABLE=1
export ARCH=arm64
# export CC=aarch64-linux-gnu-gcc
export EXTRA_CFLAGS="-Wno-error=deprecated-copy -fno-strict-aliasing -Wclass-memaccess -Wno-error=class-memaccess -Wpessimizing-move -Wno-error=pessimizing-move"
export EXTRA_CXXFLAGS=$EXTRA_CFLAGS
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 make
}
# build arm64 with amd64 docker buntu:xenial , apt-get install -y gcc-4.9-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-4.9-aarch64-linux-gnu g++-aarch64-linux-gnu
# support CentOS7
#
build_linux_arm64_gcc4() {
echo "build linux arm64 gcc4.9"
get_rocksdb_compress_dep
export PORTABLE=1
export ARCH=arm64
# export CC=aarch64-linux-gnu-gcc
export EXTRA_CFLAGS=" -fno-strict-aliasing "
export EXTRA_CXXFLAGS=$EXTRA_CFLAGS
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 make
}
# wget compress dep
get_rocksdb_compress_dep() {
#################################################################
## Might check the dep files each in individual if wget failed ##
#################################################################
if [ ! -d "${RootPath}/vendor/dep" ]; then
mkdir -p ${RootPath}/vendor/dep
fi
cd ${RootPath}/vendor/dep
if [ ! -d "${RootPath}/vendor/dep/zlib-1.2.11" ]; then
wget https://zlib.net/fossils/zlib-1.2.11.tar.gz
tar zxf zlib-1.2.11.tar.gz
fi
if [ ! -d "${RootPath}/vendor/dep/bzip2-1.0.6" ]; then
wget https://sourceforge.net/projects/bzip2/files/bzip2-1.0.6.tar.gz
tar zxf bzip2-1.0.6.tar.gz
fi
if [ ! -d "${RootPath}/vendor/dep/zstd-1.4.8" ]; then
wget https://codeload.github.com/facebook/zstd/zip/v1.4.8
unzip v1.4.8
fi
if [ ! -d "${RootPath}/vendor/dep/lz4-1.9.3" ]; then
wget https://codeload.github.com/lz4/lz4/tar.gz/v1.9.3
tar zxf v1.9.3
fi
#rm -rf zlib-1.2.11.tar.gz bzip2-1.0.6.tar.gz v1.4.8 v1.9.3
cd ${RootPath}
}
CPUTYPE=${CPUTYPE} | tr 'A-Z' 'a-z'
echo ${CPUTYPE}
case ${CPUTYPE} in
"arm64_gcc9")
build_linux_arm64_gcc9
;;
"arm64_gcc4")
build_linux_arm64_gcc4
;;
"arm64")
build_linux_arm64_gcc4
;;
*)
build_linux_x86_64
;;
esac
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/mirrors/chubaofs.git
git@gitee.com:mirrors/chubaofs.git
mirrors
chubaofs
ChubaoFS
master

搜索帮助