-
Notifications
You must be signed in to change notification settings - Fork 67
SWIFT-696 Update installation instructions to mention required system libraries #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,19 +37,12 @@ Core Server (i.e. SERVER) project are **public**. | |
|
|
||
| Installation is supported via [Swift Package Manager](https://swift.org/package-manager/). | ||
|
|
||
| ### Step 1: Install the MongoDB C Driver | ||
| The driver wraps the MongoDB C driver, and using it requires having the C driver's two components, `libbson` and `libmongoc`, installed on your system. **The minimum required version of the C Driver is 1.15.3**. | ||
| ### Step 1: Install required system libraries (Linux Only) | ||
| The driver vendors and wraps the MongoDB C driver (`libmongoc`), which depends on a number of external C libraries when built in Linux environments. As a result, these libraries must be installed on your system in order to build MongoSwift. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I decided to just keep relying on libmongoc's instructions so that we don't have to update this all the time. The one caveat with that is that it includes cmake as a dependency, which isn't necessary for us. That doesn't seem like too big of a deal to me though. |
||
|
|
||
| *On a Mac*, you can install both components at once using [Homebrew](https://brew.sh/): | ||
| `brew install mongo-c-driver`. | ||
|
|
||
| *On Linux*: please follow the [instructions](http://mongoc.org/libmongoc/current/installing.html#building-on-unix) from `libmongoc`'s documentation. Note that the versions provided by your package manager may be too old, in which case you can follow the instructions for building and installing from source. | ||
|
|
||
| See example installation from source on Ubuntu in [Docker](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Docker). | ||
| To install those libraries, please follow the [instructions](http://mongoc.org/libmongoc/current/installing.html#prerequisites-for-libmongoc) from `libmongoc`'s documentation. | ||
|
|
||
| ### Step 2: Install MongoSwift | ||
| *Please follow the instructions in the previous section on installing the MongoDB C Driver before proceeding.* | ||
|
|
||
| Add MongoSwift to your dependencies in `Package.swift`: | ||
|
|
||
| ```swift | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libmongoc only lists dependencies for linux, since I think the tls stuff is built into SecureTransport and macos appears to ship with sasl2.