[SOLVED] LensFun missing in RT 5.8 Linux AppImage?

It seems as if the official RawTherapee 5.8 Linux AppImage is missing the Lensfun database (which looks as if it could be the same bug as with the initial Windows installer).

In the menu “Profiled Lens Correction”, lenses are neither automatically detected, nor is it possible to manually select a camera/lens combination.

Lensfun is installed on my system (Debian 10) via the system package manager, with the following packages:

liblensfun-bin       0.3.2-4
liblensfun-data-v1   0.3.2-4
liblensfun-dev       0.3.2-4
liblensfun1:amd64    0.3.2-4

However, this doesn’t fix the problem, and the RT 5.8 AppImage doesn’t seem to ‘see’ those libraries.

Welcome @cantsin

You can find all useful information about Rawtherapee at http://rawpedia.rawtherapee.com

I am not a LINUX user, but what I would do to try to solve the issue:

Localisation and updating of lensfun DB

  • locate the lensfun database. It is a folder with a lot of XML files.
  • update the data base with the lensfun provided script update-lensfun-data as it seems that lensfun packages can be shipped with old or very old data base.
    I think it can happen you have several database in your linux system. Be careful what DB is updated.

Point Rawtherapee to the updated lensfun DB

  • locate the config folder of rawtherapee (don’t know if it is included or no in the appimage). In rawpedia it is said it is located in ~/.config/. I don’t know for appimage. see http://rawpedia.rawtherapee.com/File_Paths#Config

  • In the config folder, you find an option file. Edit the options file and set the DBDirectory key’s value to the absolute path of the custom Lensfun database file.

  • restart Rawtherapee.

Thanks @gaaned92 for your pointers! -

The problem with Linux AppImages is that they run as self-contained sandboxes with all libraries/dependencies included, and no external dependencies. I tried to manually point RT 5.8 to a self-compiled, local LensFun installation from fresh Git sources (in Linux, in the path /usr/local/share/lensfun/version_2 , specified with the line “DBDirectory=/usr/local/share/lensfun/version_2/” in ~/.config/RawTherapee/options), but to no avail. It seems as if the RT AppImage cannot use libraries outside its own sandbox. If I’m not mistaken, then Lensfun would need to be included in the AppImage itself.

AppImages are not sandboxes unless you’re using an external sandboxing mechanism like firejail. It is also not completely self contained, as it needs at least the system’s C library, if not more, but the “more” depends on the particular AppImage.

Ping @Carmelo_DrRaw
Is it corrected in your last dev appimages builds?

@cantsin
Could you test the last dev appimage RawTherapee_dev_5.8-345-g15204fa_20200329.AppImage

The RT AppImage is built against LensFun 0.3.2, which still uses version 1 of the DB format. So you need to generate a /usr/local/share/lensfun/version_1 custom database.

LensFun is included in the RT AppImage, as well as a default database that is updated at the time of creation of the AppImage itself.

I just checked the 5.8 release AppImage, and as far as I can see it correctly finds and loads the bundled LensFun DB (under usr/share/lensfun/version_1 in the bundle).

Could you please try to do the following:

  • remove the custom DBDirectory= line in your options
  • turn on verbose messages in the options (Verbose=true in the [General] section)
  • save the terminal messages into a file and send me the file so that I can have a look. You should see a message LENSFUN, scanning cameras: followed by a lot of found: and the name of the camera.

@gaaned92, @Carmelo_DrRaw - many thanks for your help!

The initial problem was indeed a legacy entry for the DBDirectory value in the configuation file. Thanks for pointing me into the right direction. The information that the Lensfun version 1 DB format is needed solved the issue for me -

Now both options work (as they should):

  • not define DBDirectory, and use the Lensfun library included in the AppImage
  • set the DBDirectory line in ~/.config/RawTherapee/options to:
    DBDirectory=/usr/share/lensfun/version_1/
    …to use the lensfun database of Debian 10’s distribution repository packages of lensfun 0.32.

Everything works! Thanks so much - didn’t see the forest for the trees…

Still this does not explain why the bundled DB does not work for you… I would still be interested in the result of the steps outlined in my previous post.

Thanks!

@Carmelo_DrRaw - edited my response above.

I must have had a legacy entry in DBDirectory - when I leave it undefined, it uses the bundled Lensfun database.

I guess I ran into this problem because I switched from Debian’s bundled RT package to the AppImage.

Many, many thanks again.

1 Like

You’re welcome @cantsin
Could you tag solved the thread?

Notice that the DB in the AppImage should be more recent and up-to-date than the one shipped by Debian.