Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
d7024f86
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d7024f86
编写于
2月 12, 2018
作者:
B
Bill Hamilton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
removed all reference to RHEL linux from build scripts
上级
0197d4d5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
248 deletion
+0
-248
eosio_build.sh
eosio_build.sh
+0
-7
scripts/eosio_build_rhel.sh
scripts/eosio_build_rhel.sh
+0
-241
未找到文件。
eosio_build.sh
浏览文件 @
d7024f86
...
...
@@ -63,13 +63,6 @@
CXX_COMPILER
=
clang++-4.0
C_COMPILER
=
clang-4.0
;;
"Red Hat Enterprise Linux Server"
)
printf
"
\n\t
Red Hat Linux is Unsupported at this time.
\n
Check back soon. Exiting now.
\n\n
"
exit
1
FILE
=
${
WORK_DIR
}
/scripts/eosio_build_rhel.sh
CXX_COMPILER
=
clang++
C_COMPILER
=
clang
;;
"Fedora"
)
FILE
=
${
WORK_DIR
}
/scripts/eosio_build_fedora.sh
CXX_COMPILER
=
g++
...
...
scripts/eosio_build_rhel.sh
已删除
100644 → 0
浏览文件 @
0197d4d5
OS_VER
=
$(
cat
/etc/os-release |
grep
VERSION_ID |
cut
-d
'='
-f2
|
sed
's/[^0-9\.]//gI'
)
OS_MAJ
=
`
echo
"
${
OS_VER
}
"
|
cut
-d
'.'
-f1
`
OS_MIN
=
`
echo
"
${
OS_VER
}
"
|
cut
-d
'.'
-f2
`
MEM_MEG
=
$(
free
-m
|
grep
Mem |
tr
-s
' '
|
cut
-d
\
-f2
)
CPU_SPEED
=
$(
lscpu |
grep
"MHz"
|
tr
-s
' '
|
cut
-d
\
-f3
|
cut
-d
'.'
-f1
)
CPU_CORE
=
$(
lscpu |
grep
"^CPU(s)"
|
tr
-s
' '
|
cut
-d
\
-f2
)
DISK_TOTAL
=
`
df
-h
/ |
grep
/dev |
tr
-s
' '
|
cut
-d
\
-f2
|
sed
's/[^0-9]//'
`
DISK_AVAIL
=
`
df
-h
/ |
grep
/dev |
tr
-s
' '
|
cut
-d
\
-f4
|
sed
's/[^0-9]//'
`
printf
"
\n\t
OS name:
$OS_NAME
\n
"
printf
"
\t
OS Version:
${
OS_VER
}
\n
"
printf
"
\t
CPU speed:
${
CPU_SPEED
}
Mhz
\n
"
printf
"
\t
CPU cores:
$CPU_CORE
\n
"
printf
"
\t
Physical Memory:
$MEM_MEG
Mgb
\n
"
printf
"
\t
Disk space total:
${
DISK_TOTAL
}
G
\n
"
printf
"
\t
Disk space available:
${
DISK_AVAIL
}
G
\n
"
if
[
$MEM_MEG
-lt
4000
]
;
then
echo
"Your system must have 8 or more Gigabytes of physical memory installed."
echo
"exiting now."
exit
1
fi
if
[
$OS_MIN
-lt
4
]
;
then
echo
"You must be running Ubuntu 16.04.x or higher to install EOSIO."
echo
"exiting now"
exit
1
fi
if
[
$DISK_AVAIL
-lt
100
]
;
then
echo
"You must have at least 100GB of available storage to install EOSIO."
echo
"exiting now"
exit
1
fi
# EPEL Versions
# clang 3.4.2
printf
"
\n\t
Checking Yum installation
\n
"
YUM
=
$(
which yum 2>/dev/null
)
if
[
$?
-ne
0
]
;
then
printf
"
\n\t
Yum must be installed to compile EOS.IO.
\n
"
printf
"
\n\t
Exiting now.
\n
"
exit
0
fi
printf
"
\t
Yum installation found at
${
YUM
}
.
\n
"
printf
"
\n\t
Checking EPEL repository installation.
\n
"
epel
=
$(
sudo
$YUM
repoinfo epel |
grep
Repo-status |
tr
-s
' '
|
cut
-d
:
-f2
|
sed
's/ //g'
)
if
[
-z
"
$epel
"
]
;
then
printf
"
\n\t
Installation of EOS.IO requires the EPEL yum repository be installed.
\n
"
printf
"
\t
Would you like to install the EPEL yum repository?
\n
"
select
yn
in
"Yes"
"No"
;
do
case
$yn
in
[
Yy]
*
)
printf
"
\n\n\t
Installing EPEL Repository.
\n\n
"
sudo
yum
install
https://dl.fedoraproject.org/pub/epel/epel-release-latest-
$(
rpm
-E
'%{rhel}'
)
.noarch.rpm
if
[
$?
-ne
0
]
;
then
printf
"
\n\t
Installation of EPEL repository was unsuccessful.
\n
"
printf
"
\n\t
Exiting now.
\n
"
exit
1
;
else
printf
"
\n\t
EPEL repository successfully installed.
\n
"
fi
break
;;
[
Nn]
*
)
printf
"
\n\t
User aborting installation of required EPEL repository,
\n\t
Exiting now.
\n
"
;
exit
;;
*
)
printf
"
\n\t
Please type 1 for yes or 2 for no.
\n
"
;;
esac
done
fi
printf
"
\t
EPEL repository found.
\n
"
# DEP_ARRAY=(clang-4.0 lldb-4.0 libclang-4.0-dev cmake make libbz2-dev libssl-dev libgmp3-dev autotools-dev build-essential libicu-dev python-dev autoconf libtool)
DEP_ARRAY
=(
git autoconf automake libtool make gcc gcc-c++ bzip2 bzip2-devel.x86_64 openssl-devel.x86_64 gmp.x86_64 gmp-devel.x86_64 libstdc++-devel.x86_64 python python-devel libedit.x86_64 libxml2-devel.x86_64 ncurses-devel.x86_64 swig.x86_64
)
DCOUNT
=
0
COUNT
=
1
DISPLAY
=
""
DEP
=
""
printf
"
\n\t
Checking YUM for installed dependencies.
\n\n
"
for
((
i
=
0
;
i<
${#
DEP_ARRAY
[@]
}
;
i++
))
;
do
pkg
=
$(
sudo
yum info
${
DEP_ARRAY
[
$i
]
}
2>/dev/null |
grep
Repo |
tr
-s
' '
|
cut
-d
:
-f2
|
sed
's/ //g'
)
if
[
"
$pkg
"
!=
"installed"
]
;
then
DEP
=
$DEP
"
${
DEP_ARRAY
[
$i
]
}
"
DISPLAY
=
"
${
DISPLAY
}${
COUNT
}
.
${
DEP_ARRAY
[
$i
]
}
\n\t
"
printf
"
\t
Package
${
DEP_ARRAY
[
$i
]
}
${
bldred
}
NOT
${
txtrst
}
found.
\n
"
let
COUNT++
let
DCOUNT++
else
printf
"
\t
Package
${
DEP_ARRAY
[
$i
]
}
found.
\n
"
continue
fi
done
if
[
${
DCOUNT
}
-ne
0
]
;
then
printf
"
\n\t
The following dependencies are required to install EOSIO.
\n
"
printf
"
\n\t
$DISPLAY
\n\n
"
printf
"
\t
Do you wish to install these packages?
\n
"
select
yn
in
"Yes"
"No"
;
do
case
$yn
in
[
Yy]
*
)
printf
"
\n\n\t
Installing dependencies
\n\n
"
sudo
apt-get update
sudo
yum
-y
install
${
DEP
}
if
[
$?
-ne
0
]
;
then
printf
"
\n\t
YUM dependency installation failed.
\n
"
printf
"
\n\t
Exiting now.
\n
"
exit
1
else
printf
"
\n\t
YUM dependencies installed successfully.
\n
"
fi
break
;;
[
Nn]
*
)
echo
"User aborting installation of required dependencies, Exiting now."
;
exit
;;
*
)
echo
"Please type 1 for yes or 2 for no."
;;
esac
done
else
printf
"
\n\t
No required YUM dependencies to install.
\n
"
fi
printf
"
\n\t
Checking for boost libraries
\n
"
if
[
!
-d
${
HOME
}
/opt/boost_1_66_0
]
;
then
# install boost
printf
"
\t
Installing boost libraries
\n
"
cd
${
TEMP_DIR
}
curl
-L
https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2
>
boost_1.66.0.tar.bz2
tar
xf boost_1.66.0.tar.bz2
cd
boost_1_66_0/
./bootstrap.sh
"--prefix=
$BOOST_ROOT
"
./b2
install
rm
-rf
${
TEMP_DIR
}
/boost_1_66_0/
rm
-f
${
TEMP_DIR
}
/boost_1.66.0.tar.bz2
else
printf
"
\t
Boost 1.66 found at
${
HOME
}
/opt/boost_1_66_0
\n
"
fi
printf
"
\n\t
Checking for secp256k1-zkp
\n
"
# install secp256k1-zkp (Cryptonomex branch)
if
[
!
-e
/usr/local/lib/libsecp256k1.a
]
;
then
printf
"
\t
Installing secp256k1-zkp (Cryptonomex branch)
\n
"
cd
${
TEMP_DIR
}
git clone https://github.com/cryptonomex/secp256k1-zkp.git
cd
secp256k1-zkp
./autogen.sh
if
[
$?
-ne
0
]
;
then
printf
"
\t
Error running autogen for secp256k1-zkp.
\n
"
printf
"
\t
Exiting now.
\n\n
"
exit
;
fi
./configure
make
if
[
$?
-ne
0
]
;
then
printf
"
\t
Error compiling secp256k1-zkp.
\n
"
printf
"
\t
Exiting now.
\n\n
"
exit
;
fi
sudo
make
install
rm
-rf
cd
${
TEMP_DIR
}
/secp256k1-zkp
else
printf
"
\t
secp256k1 found
\n
"
fi
printf
"
\n\t
Checking for CMAKE.
\n
"
CMAKE
=
$(
which cmake 2>/dev/null
)
# install CMAKE 3.10.2
if
[
-z
$CMAKE
]
;
then
printf
"
\t
Installing CMAKE
\n
"
cd
${
TEMP_DIR
}
curl
-L
-O
https://cmake.org/files/v3.10/cmake-3.10.2.tar.gz
tar
xf cmake-3.10.2.tar.gz
rm
-f
cmake-3.10.2.tar.gz
cd
cmake-3.10.2
./bootstrap
if
[
$?
-ne
0
]
;
then
printf
"
\t
Error running bootstrap for CMAKE.
\n
"
printf
"
\t
Exiting now.
\n\n
"
exit
;
fi
make
if
[
$?
-ne
0
]
;
then
printf
"
\t
Error compiling CMAKE.
\n
"
printf
"
\t
Exiting now.
\n\n
"
exit
;
fi
sudo
make
install
rm
-rf
cd
${
TEMP_DIR
}
/cmake-3.10.2
else
printf
"
\t
CMAKE found
\n
"
fi
printf
"
\n\t
Checking for binaryen
\n
"
if
[
!
-d
${
HOME
}
/opt/binaryen
]
;
then
# Install binaryen v1.37.14:
printf
"
\t
Installing binaryen v1.37.14:
\n
"
cd
${
TEMP_DIR
}
git clone https://github.com/WebAssembly/binaryen
cd
binaryen
git checkout tags/1.37.14
cmake
.
&&
make
if
[
$?
-ne
0
]
;
then
printf
"
\t
Error compiling binaryen.
\n
"
printf
"
\t
Exiting now.
\n\n
"
exit
;
fi
mkdir
-p
${
HOME
}
/opt/binaryen/ 2>/dev/null
mv
${
TEMP_DIR
}
/binaryen/bin
${
HOME
}
/opt/binaryen/
rm
-rf
${
TEMP_DIR
}
/binaryen
else
printf
"
\t
Binaryen found at
${
HOME
}
/opt/binaryen
\n
"
fi
printf
"
\n\t
Checking for WASM
\n
"
if
[
!
-d
${
HOME
}
/opt/wasm
]
;
then
# Build LLVM and clang for WASM:
printf
"
\t
Installing LLVM & WASM
\n
"
cd
${
TEMP_DIR
}
mkdir
wasm-compiler 2>/dev/null
cd
wasm-compiler
git clone
--depth
1
--single-branch
--branch
release_40 https://github.com/llvm-mirror/llvm.git
cd
llvm/tools
git clone
--depth
1
--single-branch
--branch
release_40 https://github.com/llvm-mirror/clang.git
cd
..
mkdir
build 2>/dev/null
cd
build
cmake
-G
"Unix Makefiles"
-DCMAKE_INSTALL_PREFIX
=
${
HOME
}
/opt/wasm
-DLLVM_TARGETS_TO_BUILD
=
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD
=
WebAssembly
-DCMAKE_BUILD_TYPE
=
Release ../
make
-j
$(
nproc
)
install
rm
-rf
${
TEMP_DIR
}
/wasm-compiler
else
printf
"
\t
WASM found at
${
HOME
}
/opt/wasm
\n
"
fi
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录