1- # AWS C Libraries Build Guide
1+ # Build Guide
22
3- This guide provides instructions for building the AWS C libraries required for S3 integration .
3+ This guide provides instructions for building all required dependencies for the EmbeddingBridge project .
44
55## Prerequisites
66
77- CMake 3.9+
88- C/C++ compiler (GCC 4.9+ or Clang 3.3+)
99- Git
10+ - Python 3.6+ (for Arrow Python bindings)
11+ - pkg-config
1012
11- ## Build Order
13+ ## Quick Start
14+
15+ Run the build scripts from the project root directory:
16+
17+ ``` bash
18+ # Build all dependencies
19+ ./scripts/build_aws.sh
20+ ./scripts/build_arrow.sh
21+
22+ # Build npy_array
23+ cd vendor/npy_array
24+ ./configure
25+ make
26+ sudo make install
27+ cd ../..
28+ ```
29+
30+ ## Apache Arrow
31+
32+ Apache Arrow provides columnar data structures and is required for Parquet file support.
33+
34+ ### Build Arrow
35+
36+ ``` bash
37+ ./scripts/build_arrow.sh
38+ ```
39+
40+ This script will:
41+ - Download and build Apache Arrow C++ libraries
42+ - Install to ` /usr/local ` by default
43+ - Build with Parquet, CSV, and dataset support
44+ - Optionally build GLib bindings with ` --with-glib ` flag
45+
46+ ## NPY Array Library
47+
48+ The npy_array library provides C support for reading/writing NumPy arrays.
49+
50+ ### Build npy_array
51+
52+ ``` bash
53+ cd vendor/npy_array
54+ ./configure --prefix=/usr/local
55+ make
56+ sudo make install
57+ ```
58+
59+ For more configuration options:
60+ ``` bash
61+ cd vendor/npy_array
62+ ./configure --help
63+ ```
64+
65+ ## AWS C Libraries
66+
67+ AWS C libraries are required for S3 integration.
68+
69+ ### Build Order
1270
1371The libraries must be built in the following order due to dependencies:
1472
@@ -24,15 +82,21 @@ The libraries must be built in the following order due to dependencies:
248210 . ** aws-c-auth** - Authentication and credentials management
258311 . ** aws-c-s3** - S3 service client
2684
27- ## Build Steps
85+ ### Quick Build
86+
87+ ``` bash
88+ ./scripts/build_aws.sh
89+ ```
90+
91+ ### Manual Build Steps
2892
29- ### 1. Set up the directory structure
93+ #### 1. Set up the directory structure
3094
3195``` bash
3296mkdir -p vendor/aws/install
3397```
3498
35- ### 2. AWS-LC (LibCrypto)
99+ #### 2. AWS-LC (LibCrypto)
36100
37101``` bash
38102cd vendor/aws
@@ -42,7 +106,7 @@ cmake -S vendor/aws/aws-lc -B vendor/aws/aws-lc/build -DCMAKE_INSTALL_PREFIX=$(p
42106cmake --build vendor/aws/aws-lc/build --target install
43107```
44108
45- ### 3. s2n-tls
109+ #### 3. s2n-tls
46110
47111``` bash
48112cd vendor/aws
@@ -52,7 +116,7 @@ cmake -S vendor/aws/s2n-tls -B vendor/aws/s2n-tls/build -DCMAKE_INSTALL_PREFIX=$
52116cmake --build vendor/aws/s2n-tls/build --target install
53117```
54118
55- ### 4. aws-c-common
119+ #### 4. aws-c-common
56120
57121``` bash
58122cd vendor/aws
@@ -62,7 +126,7 @@ cmake -S vendor/aws/aws-c-common -B vendor/aws/aws-c-common/build -DCMAKE_INSTAL
62126cmake --build vendor/aws/aws-c-common/build --target install
63127```
64128
65- ### 5. aws-checksums
129+ #### 5. aws-checksums
66130
67131``` bash
68132cd vendor/aws
@@ -72,7 +136,7 @@ cmake -S vendor/aws/aws-checksums -B vendor/aws/aws-checksums/build -DCMAKE_INST
72136cmake --build vendor/aws/aws-checksums/build --target install
73137```
74138
75- ### 6. aws-c-cal
139+ #### 6. aws-c-cal
76140
77141``` bash
78142cd vendor/aws
@@ -82,7 +146,7 @@ cmake -S vendor/aws/aws-c-cal -B vendor/aws/aws-c-cal/build -DCMAKE_INSTALL_PREF
82146cmake --build vendor/aws/aws-c-cal/build --target install
83147```
84148
85- ### 7. aws-c-io
149+ #### 7. aws-c-io
86150
87151``` bash
88152cd vendor/aws
@@ -92,7 +156,7 @@ cmake -S vendor/aws/aws-c-io -B vendor/aws/aws-c-io/build -DCMAKE_INSTALL_PREFIX
92156cmake --build vendor/aws/aws-c-io/build --target install
93157```
94158
95- ### 8. aws-c-compression
159+ #### 8. aws-c-compression
96160
97161``` bash
98162cd vendor/aws
@@ -102,7 +166,7 @@ cmake -S vendor/aws/aws-c-compression -B vendor/aws/aws-c-compression/build -DCM
102166cmake --build vendor/aws/aws-c-compression/build --target install
103167```
104168
105- ### 9. aws-c-http
169+ #### 9. aws-c-http
106170
107171``` bash
108172cd vendor/aws
@@ -112,7 +176,7 @@ cmake -S vendor/aws/aws-c-http -B vendor/aws/aws-c-http/build -DCMAKE_INSTALL_PR
112176cmake --build vendor/aws/aws-c-http/build --target install
113177```
114178
115- ### 10. aws-c-sdkutils
179+ #### 10. aws-c-sdkutils
116180
117181``` bash
118182cd vendor/aws
@@ -122,7 +186,7 @@ cmake -S vendor/aws/aws-c-sdkutils -B vendor/aws/aws-c-sdkutils/build -DCMAKE_IN
122186cmake --build vendor/aws/aws-c-sdkutils/build --target install
123187```
124188
125- ### 11. aws-c-auth
189+ #### 11. aws-c-auth
126190
127191``` bash
128192cd vendor/aws
@@ -132,7 +196,7 @@ cmake -S vendor/aws/aws-c-auth -B vendor/aws/aws-c-auth/build -DCMAKE_INSTALL_PR
132196cmake --build vendor/aws/aws-c-auth/build --target install
133197```
134198
135- ### 12. aws-c-s3
199+ #### 12. aws-c-s3
136200
137201``` bash
138202cd vendor/aws
@@ -145,26 +209,13 @@ cmake --build vendor/aws/aws-c-s3/build --target install
145209## Using the Libraries
146210
147211After building, the libraries and headers will be installed in:
148- - Libraries: ` vendor/aws/install/lib/ `
149- - Headers: ` vendor/aws/install/include/ `
150- - Executables: ` vendor/aws/install/bin/ `
212+ - AWS Libraries: ` vendor/aws/install/lib/ `
213+ - AWS Headers: ` vendor/aws/install/include/ `
214+ - Arrow Libraries: ` /usr/local/lib/ ` (or custom prefix)
215+ - npy_array: ` /usr/local/lib/ ` (or custom prefix)
151216
152217To test if everything is working correctly, run:
153218
154219``` bash
155220vendor/aws/install/bin/s3 --help
156- ```
157-
158- ## Linking in CMake Projects
159-
160- To use these libraries in a CMake project, add the following to your CMakeLists.txt:
161-
162- ``` cmake
163- set(AWS_LIBRARIES_DIR "${CMAKE_SOURCE_DIR}/vendor/aws/install")
164- set(CMAKE_PREFIX_PATH "${AWS_LIBRARIES_DIR};${CMAKE_PREFIX_PATH}")
165-
166- find_package(aws-c-s3 REQUIRED)
167-
168- # Link your target with AWS libraries
169- target_link_libraries(your_target PRIVATE AWS::aws-c-s3)
170- ```
221+ ```
0 commit comments