Skip to content

Commit

Permalink
Fix linker errors related to openssl on Ubuntu 22.04. (#355)
Browse files Browse the repository at this point in the history
Update instructions and brewfile for macOS.

Co-authored-by: Brian <brian.william.corbin@gmail.com>
  • Loading branch information
christian-oudard and briancorbin authored Jun 7, 2022
1 parent 2dfd89b commit b5b8c32
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ brew 'cmake'
brew 'go'
brew 'llvm'
brew 'protobuf'
brew 'openssl'
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ x25519-dalek = { git = "https://github.com/mobilecoinfoundation/x25519-dalek.git

# Override diesel dependency with our fork, in order to use a version of libsqlite3-sys that has bundled-sqlcipher. This allows us to
# statically link SQLite.
diesel = { git = "https://github.com/mobilecoinofficial/diesel", rev = "22a4a4b973db2b7aadaf088b3279dbbe52176896" }
diesel = { git = "https://github.com/mobilecoinofficial/diesel", rev = "026f6379715d27c8be48396e5ca9059f4a263198" }
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ sudo xcode-select -s /Applications/<name of xcode application>.app/Contents/Deve
brew bundle
```

After openSSL has been installed with brew on MacOS, you may need to set some environment variables to allow the rust compiler to find openSSL

```
PATH="/usr/local/opt/openssl@3/bin:$PATH"
LDFLAGS="-L/usr/local/opt/openssl@3/lib"
CPPFLAGS="-I/usr/local/opt/openssl@3/include"
PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"
```

4. Pull submodule.

```sh
Expand Down
6 changes: 3 additions & 3 deletions full-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ mc-util-uri = { path = "../mobilecoin/util/uri" }
base64 = "0.13.0"
chrono = { version = "0.4", default-features = false, features = ["alloc"] }
crossbeam-channel = "0.5"
diesel = { version = "1.4.6", features = ["sqlcipher-bundled"] }
diesel = { version = "1.4.8", features = ["sqlcipher-bundled"] }
diesel-derive-enum = { version = "1", features = ["sqlite"] }
diesel_migrations = { version = "1.4.0", features = ["sqlite"] }
displaydoc = {version = "0.2", default-features = false }
dotenv = "0.15.0"
grpcio = "0.9.0"
grpcio = { version ="0.9.0", default-features = false, features = [ "openssl" ] }
hex = {version = "0.4", default-features = false }
num_cpus = "1.12"
rand = { version = "0.8", default-features = false }
Expand All @@ -78,6 +78,6 @@ bs58 = "0.4.0"

[build-dependencies]
# clippy fails to run without this.
diesel = { version = "1.4.6", features = ["sqlite-bundled"] }
diesel = { version = "1.4.8", features = ["sqlcipher-bundled"] }
vergen = "7.0.0"
anyhow = "1.0"

0 comments on commit b5b8c32

Please sign in to comment.