Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
3338bb48
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,发现更多精彩内容 >>
提交
3338bb48
编写于
4月 30, 2018
作者:
B
Bill Hamilton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fedora: adjusted script for new variable adjustments
上级
657e414b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
72 addition
and
78 deletion
+72
-78
eosio_build.sh
eosio_build.sh
+69
-75
scripts/eosio_build_fedora.sh
scripts/eosio_build_fedora.sh
+3
-3
未找到文件。
eosio_build.sh
浏览文件 @
3338bb48
...
...
@@ -32,13 +32,13 @@
CWD
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
if
[
"
${
CWD
}
"
!=
"
${
PWD
}
"
]
;
then
printf
"
\
n\t
Please cd into directory
${
CWD
}
to run this script.
\n
\t
Exiting now.
\n\n
"
printf
"
\
\
n
\\
tPlease cd into directory %s to run this script.
\\
n
\\
tExiting now.
\\
n
\\
n"
"
${
CWD
}
"
exit
1
fi
function
usage
()
{
printf
"
\
t
Usage:
$0
[Build Option -o <Debug|Release|RelWithDebInfo|MinSizeRel>] [CodeCoverage -c ] [Doxygen -d]
\n\n
"
1>&2
printf
"
\
\
tUsage: %s [Build Option -o <Debug|Release|RelWithDebInfo|MinSizeRel>] [CodeCoverage -c ] [Doxygen -d]
\\
n
\\
n"
"
$0
"
1>&2
exit
1
}
...
...
@@ -50,7 +50,6 @@
ENABLE_COVERAGE_TESTING
=
false
TEMP_DIR
=
"/tmp"
TIME_BEGIN
=
$(
date
-u
+%s
)
ULIMIT
=
$(
ulimit
-u
)
VERSION
=
1.2
txtbld
=
$(
tput bold
)
...
...
@@ -65,7 +64,7 @@
if
[[
"
${
options
[*]
}
"
=
~
"
${
OPTARG
}
"
]]
;
then
CMAKE_BUILD_TYPE
=
"
${
OPTARG
}
"
else
printf
"
\
n\t
Invalid argument:
${
OPTARG
}
\n
"
1>&2
printf
"
\
\
n
\\
tInvalid argument: %s
\\
n"
"
${
OPTARG
}
"
1>&2
usage
exit
1
fi
...
...
@@ -77,12 +76,12 @@
DOXYGEN
=
true
;;
\?
)
printf
"
\
n\t
Invalid Option: -
${
OPTARG
}
\n
"
1>&2
printf
"
\
\
n
\\
tInvalid Option: %s
\\
n"
"-
${
OPTARG
}
"
1>&2
usage
exit
1
;;
:
)
printf
"
\
n\t
Invalid Option: -
${
OPTARG
}
requires an argument
\n
"
1>&2
printf
"
\
\
n
\\
tInvalid Option: %s requires an argument.
\\
n"
"-
${
OPTARG
}
"
1>&2
usage
exit
1
;;
...
...
@@ -95,44 +94,43 @@
fi
if
[
!
-d
.git
]
;
then
printf
"
\
n\t
This build script only works with sources cloned from git
\n
"
printf
"
\
t
Please clone a new eos directory with 'git clone https://github.com/EOSIO/eos --recursive'
\n
"
printf
"
\
t
See the wiki for instructions: https://github.com/EOSIO/eos/wiki
\n
"
printf
"
\
\
n
\\
tThis build script only works with sources cloned from git
\
\
n"
printf
"
\
\
tPlease clone a new eos directory with 'git clone https://github.com/EOSIO/eos --recursive'
\
\
n"
printf
"
\
\
tSee the wiki for instructions: https://github.com/EOSIO/eos/wiki
\
\
n"
exit
1
fi
STALE_SUBMODS
=
$((
`
git submodule status |
grep
-c
"^[+
\-
]"
`
))
STALE_SUBMODS
=
$((
$(
git submodule status |
grep
-c
"^[+
\-
]"
)
))
if
[
$STALE_SUBMODS
-gt
0
]
;
then
printf
"
\
n\t
git submodules are not up to date
\n
"
printf
"
\
t
Please run the command 'git submodule update --init --recursive'
\n
"
printf
"
\
\
n
\\
tgit submodules are not up to date.
\
\
n"
printf
"
\
\
tPlease run the command 'git submodule update --init --recursive'.
\
\
n"
exit
1
fi
printf
"
\n\t
Beginning build version:
${
VERSION
}
\n
"
printf
"
\t
$(
date
-u
)
\n
"
printf
"
\t
User:
$(
whoami
)
\n
"
printf
"
\t
git head id:
$(
cat
.git/refs/heads/master
)
\n
"
printf
"
\t
Current branch:
$(
git branch |
grep
\*
)
\n
"
printf
"
\t
Make version:
$(
make
--version
)
\n\n
"
printf
"
\n\t
ARCHITECTURE:
${
ARCH
}
\n
"
printf
"
\\
n
\\
tBeginning build version: %s
\\
n"
"
${
VERSION
}
"
printf
"
\\
t%s
\\
n"
"
$(
date
-u
)
"
printf
"
\\
tUser: %s
\\
n"
"
$(
whoami
)
"
printf
"
\\
tgit head id: %s
\\
n"
"
$(
cat
.git/refs/heads/master
)
"
printf
"
\\
tCurrent branch: %s
\\
n"
"
$(
git branch |
grep
\*
)
"
printf
"
\\
n
\\
tARCHITECTURE: %s
\\
n"
"
${
ARCH
}
"
if
[
$ARCH
==
"Linux"
]
;
then
if
[
"
$ARCH
"
==
"Linux"
]
;
then
if
[
!
-e
/etc/os-release
]
;
then
printf
"
\
n\t
EOSIO currently supports Amazon, Centos, Fedora, Mint & Ubuntu Linux only.
\n
"
printf
"
\
t
Please install on the latest version of one of these Linux distributions.
\n
"
printf
"
\
t
https://aws.amazon.com/amazon-linux-ami/
\n
"
printf
"
\
t
https://www.centos.org/
\n
"
printf
"
\
t
https://start.fedoraproject.org/
\n
"
printf
"
\
t
https://linuxmint.com/
\n
"
printf
"
\
t
https://www.ubuntu.com/
\n
"
printf
"
\
t
Exiting now.
\n
"
printf
"
\
\
n
\\
tEOSIO currently supports Amazon, Centos, Fedora, Mint & Ubuntu Linux only.
\
\
n"
printf
"
\
\
tPlease install on the latest version of one of these Linux distributions.
\
\
n"
printf
"
\
\
thttps://aws.amazon.com/amazon-linux-ami/
\
\
n"
printf
"
\
\
thttps://www.centos.org/
\
\
n"
printf
"
\
\
thttps://start.fedoraproject.org/
\
\
n"
printf
"
\
\
thttps://linuxmint.com/
\
\
n"
printf
"
\
\
thttps://www.ubuntu.com/
\
\
n"
printf
"
\
\
tExiting now.
\
\
n"
exit
1
fi
OS_NAME
=
$(
cat
/etc/os-release |
grep
^NAME |
cut
-d
'='
-f2
|
sed
's/\"//gI'
)
case
$OS_NAME
in
case
"
$OS_NAME
"
in
"Amazon Linux AMI"
)
FILE
=
"
${
PWD
}
/scripts/eosio_build_amazon.sh"
CXX_COMPILER
=
g++
...
...
@@ -180,16 +178,16 @@
export
PATH
=
${
HOME
}
/opt/mongodb/bin:
$PATH
;;
*
)
printf
"
\
n\t
Unsupported Linux Distribution. Exiting now.
\n
\n
"
printf
"
\
\
n
\\
tUnsupported Linux Distribution. Exiting now.
\\
n
\
\
n"
exit
1
esac
export
BOOST_ROOT
=
${
HOME
}
/opt/boost_1_66_0
export
BOOST_ROOT
=
"
${
HOME
}
/opt/boost_1_66_0"
OPENSSL_ROOT_DIR
=
/usr/include/openssl
WASM_ROOT
=
${
HOME
}
/opt/wasm
WASM_ROOT
=
"
${
HOME
}
/opt/wasm"
fi
if
[
$ARCH
==
"Darwin"
]
;
then
if
[
"
$ARCH
"
==
"Darwin"
]
;
then
FILE
=
"
${
PWD
}
/scripts/eosio_build_darwin.sh"
CXX_COMPILER
=
clang++
C_COMPILER
=
clang
...
...
@@ -199,38 +197,36 @@
WASM_ROOT
=
/usr/local/wasm
fi
.
$FILE
.
"
$FILE
"
printf
"
\
n\n
>>>>>>>> ALL dependencies sucessfully found or installed . Installing EOS.IO
\n
\n
"
printf
"
\
\
n
\\
n>>>>>>>> ALL dependencies sucessfully found or installed . Installing EOS.IO
\\
n
\
\
n"
if
[
!
-d
"
${
BUILD_DIR
}
"
]
;
then
mkdir
-p
"
${
BUILD_DIR
}
"
fi
cd
"
${
BUILD_DIR
}
"
if
[
-z
$CMAKE
]
;
then
CMAKE
=
$(
which
cmake
)
if
[
-z
"
$CMAKE
"
]
;
then
CMAKE
=
$(
command
-v
cmake
)
fi
$CMAKE
-DCMAKE_BUILD_TYPE
=
${
CMAKE_BUILD_TYPE
}
-DCMAKE_CXX_COMPILER
=
${
CXX_COMPILER
}
\
-DCMAKE_C_COMPILER
=
${
C_COMPILER
}
-DWASM_ROOT
=
${
WASM_ROOT
}
\
-DOPENSSL_ROOT_DIR
=
${
OPENSSL_ROOT_DIR
}
-DBUILD_MONGO_DB_PLUGIN
=
true
\
-DENABLE_COVERAGE_TESTING
=
${
ENABLE_COVERAGE_TESTING
}
-DBUILD_DOXYGEN
=
${
DOXYGEN
}
\
..
if
[
$?
-ne
0
]
;
then
printf
"
\n\t
>>>>>>>>>>>>>>>>>>>> CMAKE building EOSIO has exited with the above error.
\n\n
"
if
!
"
${
CMAKE
}
"
-DCMAKE_BUILD_TYPE
=
"
${
CMAKE_BUILD_TYPE
}
"
-DCMAKE_CXX_COMPILER
=
"
${
CXX_COMPILER
}
"
\
-DCMAKE_C_COMPILER
=
"
${
C_COMPILER
}
"
-DWASM_ROOT
=
"
${
WASM_ROOT
}
"
\
-DOPENSSL_ROOT_DIR
=
"
${
OPENSSL_ROOT_DIR
}
"
-DBUILD_MONGO_DB_PLUGIN
=
true
\
-DENABLE_COVERAGE_TESTING
=
"
${
ENABLE_COVERAGE_TESTING
}
"
-DBUILD_DOXYGEN
=
"
${
DOXYGEN
}
"
..
then
printf
"
\\
n
\\
t>>>>>>>>>>>>>>>>>>>> CMAKE building EOSIO has exited with the above error.
\\
n
\\
n"
exit
-1
fi
make
-j
${
CPU_CORE
}
-s
if
[
$?
-ne
0
]
;
then
printf
"
\n\t
>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.
\n\n
"
if
!
make
-j
"
${
CPU_CORE
}
"
then
printf
"
\\
n
\\
t>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.
\\
n
\\
n"
exit
-1
fi
TIME_END
=
$((
`
date
-u
+%s
`
-
$TIME_BEGIN
))
TIME_END
=
$((
$(
date
-u
+%s
)
-
"
${
TIME_BEGIN
}
"
))
printf
"
\n\n
${
bldred
}
\t
_______ _______ _______ _________ _______
\n
"
printf
'\t( ____ \( ___ )( ____ \\\\__ __/( ___ )\n'
...
...
@@ -241,34 +237,32 @@
printf
"
\t
| (____/
\|
(___) |/
\_
___) |___) (___| (___) |
\n
"
printf
"
\t
(_______/(_______)
\_
______)
\_
______/(_______)
\n
${
txtrst
}
"
printf
"
\
n\t
EOS.IO has been successfully built. %d:%d:%d
\n
\n
"
$((
$TIME_END
/
3600
))
$((
$TIME_END
%
3600
/
60
))
$((
$TIME_END
%
60
))
printf
"
\
t
To verify your installation run the following commands:
\n
"
printf
"
\
\
n
\\
tEOS.IO has been successfully built. %d:%d:%d
\\
n
\
\
n"
$((
$TIME_END
/
3600
))
$((
$TIME_END
%
3600
/
60
))
$((
$TIME_END
%
60
))
printf
"
\
\
tTo verify your installation run the following commands:
\
\
n"
print_instructions
printf
"
\
t
For more information:
\n
"
printf
"
\
t
EOS.IO website: https://eos.io
\n
"
printf
"
\
t
EOS.IO Telegram channel @ https://t.me/EOSProject
\n
"
printf
"
\
t
EOS.IO resources: https://eos.io/resources/
\n
"
printf
"
\
t
EOS.IO wiki: https://github.com/EOSIO/eos/wiki
\n\n
\n
"
printf
"
\
\
tFor more information:
\
\
n"
printf
"
\
\
tEOS.IO website: https://eos.io
\
\
n"
printf
"
\
\
tEOS.IO Telegram channel @ https://t.me/EOSProject
\
\
n"
printf
"
\
\
tEOS.IO resources: https://eos.io/resources/
\
\
n"
printf
"
\
\
tEOS.IO wiki: https://github.com/EOSIO/eos/wiki
\\
n
\\
n
\
\
n"
if
[
"x
${
EOSIO_BUILD_PACKAGE
}
"
!=
"x"
]
;
then
# Build eos.io package
$CMAKE
-DCMAKE_BUILD_TYPE
=
${
CMAKE_BUILD_TYPE
}
-DCMAKE_CXX_COMPILER
=
${
CXX_COMPILER
}
\
-DCMAKE_C_COMPILER
=
${
C_COMPILER
}
-DWASM_ROOT
=
${
WASM_ROOT
}
\
-DOPENSSL_ROOT_DIR
=
${
OPENSSL_ROOT_DIR
}
-DCMAKE_INSTALL_PREFIX
=
/usr ..
if
[
$?
-ne
0
]
;
then
printf
"
\n\t
>>>>>>>>>>>>>>>>>>>> CMAKE building eos.io package has exited with the above error.
\n\n
"
exit
-1
fi
make
-j
${
CPU_CORE
}
VERBOSE
=
0 package
if
[
"x
${
EOSIO_BUILD_PACKAGE
}
"
!=
"x"
]
;
then
# Build eos.io package
if
!
"
$CMAKE
"
-DCMAKE_BUILD_TYPE
=
"
${
CMAKE_BUILD_TYPE
}
"
-DCMAKE_CXX_COMPILER
=
"
${
CXX_COMPILER
}
"
\
-DCMAKE_C_COMPILER
=
"
${
C_COMPILER
}
"
-DWASM_ROOT
=
"
${
WASM_ROOT
}
"
\
-DOPENSSL_ROOT_DIR
=
"
${
OPENSSL_ROOT_DIR
}
"
-DCMAKE_INSTALL_PREFIX
=
"/usr"
..
then
printf
"
\\
n
\\
t>>>>>>>>>>>>>>>>>>>> CMAKE building eos.io package has exited with the above error.
\\
n
\\
n"
exit
-1
fi
if
[
$?
-ne
0
]
;
then
printf
"
\n\t
>>>>>>>>>>>>>>>>>>>> MAKE building eos.io package has exited with the above error.
\n\n
"
exit
-1
fi
if
!
make
-j
${
CPU_CORE
}
VERBOSE
=
0 package
then
printf
"
\\
n
\\
t>>>>>>>>>>>>>>>>>>>> MAKE building eos.io package has exited with the above error.
\\
n
\\
n"
exit
-1
fi
printf
"
\n\t
>>>>>>>>>>>>>>>>>>>> eos.io package has been successfully built.
\n\n
"
fi
\ No newline at end of file
printf
"
\\
n
\\
t>>>>>>>>>>>>>>>>>>>> eos.io package has been successfully built.
\\
n
\\
n"
fi
\ No newline at end of file
scripts/eosio_build_fedora.sh
浏览文件 @
3338bb48
...
...
@@ -62,7 +62,7 @@
DEP_ARRAY
=(
git gcc.x86_64 gcc-c++.x86_64 autoconf automake libtool make cmake.x86_64
\
bzip2-devel.x86_64 openssl-devel.x86_64 gmp-devel.x86_64 libstdc++-devel.x86_64
\
python3-devel.x86_64 mongodb.x86_64 mongodb-server.x86_64 libedit.x86_64
\
graphviz.x86_64 doxygen.x86_64
ncurses-devel.x86_64 swig.x86_64
)
graphviz.x86_64 doxygen.x86_64
)
COUNT
=
1
DISPLAY
=
""
DEP
=
""
...
...
@@ -92,7 +92,7 @@
case
$yn
in
[
Yy]
*
)
printf
"
\n\n\t
Installing dependencies
\n\n
"
sudo
yum
-y
install
${
DEP
}
sudo
yum
-y
install
"
${
DEP
}
"
if
[
$?
-ne
0
]
;
then
printf
"
\n\t
YUM dependency installation failed.
\n
"
printf
"
\n\t
Exiting now.
\n
"
...
...
@@ -327,6 +327,6 @@
function
print_instructions
()
{
printf
"
\n\t
$(
which mongod
)
-f
${
MONGOD_CONF
}
&
\n
"
printf
"
\t
cd
${
HOME
}
/eos/build
; make test
\n\n
"
printf
"
\t
cd
${
BUILD_DIR
}
; make test
\n\n
"
return
0
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录