Skip to content

Commit c80e62b

Browse files
authored
Fixing build instructions (#59)
1 parent bc3dc79 commit c80e62b

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,42 @@ This library is licensed under the Apache 2.0 License.
99
## Usage
1010

1111
### Building
12+
13+
#### Building s2n (Linux Only)
14+
15+
If you are building on Linux, you will need to build s2n before being able to build aws-c-io. For our CRT's, we build s2n at a specific commit, and recommend doing the same when using it with this library. That commit hash can be found [here](https://github.com/awslabs/aws-crt-cpp/tree/main/crt). The commands below will build s2n using OpenSSL 1.1.1. For using other versions of OpenSSL, there is additional information in the [s2n Usage Guide](https://github.com/awslabs/s2n/blob/main/docs/USAGE-GUIDE.md).
16+
17+
```
18+
git clone [email protected]:awslabs/s2n.git
19+
cd s2n
20+
git checkout <s2n-commit-hash-used-by-aws-crt-cpp>
21+
22+
# We keep the build artifacts in the -build directory
23+
cd libcrypto-build
24+
25+
# Download the latest version of OpenSSL
26+
curl -LO https://www.openssl.org/source/openssl-1.1.1-latest.tar.gz
27+
tar -xzvf openssl-1.1.1-latest.tar.gz
28+
29+
# Build openssl libcrypto. Note that the install path specified here must be absolute.
30+
cd `tar ztf openssl-1.1.1-latest.tar.gz | head -n1 | cut -f1 -d/`
31+
./config -fPIC no-shared \
32+
no-md2 no-rc5 no-rfc3779 no-sctp no-ssl-trace no-zlib \
33+
no-hw no-mdc2 no-seed no-idea enable-ec_nistp_64_gcc_128 no-camellia\
34+
no-bf no-ripemd no-dsa no-ssl2 no-ssl3 no-capieng \
35+
-DSSL_FORBID_ENULL -DOPENSSL_NO_DTLS1 -DOPENSSL_NO_HEARTBEATS \
36+
--prefix=<absolute-install-path>
37+
make
38+
make install
39+
40+
# Build s2n
41+
cd ../../../
42+
cmake -DCMAKE_PREFIX_PATH=<install-path> -DCMAKE_INSTALL_PREFIX=<install-path> -S s2n -B s2n/build
43+
cmake --build s2n/build --target install
44+
```
45+
46+
#### Building aws-c-event-stream and Remaining Dependencies
47+
1248
Note that aws-c-event-stream has several dependencies:
1349

1450
```
@@ -20,6 +56,14 @@ git clone [email protected]:awslabs/aws-checksums.git
2056
cmake -DCMAKE_PREFIX_PATH=<install-path> -DCMAKE_INSTALL_PREFIX=<install-path> -S aws-checksums -B aws-checksums/build
2157
cmake --build aws-checksums/build --target install
2258
59+
git clone [email protected]:awslabs/aws-c-cal.git
60+
cmake -DCMAKE_PREFIX_PATH=<install-path> -DCMAKE_INSTALL_PREFIX=<install-path> -S aws-c-cal -B aws-c-cal/build
61+
cmake --build aws-c-cal/build --target install
62+
63+
git clone [email protected]:awslabs/aws-c-io.git
64+
cmake -DCMAKE_PREFIX_PATH=<install-path> -DCMAKE_INSTALL_PREFIX=<install-path> -S aws-c-io -B aws-c-io/build
65+
cmake --build aws-c-io/build --target install
66+
2367
git clone [email protected]:awslabs/aws-c-event-stream.git
2468
cmake -DCMAKE_PREFIX_PATH=<install-path> -DCMAKE_INSTALL_PREFIX=<install-path> -S aws-c-event-stream -B aws-c-event-stream/build
2569
cmake --build aws-c-event-stream/build --target install

0 commit comments

Comments
 (0)