mimblewimble / grin-wallet

Grin Wallet
Apache License 2.0
185 stars 134 forks source link

grin-wallet error while loading shared libraries libssl.so.1.1 #651

Open noobvie opened 2 years ago

noobvie commented 2 years ago

Hello,

I've just built new Ubuntu 22.04 to run the lastest wallet but got error:

grin@publicfullnodegrin:~/grin-wallet$ ./grin-wallet init
./grin-wallet: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

Current my linux kernel verison:

grin@publicfullnodegrin:~/grin-wallet$ uname -a
Linux publicfullnodegrin 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Anyone have any ideas? Thank you,

cliik commented 2 years ago

Can you confirm you have libssl-dev installed?

apt list --installed | grep libssl-dev
noobvie commented 2 years ago

I tried the command and here is the result

grinviet@publicfullnodegrin:~$ apt list --installed | grep libssl-dev

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libssl-dev/jammy-updates,jammy-security,now 3.0.2-0ubuntu1.5 amd64 [installed]
cliik commented 2 years ago

hmm, did you compile grin-wallet yourself, or did you use one of the release binaries. If you haven't already, you may try compiling yourself.

Can you share the version number you are running?

grin-wallet -V

And share the commit hash if you compiled yourself.

cd /path/to/your/grin/repo
git rev-parse HEAD

I've just built new Ubuntu 22.04

Do you mean to say you built your own Ubuntu image, or that you built a new machine running an official Ubuntu 22.04 release? I run Arch and don't currently have any Ubuntu machines to attempt to reproduce your situation. If I can find another computer next week, I'll install Ubuntu 22.04 and attempt to reproduce your issue.

noobvie commented 2 years ago

Here it is

grinviet@publicfullnodegrin:~/grin-wallet$ ./grin-wallet -V
./grin-wallet: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

I downloaded grin-wallet binary, not compile. Actually I got the image from ubuntu server (https://releases.ubuntu.com/22.04/ubuntu-22.04-live-server-amd64.iso) and installed it.

cliik commented 2 years ago

I've attained a computer to reproduce your issue.

Steps to reproduce the problem

I've done the following steps:

After these steps, I was able to reproduce your error :detective: :

$ ./grin-wallet -V
./grin-wallet: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

Attempts to fix the problem

Next, I applied all system updates and installed the build/dev dependencies giving in the grin build docs:

sudo apt update
sudo apt upgrade
apt install build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvm
sudo reboot now

but still see the same error as you when attempting to use the grin-wallet binary :x:

Next I installed Rust (via https://rustup.rs), cloned the grin-wallet repo, checked out v5.1.0 tag, and performed a release build:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
git clone https://github.com/mimblewimble/grin-wallet.git
cd grin-wallet
git checkout v5.1.0
cargo build --release

This fixed the issue :heavy_check_mark: Using the local build of grin-wallet works as expected:

$ ./target/release/grin-wallet -V
grin-wallet 5.1.0

Temporary workaround for you

Just build the binary from source for now. You can follow the steps I shared above, if you are not familiar with this process.

Long-term fix

I see the latest release build is ~1.5 years old, older than this version of Ubuntu. I suspect updating the build system and releasing a new binary (perhaps at the next release?) will resolve the issue going forwards. I'm not sure we want to get in the habit of recompiling old releases every time Canonical cuts a new Ubuntu release (let alone other distros), but maybe its warranted for the latest release if no new release is scheduled soon? @quentinlesceller @phyro @yeastplume do you have any thoughts here?

yeastplume commented 2 years ago

All correct, we need package maintainers for individual distros. We did try to set something up earlier where an individual could volunteer to be the maintainer for a particular distro, but we don't have enough hands at the moment to tackle that properly. If someone could take on the ubuntu/deb maintenance role, that would be a great help.

cliik commented 2 years ago

If someone could take on the ubuntu/deb maintenance role, that would be a great help.

Can you point me in the correct direction to pick this effort back up? I can probably commit to maintaining Arch, Debian, & Ubuntu releases, assuming this is an infrequent maintenance task and not a full-time job :sweat_smile:

For the sake of closing this ticket (I'm on a mission to reduce our backlog :muscle:), what is the preferred resolution? 1) wait for next release to contain recent builds which work on recent distro releases? 2) rebuild the Debian/Ubuntu build and update the latest release? Can we trigger a CI action to accomplish this, or is this a manual process for now? cc @quentinlesceller

yeastplume commented 2 years ago

That's really great to hear, appreciate it.

I'm not yet sure when the next release is planned for, but we can definitely ensure all the CI infrastructure is building with the latest everything and trigger a few builds. Quentin is looking into updating the build infrastructure, so it might be good to coordinate with him.