-
Notifications
You must be signed in to change notification settings - Fork 88
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
Attempting to load liblibfuse.so.2.so #81
Comments
Hey, @overheadhunter! Thanks for noticing, I'll take a look into this. Interestingly, it works well on CI without any issues. |
I think, one of the possible explanations is that jnr used to fail to "identify" the OS, so the switch would fall through to the default section. |
Possibly. We distribute our software as an Appimage which has some different environment variables that might cause the app to use the default branch of that switch-statement... 🤔 |
Hey, @overheadhunter! From looking at https://github.com/jnr/jnr-ffi/blob/master/src/main/java/jnr/ffi/provider/jffi/NativeLibrary.java#L79, it seems like the first call should be end up calling I'll add a fallback call to try |
@overheadhunter As a quick workaround, you could try something like the following with the current version: LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/full/path/to/libfuse.so.2" java -cp ... |
Hey, @overheadhunter! Could you verify the fix from master? If it fixes the issue, I can publish a new version. |
But this assumes that I will do some experiments with both, the |
I just started my debugger with a breakpoint in this line and found out that files inside This lead me to the assumption that Playing around with
I cloned your repo and built 0.5.4-SNAPSHOT. Behaviour is unchanged. I set a breakpoint here and could see that this branch the fallback routine was triggered but threw an UnsatisfiedLinkError itself. Sadly the fix doesn't help. That doesn't mean that you should rollback you change, at least it will now construct the correct regex. Also, I verified that it works correctly on non-Flatpak environments. I believe the root cause is somewhere else. Feel free to close this issue, as I have a feeling there is nothing you can do about it as long as fuse doesn't work inside Flatpak's sandbox... |
I just noticed that the
lib
prefix as well as the.so
suffix is appended twice when you attempt to load the fuse library on Linux here:jnr-fuse/src/main/java/ru/serce/jnrfuse/AbstractFuseFS.java
Lines 41 to 43 in 0f533a2
You pass in the full file name to jnr.ffi, which will then try to find a file named
liblibfuse.so.2.so(.[0-9]+)?
.I think it is best to just invoke
loader.load("fuse");
on Linux.At the same time I'm wondering how it could have ever been working before (which it did). This doesn't make any sense to me.
Workaround:
ln -s libfuse.so.2 liblibfuse.so.2.so
not feasible for endusers, but helps me during development until this is fixed 😉The text was updated successfully, but these errors were encountered: