Update doc/building-ubuntu.md and install-dependencies.sh to
enable Seastar to be compiled on Ubuntu successfully.
Signed-off-by: Helloway He <
hellow...@gmail.com>
---
doc/building-ubuntu.md | 29 +++++++++++++++++++++++++++--
install-dependencies.sh | 8 ++++----
2 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/doc/building-ubuntu.md b/doc/building-ubuntu.md
index 3896289e..bac36c0d 100644
--- a/doc/building-ubuntu.md
+++ b/doc/building-ubuntu.md
@@ -2,13 +2,38 @@
### Building seastar on Ubuntu 14.04/15.10/16.04
+Download the latest Seastar from the official website:
+```
+git clone
https://github.com/scylladb/seastar.git
+```
+
+Enter the seastar project directory,and then you can selectively download the submodule (such as: dpdk, fmt, c-ares) you need under the seastar project, and I choose to download all the submodule here:
+```
+cd seastar
+git submodule update --init
+```
+
Installing required packages:
```
sudo ./install-dependencies.sh
```
-To compile Seastar explicitly using gcc 5, use:
+To compile Seastar explicitly using gcc 7, use:
```
-./configure.py --compiler=g++-5
+./configure.py --compiler=g++-7
ninja
```
+
+Note:
+If you choose to enable DPDK, you need to install DPDK first:
+```
+cd dpdk
+make install T=x86_64-native-linuxapp-gcc DESTDIR=./
+```
+
+To compile Seastar explicitly using gcc 7, use:
+```
+./configure.py --enable-dpdk --compiler=g++-7
+ninja
+```
+
diff --git a/install-dependencies.sh b/install-dependencies.sh
index dcff2275..938b74f5 100755
--- a/install-dependencies.sh
+++ b/install-dependencies.sh
@@ -20,18 +20,18 @@
. /etc/os-release
if [ "$ID" = "ubuntu" ] || [ "$ID" = "debian" ]; then
- if [ "$VERSION_ID" = "14.04" ]; then
+ if [ "$ID" = "ubuntu" ]; then
if [ ! -f /usr/bin/add-apt-repository ]; then
apt-get -y install software-properties-common
fi
-
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get -y update
fi
apt-get install -y ninja-build ragel libhwloc-dev libnuma-dev libpciaccess-dev libcrypto++-dev libboost-all-dev libxml2-dev xfslibs-dev libgnutls28-dev liblz4-dev libsctp-dev gcc make libprotobuf-dev protobuf-compiler python3 libunwind8-dev systemtap-sdt-dev libtool cmake libyaml-cpp-dev
+
if [ "$ID" = "ubuntu" ]; then
- apt-get install -y g++-5
- echo "g++-5 is installed for Seastar. To build Seastar with g++-5, specify '--compiler=g++-5' on configure.py"
+ apt-get install -y g++-7
+ echo "g++-7 is installed for Seastar. To build Seastar with g++-7, specify '--compiler=g++-7' on configure.py"
else # debian
apt-get install -y g++
fi
--
2.13.5 (Apple Git-94)