Skip to content
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

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

Open
wtogami opened this issue Sep 20, 2024 · 10 comments
Open

Comments

@wtogami
Copy link

wtogami commented Sep 20, 2024

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 [email protected]/com.sparrowwallet.sparrow.io.Hwi.getProcessOutput(Unknown Source)
	at [email protected]/com.sparrowwallet.sparrow.io.Hwi.execute(Unknown Source)
	at [email protected]/com.sparrowwallet.sparrow.io.Hwi.enumerateUsb(Unknown Source)
	at [email protected]/com.sparrowwallet.sparrow.io.Hwi.enumerate(Unknown Source)
	at [email protected]/com.sparrowwallet.sparrow.io.Hwi$ScheduledEnumerateService$1.call(Unknown Source)
	at [email protected]/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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Author

wtogami commented Sep 20, 2024

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
Copy link
Collaborator

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
Copy link
Author

wtogami commented Sep 23, 2024

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
Copy link
Collaborator

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.

@heredia21
Copy link

What was the fix for this? Getting:

[634028] Error loading Python lib '/tmp/_MEIQfozMe/libpython3.9.so.1.0': dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory

Already ran/installed:

sudo dnf install libxcrypt-compat

Running Fedora 41.

@craigraw
Copy link
Collaborator

craigraw commented Nov 3, 2024

Yes, that was/is the fix. Did it install without issues? Here's the Fedora 41 rpm: https://fedora.pkgs.org/41/fedora-x86_64/libxcrypt-compat-4.4.36-7.fc41.i686.rpm.html

@heredia21
Copy link

heredia21 commented Nov 3, 2024

It installed without issue but the error/issue persists.

[634028] Error loading Python lib '/tmp/_MEIQfozMe/libpython3.9.so.1.0': dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory

With libxcrypt-compat installed.

@craigraw
Copy link
Collaborator

craigraw commented Nov 3, 2024

Difficult to say exactly, but it sounds like it there may be an issue loading the library. I recommend trying to find the libcrypt.so.1 file, and then making sure the system can load it with ldd /path/to/libcrypt.so.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants