AppImageCommunity / libappimage

Implements functionality for dealing with AppImage files
https://appimage.org
Other
46 stars 29 forks source link

Error message about failed dlopen should include a hint about 32-bit vs 64-bit version #156

Open bomm opened 2 years ago

bomm commented 2 years ago

There are several reported issues or support requests for packaged applications related to the error message from the LOAD_LIBRARY macro in https://github.com/AppImage/libappimage/blob/master/src/patches/squashfuse_dlopen.h with the additional message from https://github.com/AppImage/libappimage/blob/master/src/patches/squashfuse_dlopen.c .

The error message dlopen(): error loading libfuse.so.2 is a bit confusing when the library seems to be installed on the local system. Unfortunately the message does not tell if the AppImage searched for a 32-bit version of the library or where it searched for the library when it is run on a 64-bit system which might have a 64-bit version of the library.

I suggest to add a hint about this possible cause to the message in load_library_errmsg.

Example:

const char *load_library_errmsg =
  "AppImages require FUSE to run.  This error can also occur when \n"
  "you try to run a 32-bit AppImage on a 64-bit system. \n"
  "You might still be able to extract the contents of this AppImage \n"
  "if you run it with the --appimage-extract option. \n"
  "See https://github.com/AppImage/AppImageKit/wiki/FUSE \n"
  "for more information\n";

Example for a related issue: https://github.com/balena-io/etcher/issues/3574

TheAssassin commented 2 years ago

I think this is a niche problem, and what needs to be updated is the docs. This section should list this issue as another potential cause for the problem. Furthermore, that outdated wiki page should be replaced by a stable docs link. The less text in the error message, the better. Many modern CLI tools directly point to a docs URL that contains well-formatted and comprehensive on possible causes and solutions resp. workarounds.

Almost one and a half years ago I suggested setting up a redirector (e.g., with https://github.com/TheAssassin/redirector, which I actually had developed for AppImage but then used in other projects like Blue Nebula...) to be able to provide stable links which can be included in such texts and allow us to change the redirection targets while maintaining the original links. It's the main excuse to maintain this annoying outdated wiki instead of the proper docs.