sparrowwallet / sparrow

Desktop Bitcoin Wallet focused on security and privacy. Free and open source.
https://sparrowwallet.com/
Apache License 2.0
1.32k stars 188 forks source link

Regression: 2.0.0 RPM can't dlopen libcrypt.so.1, 1.9.1 previously worked #1504

Open wtogami opened 1 month ago

wtogami commented 1 month ago

sparrow-2.0.0-1.x86_64.rpm installed on Fedora 40 x86-64 can't dlopen libcrypt.so.1 so HWI does not work.

sparrow-1.9.1-1.x86_64.rpm works fine. Unclear what is different between the two builds.

java.io.IOException: [7751] Error loading Python lib '/tmp/_MEIZJ4eAV/libpython3.9.so.1.0': dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory

    at com.sparrowwallet.sparrow@2.0.0/com.sparrowwallet.sparrow.io.Hwi.getProcessOutput(Unknown Source)
    at com.sparrowwallet.sparrow@2.0.0/com.sparrowwallet.sparrow.io.Hwi.execute(Unknown Source)
    at com.sparrowwallet.sparrow@2.0.0/com.sparrowwallet.sparrow.io.Hwi.enumerateUsb(Unknown Source)
    at com.sparrowwallet.sparrow@2.0.0/com.sparrowwallet.sparrow.io.Hwi.enumerate(Unknown Source)
    at com.sparrowwallet.sparrow@2.0.0/com.sparrowwallet.sparrow.io.Hwi$ScheduledEnumerateService$1.call(Unknown Source)
    at com.sparrowwallet.sparrow@2.0.0/com.sparrowwallet.sparrow.io.Hwi$ScheduledEnumerateService$1.call(Unknown Source)
    at javafx.graphics@22/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at javafx.graphics@22/javafx.concurrent.Service.lambda$executeTask$6(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at javafx.graphics@22/javafx.concurrent.Service.lambda$executeTask$7(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
2024-09-19 23:38:27,221 ERROR Error executing hwi-3.1.0
craigraw commented 1 month ago

The difference is an upgrade from HWI 3.0.0 to HWI 3.1.0.

Can you try downloading hwi-3.1.0-linux-x86_64.tar.gz from https://github.com/bitcoin-core/HWI/releases/tag/3.1.0. Extract hwi and run

./hwi enumerate
craigraw commented 1 month ago

I managed to reproduce the issue on Fedora 39 and solved it by running

sudo dnf install libxcrypt-compat

(from https://tex.stackexchange.com/questions/493231/biber-missing-libcrypt-so-1-library-on-fedora)

Please let me know if this fixes it on your side.

wtogami commented 1 month ago

rpm spec syntax

Requires: %{_libdir}/libcrypt.so.1

This syntax should automatically pull in necessary libgcrypt or compat package without knowing the package name within your distro.

Where is your rpm spec file? I couldn't find it so I didn't test this spec syntax.

craigraw commented 3 weeks ago

Where is your rpm spec file?

The rpm spec file for Sparrow is automatically generated, but since this is a dependency for HWI, not Sparrow, it's not included.

wtogami commented 3 weeks ago

The rpm spec file for Sparrow is automatically generated, but since this is a dependency for HWI, not Sparrow, it's not included.

Your end users don't know the difference between Sparrow and HWI. Your error message could detect this particular HWI failure and tell the user what they're missing, they should read a particular URL or something for instructions on how to fix it.

craigraw commented 3 weeks ago

Your end users don't know the difference between Sparrow and HWI.

Yes, I'm aware of that - I was just explaining the situation. This appears to be a recent change in HWI. I'm still considering how to address it.