@@ -8,62 +8,67 @@ Follow these steps to build and run them on Linux.
8
8
## Prerequisites
9
9
10
10
These instructions are for running in the Docker container manager,
11
- but can be directly used on any Ubuntu 14 .04 image.
11
+ but can be directly used on any Ubuntu 16 .04 image.
12
12
13
13
## Start Docker
14
14
15
15
Start a docker instance with the following command:
16
16
17
- ` docker run -i -t --privileged=true ubuntu:14 .04 /bin/bash `
17
+ ` docker run -i -t --privileged=true ubuntu:16 .04 /bin/bash `
18
18
19
19
## Install Dependencies
20
20
21
21
# update package list
22
22
apt-get update
23
23
# install download tools
24
- apt-get install git wget -y
24
+ apt-get install -y git wget
25
+ # install a few useful utilities
26
+ apt-get install -y vim sudo
25
27
# install grpc build dependencies
26
- apt-get install build-essential autoconf libtool -y
28
+ apt-get install -y build-essential autoconf libtool
27
29
# install swift dependencies
28
- apt-get install clang libicu-dev libedit-dev python-dev libxml2-dev -y
30
+ apt-get install -y clang libicu-dev libedit-dev python-dev libxml2-dev
31
+ # install networking dependencies
32
+ apt-get install -y libcurl4-openssl-dev
29
33
30
34
## Install Swift
31
35
32
36
# go to /root
33
- cd
37
+ cd
34
38
# download and unpack swift
35
- wget https://swift.org/builds/swift-3.0-preview-3/ubuntu1404/swift-3.0-PREVIEW-3/swift-3.0-PREVIEW-3-ubuntu14.04.tar.gz
36
- tar xzf swift-3.0-PREVIEW-3-ubuntu14.04.tar.gz
39
+ wget https://swift.org/builds/swift-3.0.1-release/ubuntu1604/swift-3.0.1-RELEASE/swift-3.0.1-RELEASE-ubuntu16.04.tar.gz
40
+ tar xzf swift-3.0.1-RELEASE-ubuntu16.04.tar.gz
41
+ ln -s swift-3.0.1-RELEASE-ubuntu16.04 swift
37
42
38
43
## Add Swift to your path
44
+ # add swift to your path by adding this to your .bashrc
45
+ export PATH=/root/swift/usr/bin:$PATH
39
46
40
- # add swift to your path by adding this to your .bashrc
41
- export SWIFT=swift-3.0-PREVIEW-3-ubuntu14.04
42
- export PATH=/root/$SWIFT/usr/bin:$PATH
43
-
44
- # Then run this to update your path
45
- source ~/.bashrc
47
+ # Then run this to update your path
48
+ source ~/.bashrc
46
49
47
50
## Configure git
48
51
49
- git config --global user.email <your email address>
50
- git config --global user.name "<your name>"
52
+ git config --global user.email <your email address>
53
+ git config --global user.name "<your name>"
51
54
52
55
## Fetch and build grpc
53
- git clone https://github.com/timburks/grpc
54
- cd grpc
55
- git submodule update --init
56
- git checkout swift
57
- make
58
- make install
56
+ git clone https://github.com/grpc/grpc-swift
57
+ cd grpc-swift
58
+ git submodule update --init
59
+ cd third_party/grpc
60
+ git submodule update --init
61
+ make
62
+ make install
59
63
60
64
## Build the gRPC packages
61
- cd src/swift/Packages/
62
- cd CgRPC; make; cd ..
63
- cd gRPC; make; cd ..
64
- cd Server; make; make install; cd ..
65
- cd Client; make; make install; cd ..
66
-
65
+ cd
66
+ cd grpc-swift/Packages
67
+ cd CgRPC; make; cd ..
68
+ cd gRPC; make; cd ..
69
+ cd Server; make; make install; cd ..
70
+ cd Client; make; make install; cd ..
71
+
67
72
It may be necessary to run ` make ` multiple times in the Server and Client directories.
68
73
If you see an error like the following, please retry running ` make ` .
69
74
@@ -77,8 +82,7 @@ If you see an error like the following, please retry running `make`.
77
82
No submodule mapping found in .gitmodules for path 'Packages/CgRPC-1.0.0'
78
83
error: Git 2.0 or higher is required. Please update git and retry.
79
84
make: *** [all] Error 1
80
-
85
+
81
86
## Run the test client and server from the grpc/src/swift/Packages directory:
82
- Server/Server &
83
- Client/Client
84
-
87
+ Server/Server &
88
+ Client/Client
0 commit comments