How do I install the Linux Raw Therapee appimage without libthai.so?

This, based on what I’ve seen, is a common problem. The Raw Therapee appimage for Linux wants a shared lib called libthai.so which it seems a whole lot of people (including me) don;t have.

So how do we use the appimage without libthai ? Is there a command-line option to exclude the need for that shared lib? Or is there an appimage that we’re not finding that either includes all of the shared libs it needs OR doesn’t require libthai to begin with?

Thanks

If you are on a yum based system you could use the wbatprovides command to find which rpm has the lib file.

On Fedora 38 I have:

$ rpm -qa|grep thai
thai-scalable-fonts-common-0.7.3-5.fc38.noarch
libthai-0.1.29-4.fc38.x86_64
libthai-devel-0.1.29-4.fc38.x86_64
thai-scalable-waree-fonts-0.7.3-5.fc38.noarch
libthai-0.1.29-4.fc38.i686

Though I build RT from sources to have the latest version

I’m using Slackware with no libthai. The appimage, being a complete independent package, has libthai, but is still insisting on an external copy. How do I get it to use its own instead or simply to work without libthai (I don’t speak Thai, except in cooking (e.g., gai pad khing) and chillis (e.g., prik ki nu). I just need to get Raw Therapee up and running. I’ll try the source. But if anyone can tell me how to use the appimage without it needing an external libthai, that would make it considerably simpler.

Thanks

What is the actual error message?

Does the error happen immediately when you try to run RT or at some point later?

What does ldd say, when run on the RT executable?

The app is not packaged properly, contact the maintainer.

1 Like

This is the full error message, including (just for the hell of it) the zsh error.

/tmp/.mount_rawthe5goDdt/AppRun.wrapped: error while loading shared libraries: 1
libthai.so.0: cannot open shared object file: No such file or directory
zsh: exit 127 rawtherapee

Ok. You say:

The appimage, being a complete independent package, has libthai,

Since you know that, you must have a way to look “into” an AppImage. If you can do that, can you see if:

  • is there actually a file libthai.so.0 ? If it is a symlink (it probably is), what is its target?
  • is it in a place similar to all the other internal shared libs?

But as @rodlie says, this is clearly a bug in the AppImage one way or another, we’re
just doing the packagers’ work for them ATP.


Ian

You can unpack an appimage by running the appimage in a terminal with the switch --appimage-extract

No libthai.so.0 that I can find, there is a im-thai.so Looks like this:

https://i.imgur.com/8RtGUAn.jpg

edit: Catch 22, of course that is not possible when libthai is missing.

Using kubuntu 20.04 and RawTherappee_5.9 appimage.

Since I can unpack it, it is also possible to re-pack it with the libthai.so.0 (libthai.so.0.3.1 renamed) added.

Disabling my system libthai.so.0 (by renaming and that stops a few other things such as my regular file manager) and rebuilt RT works here.

The official appimage

rich@rich-nova2:~/Project$ ./RawTherapee_5.9.AppImage
/tmp/.mount_RawTheK8wAQh/AppRun.wrapped: error while loading shared libraries: libthai.so.0: cannot open shared object file: No such file or directory

The rebuilt appimage

rich@rich-nova2:~/Project$ ./RawTherapee-x86_64.AppImage
embedded profile is not an RGB profile, using sRGB as input profile
rich@rich-nova2:~/Project$

If you want to try the rebuild version then it is zipped here:

https://u.pcloud.link/publink/show?code=XZkXwrVZYRuANN8QrOBBAvD1t6EVpJxAFD9k

No guarantee that it works, there is a long list of blacklisted dependencies that appimage assumes installed. Might fail with something else.

Thanks. I was about to give up on Raw Therapee. And it looks like I still might. Missing libdatrie.so.1. I’m not even sure if I need it anymore. I used to use it when I made/sold handmade jewelry for product photos. That home business died the instant COVID 19 hit.

Now the biggest photography app I use, for astrophotography), is Siril.

Thanks anyways. I’m removing Raw Therapee from my install-me list (as I’m rebuilding this Slackware system).

Thanks

Yes, chasing dependencies is no fun…best find something else

Use the flatpak, it works

The app image is made by someone else that is not really RT involved i believe. See if there is an official version (like the flatpak someone mentioned ) .

Or give up, that’s perfectly fine :). As long as you understand Rawtherapee has nothing to do with this :).

This looks quite involved.

There are also nightly AppImages at GH.

But I haven’t seen any info where OP got their AppImage from.

The RT 5.9 appimage comes from the RT download page, so you cannot say that RT has nothing to do with the 5.9 appimage not working when used with (say) slackware.
For other than more usual linux distros there are dependencies missing starting with libthai.so.0 and who knows what else. Chasing dependencies to get it working might be finding one or two files or it might be dozens. For slackware it might be easier compiling RT from source, don’t know, last looked at slackware 20 years ago.

edit: There is this: SlackBuilds.org - rawtherapee

Flatpaks ? sandboxed / bloat , personally not keen on them.

The AppImage build script uses linuxdeploy to bundle the required dependencies. libthai.so.0 is explicitly excluded by linuxdeploy as it apparently causes issues on openSUSE Tumbleweed:

libthai.so.0
# Workaround for:
# audacity: /tmp/.mount_AudaciUsFbON/usr/lib/libthai.so.0: version `LIBTHAI_0.1.25' not found (required by /usr/lib64/libpango-1.0.so.0)
# on openSUSE Tumbleweed

(from https://github.com/AppImageCommunity/pkg2appimage/blob/master/excludelist)

I suppose we could have an AppImage specifically for Slackware that has libthai.so.0 (and any other missing libraries) included. I’ll need to read the documentation to figure out how to do that and I’ll also need help testing it from someone who has a Slackware environment.

By the way, the AppImage does have libdatrie.​so.​1.

And that’s the problem. Don’t use things like linuxdeploy etc (what to exclude/include is broken).

No. A bad AppImage breaks on distro X and instead of fixing it they block the library.

Never ever depend on system pango, bundle your own… And this is the reason many (most) AppImage break (at some point).


The AppImage concept is ok, as in distributing a read-only executable ISO. The rest is broken (the tools many use to make AppImages).

Check! Then a post earlier in the thread isn’t really correct that said something like that.

I stand corrected!

To clarify, I’m not saying libthai doesn’t play well with openSUSE. I’m talking in the context of linuxdeploy. In other words, supposedly there is a combination of libraries and versions bundled by linuxdeploy which does not work on a particular OS when libthai is in the AppImage, but does work when excluded. Also, the official RawTherapee AppImage does include libpango.

The last part where you say the AppImage concept is ok but everything else is broken, I initially took that to mean one should avoid AppImage tools or at least be careful with them when building AppImages. I realized it could also mean AppImages are good in concept, but bad in practice. Could you explain what you mean here? If AppImages are ok, how does one go about learning best practices and how to create AppImages correctly? I’m particularly interested in learning this because the official AppImage documentation features linuxdeploy prominently and it looks like the people from the AppImage team are the ones maintaining linuxdeploy and the exclude list. It’s really surprising if the AppImage people aren’t good at building AppImages themselves.

2 Likes