Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
8f232d8c
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,发现更多精彩内容 >>
提交
8f232d8c
编写于
6月 18, 2018
作者:
B
Bill Hamilton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Ubuntu: Changed mongodb driver versions and compile settings for cxx version 3.3
上级
61e17686
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
71 addition
and
40 deletion
+71
-40
scripts/eosio_build_ubuntu.sh
scripts/eosio_build_ubuntu.sh
+71
-40
未找到文件。
scripts/eosio_build_ubuntu.sh
浏览文件 @
8f232d8c
...
...
@@ -270,115 +270,146 @@ mongodconf
fi
printf
"
\\
n
\\
tChecking MongoDB C++ driver installation.
\\
n"
if
[
!
-e
"/usr/local/lib/libmongocxx-static.a"
]
;
then
printf
"
\\
n
\\
tInstalling MongoDB C & C++ drivers.
\\
n"
MONGO_INSTALL
=
true
if
[
-e
"/usr/local/lib/libmongocxx-static.a"
]
;
then
MONGO_INSTALL
=
false
if
!
version
=
$(
grep
"Version:"
/usr/local/lib/pkgconfig/libmongocxx-static.pc |
tr
-s
' '
|
awk
'{print $2}'
)
then
printf
"
\\
tUnable to determine mongodb-cxx-driver version.
\\
n"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
maj
=
$(
echo
"
${
version
}
"
|
cut
-d
'.'
-f1
)
min
=
$(
echo
"
${
version
}
"
|
cut
-d
'.'
-f2
)
if
[
"
${
maj
}
"
-gt
3
]
;
then
MONGO_INSTALL
=
true
elif
[
"
${
maj
}
"
-eq
3
]
&&
[
"
${
min
}
"
-lt
3
]
;
then
MONGO_INSTALL
=
true
fi
fi
if
[
$MONGO_INSTALL
==
"true"
]
;
then
if
!
cd
"
${
TEMP_DIR
}
"
then
printf
"
\\
n
\\
tUnable to enter directory %s.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tUnable to enter directory %s.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
STATUS
=
$(
curl
-LO
-w
'%{http_code}'
--connect-timeout
30 https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz
)
STATUS
=
$(
curl
-LO
-w
'%{http_code}'
--connect-timeout
30 https://github.com/mongodb/mongo-c-driver/releases/download/1.10.2/mongo-c-driver-1.10.2.tar.gz
)
if
[
"
${
STATUS
}
"
-ne
200
]
;
then
if
!
rm
-f
"
${
TEMP_DIR
}
/mongo-c-driver-1.
9.3
.tar.gz"
if
!
rm
-f
"
${
TEMP_DIR
}
/mongo-c-driver-1.
10.2
.tar.gz"
then
printf
"
\\
n
\\
tUnable to remove file %s/mongo-c-driver-1.9.3
.tar.gz.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tUnable to remove file %s/mongo-c-driver-1.10.2
.tar.gz.
\\
n"
"
${
TEMP_DIR
}
"
fi
printf
"
\\
tUnable to download MongoDB C driver at this time.
\\
n"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
tar
xf
"
${
TEMP_DIR
}
/mongo-c-driver-1.9.3.tar.gz"
if
!
tar
xf
mongo-c-driver-1.10.2.tar.gz
then
printf
"
\\
n
\\
tUnable to unarchive file %s/mongo-c-driver-1.9.3
.tar.gz.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tUnable to unarchive file %s/mongo-c-driver-1.10.2
.tar.gz.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
rm
-f
"
${
TEMP_DIR
}
/mongo-c-driver-1.
9.3
.tar.gz"
if
!
rm
-f
"
${
TEMP_DIR
}
/mongo-c-driver-1.
10.2
.tar.gz"
then
printf
"
\\
n
\\
tUnable to remove file %s/mongo-c-driver-1.9.3.tar.gz.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tUnable to remove file mongo-c-driver-1.10.2.tar.gz.
\\
n
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
cd
"
${
TEMP_DIR
}
/mongo-c-driver-1.9.3"
if
!
cd
"
${
TEMP_DIR
}
"
/mongo-c-driver-1.10.2
then
printf
"
\\
n
\\
tUnable to enter directory %s/mongo-c-driver-1.9.3.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tUnable to cd into directory %s/mongo-c-driver-1.10.2.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
mkdir
cmake-build
then
printf
"
\\
tUnable to create directory %s/mongo-c-driver-1.10.2/cmake-build.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
cd
cmake-build
then
printf
"
\\
tUnable to enter directory %s/mongo-c-driver-1.10.2/cmake-build.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
./configure
--enable-static
--with-libbson
=
bundled
--enable-ssl
=
openssl
--disable-automatic-init-and-cleanup
--prefix
=
/usr/local
if
!
cmake
-DCMAKE_BUILD_TYPE
=
Release
-DCMAKE_INSTALL_PREFIX
=
/usr/local
-DENABLE_BSON
=
ON
\
-DENABLE_SSL
=
OPENSSL
-DENABLE_AUTOMATIC_INIT_AND_CLEANUP
=
OFF
-DENABLE_STATIC
=
ON ..
then
printf
"
\\
tConfiguring MongoDB C driver has encountered the errors above.
\\
n"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
make
-j
"
${
JOBS
}
"
if
!
make
-j
"
${
CPU_CORE
}
"
then
printf
"
\\
tError compiling MongoDB C driver.
\\
n"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
sudo
make
install
then
printf
"
\\
tError installing MongoDB C driver.
\\
nMake sure you have sudo privileges.
\\
n"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
;
exit
1
;
fi
if
!
cd
"
${
TEMP_DIR
}
"
then
printf
"
\\
n
\\
tUnable to enter directory %s.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tUnable to enter directory %s.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
rm
-rf
"
${
TEMP_DIR
}
/mongo-c-driver-1.
9.3
"
if
!
rm
-rf
"
${
TEMP_DIR
}
/mongo-c-driver-1.
10.2
"
then
printf
"
\\
n
\\
tUnable to remove directory %s/mongo-c-driver-1.9.3
.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tUnable to remove directory %s/mongo-c-driver-1.10.2
.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
git clone https://github.com/mongodb/mongo-cxx-driver.git
--branch
releases/v3.
2
--depth
1
if
!
git clone https://github.com/mongodb/mongo-cxx-driver.git
--branch
releases/v3.
3
--depth
1
then
printf
"
\\
tUnable to clone MongoDB C++ driver at this time.
\\
n"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
cd
"
${
TEMP_DIR
}
/mongo-cxx-driver/build"
then
printf
"
\\
n
\\
tUnable to enter directory %s/mongo-cxx-driver/build.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tUnable to enter directory %s/mongo-cxx-driver/build.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
cmake
-DBUILD_SHARED_LIBS
=
OFF
-DCMAKE_BUILD_TYPE
=
Release
-DCMAKE_INSTALL_PREFIX
=
/usr/local ..
then
printf
"
\\
tCmake has encountered the above errors building the MongoDB C++ driver.
\\
n"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
sudo
make
-j
"
${
JOBS
}
"
if
!
sudo
make
-j
"
${
CPU_CORE
}
"
then
printf
"
\\
tError compiling MongoDB C++ driver.
\\
n"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
sudo
make
install
then
printf
"
\\
tError installing MongoDB C++ driver.
\\
nMake sure you have sudo privileges.
\\
n"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
cd
"
${
CWD
}
"
if
!
cd
"
${
TEMP_DIR
}
"
then
printf
"
\\
n
\\
tUnable to enter directory %s.
\\
n"
"
${
CWD
}
"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tUnable to enter directory %s.
\\
n"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
if
!
sudo rm
-rf
"
${
TEMP_DIR
}
/mongo-cxx-driver"
then
printf
"
\\
n
\\
tUnable to remove directory %s/mongo-cxx-driver.
\\
n
"
"
${
TEMP_DIR
}
"
printf
"
\\
n
\\
tExiting now.
\\
n
\\
n"
printf
"
\\
tUnable to remove directory %s/mongo-cxx-driver.
\\
n"
"
${
TEMP_DIR
}
"
"
${
TEMP_DIR
}
"
printf
"
\\
tExiting now.
\\
n
\\
n"
exit
1
;
fi
printf
"
\\
n
\\
tMongo C++ driver successfully installed @ /usr/local/lib/libmongocxx-static.a.
\\
n
\\
n"
printf
"
\\
tMongo C++ driver installed at /usr/local/lib/libmongocxx-static.a.
\\
n"
else
printf
"
\\
tMongo C++ driver found at /usr/local/lib/libmongocxx-static.a.
\\
n"
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录