Skip to content

Commit

Permalink
Use latest r3bl_rs_utils crate, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
nazmulidris committed Aug 4, 2022
1 parent 390533c commit 4da4ba1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 13 deletions.
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# This crate is not published to crates.io.

[package]
name = "address_book_with_redux_tui"
version = "0.1.0"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down Expand Up @@ -30,7 +32,7 @@ serde_json = "1.0"
chrono = { version = "0.4.20", features = ["serde", "rustc-serialize"] }

# Get the latest version of r3bl_rs_utils from local fs and not github
r3bl_rs_utils = { version = "*", path = "../r3bl_rs_utils" }
r3bl_rs_utils = { version = "0.7.41", path = "../r3bl_rs_utils" }

# https://crates.io/crates/async-trait
async-trait = "0.1.57"
52 changes: 41 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# address-book-with-redux-tui
<a id="markdown-address-book-with-redux-tui" name="address-book-with-redux-tui"></a>


This is a CLI app that implements an immutable data structure that represents an address book. It
also has a rich text user interface. Mutations to this address book must happen via a Redux store,
Expand All @@ -7,28 +9,46 @@ and actions that are dispatched to it. Along w/ a reducer function.
This app is meant to be a pedagogical example of how to use the `r3bl_rs_utils` crate quite
comprehensively.

<hr/>

**Table of contents**

<!-- TOC -->

- [TODO](#todo)
- [Issues w/ loading shared libraries libssl.so.1.1 when running cargo run on Ubuntu 22.04](#issues-w-loading-shared-libraries-libsslso11-when-running-cargo-run-on-ubuntu-2204)
- [Problem w/ OpenSSL v1.1](#problem-w-openssl-v11)
- [Solution - install them manually](#solution---install-them-manually)

<!-- /TOC -->
<!-- /TOC -->

<hr/>

## TODO
<a id="markdown-todo" name="todo"></a>


- Change the simple terminal UI to use r3bl_rs_utils `tui` module
- Change the simple terminal UI to use r3bl_rs_utils `tui` module.
- You can find all the TODOs [here](./TODO.todo), and work completed [here](./DONE.todo).

## Issues w/ loading shared libraries `libssl.so.1.1` when running `cargo run` on Ubuntu 22.04
<a id="markdown-issues-w%2F-loading-shared-libraries-libssl.so.1.1-when-running-cargo-run-on-ubuntu-22.04" name="issues-w%2F-loading-shared-libraries-libssl.so.1.1-when-running-cargo-run-on-ubuntu-22.04"></a>


With Ubuntu / PopOS! 22.04 libssl v3 is installed by default. And the APT sources list for v1.1 is
removed. There are lots of libraries written in Rust that have dependencies on locally installed
`libssl.so.1.1` file.

> You search for this file using this command:
>
> ```bash
> fd -t f libssl.so.1.1 /usr/
> ```
### Problem w/ OpenSSL v1.1
<a id="markdown-problem-w%2F-openssl-v1.1" name="problem-w%2F-openssl-v1.1"></a>

> There is a case when installing `cargo outdated` where you can force it to build openssl 1.1 from
> source rather than using the system installed version. Here's the command to do this
> (`--features vendored-openssl`):

> Where is the `libssl.so.1.1` file? You can search for this file using this command (make sure you
> have `fd` installed via brew):
>
> ```bash
> cargo install --locked cargo-outdated --force --features vendored-openssl
> fd -t f libssl.so.1.1 /usr/
> ```
Here is a list of errors that we get:
Expand All @@ -38,7 +58,17 @@ Here is a list of errors that we get:
2. Passing `--features vendored-openssl` to `cargo build` doesn't do anything (the `libssl.so.1.1`
requirement must be in one of the underlying dependencies).
Here's how to solve the issue.
> For some crates, eg: `cargo-outdated`, you can force them to build openssl 1.1 from source rather
> than using the system installed version. Here's the command to do this
> (`--features vendored-openssl`):
>
> ```bash
> cargo install --locked cargo-outdated --force --features vendored-openssl
> ```
### Solution - install them manually
<a id="markdown-solution---install-them-manually" name="solution---install-them-manually"></a>
Download old versions of both libssl and libssl-dev from archive repository. Here's a
[so thread](https://unix.stackexchange.com/a/688289/302646) which points to the
Expand Down

0 comments on commit 4da4ba1

Please sign in to comment.