Windows 64 build with integration of lensfun

Thanks for the kind explanation. I was able to change the install directory for the lens database. But even though I used the -DLENSFUNDBDIR=share/lensfun switch when I ran cmake, lensfun simply insisted looking for the database in the directory where it was originally installed.

I wanted to run RT in verbose mode, but I don’t know what exactly to do (could you please explain to me?). What makes the story even funnier is that I’m not to run RT in the console of MinGW. It simply quit, without a single piece of error message. To extract a little more information, I used GDB to run rawtherapee.exe. It turns out that RT exited with code 0xc0000139. Do you happen to know what that code means?

Thanks again and apologize for my ignorance…

Are you aware of lensfun-update-data? That should just grab the latest database suitable for the installed msys2 package.

Yes, I am. But it needs a Python module which can’t be found in the package.

You should open at the options file of RawTherapee (I suppose under %APPDATA%\RawTherapee or something like that), and look at the following:

[Lensfun]
DBDirectory=/path/to/lensfun/db

RT will search for the lensfun database only in /path/to/lensfun/db, unless the config entry is empty, i.e. you see the following:

[Lensfun]
DBDirectory=

In this case, the default DB locations of lensfun will be used.

So, just set the proper DBDirectory to where you have the database (e.g. C:\Program Files\RawTherapee\share\lensfun) and everything should be good.

If not, then you have found a bug :slight_smile:

What RT branch are you building? Is it the last version? In all cases, delete the lensfun paragraph in options file.

In option file, set VERBOSE=true. Execute in mingw console.

I guess that the lensfun DB is not compatible with the lensfun build you use or you did’nt copy the good dll.

Thanks for the kind reply. Besides what you suggested, I found it’s also necessary to clean the cache in order for lensfun to work.

Thanks for the suggestions and explanation.
I guess my system is some kind of messed up. I’ll reinstall MinGW.

last dev build including lensfun

RawTherapee_dev_5.2-187-ga1f86bff_WinVista_64.zip

uploaded at https://drive.google.com/open?id=0B2q9OrgyDEfPS2FpdDAtMVI1RG8

Thanks. Will try it !

Before, my problem was :

  • I created an automatic minimum profile with auto lens distortion correction, but the value applied was the one of one of the lens when creating the profile.

With lensfun, I hope most of the profile created will automatch to correct distortion, right?

(except with manual lenses, althoughtin the Raw their is the info of the focal lenght I give the camera…)

Yes if lens profile is in the lensfun data base.

Ver. 5.2-187: in “no-File-Browser” mode, it still can’t load the lensfun database.

You might want to delete the cache.

1 Like

In options file verify that

[Lensfun]
DBDirectory=

In order lensfun use the DB default location

1 Like

Just delete the options file (in %APPDATA%\RawTherapee or something like that)

1 Like

Thank you @noteasy2beme, @gaaned92, @agriggio, I usually delete the options file and cache for new versions, didn’t this time. It works now as expected.

1 Like

Reviving this thread, now, July 2020, as I’ve recently made my first build on a win10 x64 laptop.

I’ve followed rawpedia instructions until the “Run CMake and Make” section.
But I can’t seem to find anything related to lensfun database; when I run RT-5.8 (dev branch), I can’t select any lens - and the share directory is empty.

~/RT/RawTherapee/build/release
$ ll
total 22624
drwxr-xr-x 1 catya None        0 16 juil. 16:34 .
drwxr-xr-x 1 catya None        0 10 mai   00:22 ..
-rw-r--r-- 1 catya None      733 10 mai   00:01 AboutThisBuild.txt
-rw-r--r-- 1 catya None     1236  9 mai   23:56 AUTHORS.txt
-rw-r--r-- 1 catya None   159083  9 mai   23:56 camconst.json
drwxr-xr-x 1 catya None        0 10 mai   00:22 dcpprofiles
drwxr-xr-x 1 catya None        0 10 mai   00:22 fonts
drwxr-xr-x 1 catya None        0 10 mai   00:22 iccprofiles
drwxr-xr-x 1 catya None        0 10 mai   00:22 images
drwxr-xr-x 1 catya None        0 10 mai   00:22 languages
-rw-r--r-- 1 catya None    33326  9 mai   23:56 LICENSE.txt
drwxr-xr-x 1 catya None        0 10 mai   00:22 licenses
-rw-r--r-- 1 catya None     2086  9 mai   23:56 options
drwxr-xr-x 1 catya None        0 10 mai   00:22 profiles
-rwxr-xr-x 1 catya None 15083188 10 mai   00:22 rawtherapee.exe
-rwxr-xr-x 1 catya None  7597536 10 mai   00:22 rawtherapee-cli.exe
-rw-r--r-- 1 catya None     4666  9 mai   23:56 RELEASE_NOTES.txt
drwxr-xr-x 1 catya None        0 10 mai   00:22 share
drwxr-xr-x 1 catya None        0 10 mai   00:22 sounds
drwxr-xr-x 1 catya None        0 10 mai   00:22 themes
-rw-r--r-- 1 catya None    11332 10 mai   00:01 WindowsInnoSetup.iss
  1. is this the right thread to ask about that?
  2. what have I done wrong?

Thanks for your help.

@nonophuran Can you post your cmake command?

If you run lensfun-update-data from your console you see where the lensfun directory is located. For me this is at C:/msys64/mingw64/var/lib/lensfun-updates/version_1
You need to make sure that the DBDirectory setting in your C:\Users\###\AppData\Local\RawTherapee5-dev\options file points to this folder.

1 Like

@HIRAM, here it is.

cmake -G "MSYS Makefiles" -DLENSFUNDBDIR=share/lensfun -DCMAKE_BUILD_TYPE="release" -DPROC_TARGET_NUMBER="2" -DCACHE_NAME_SUFFIX="5-dev" ..

It was executed from within the newly created build subdirectory, as stated in the current revision of rawpedia.

@Thanatomanic,
the DBDirectory attribute does not even exist in my options file.

Have I missed part of the process?
note that I basically stopped right after RT was built and made executable through MSys (again, just as in RawPedia)
Also note that I’ve cloned this “locally”, under the /home directory created by MSys

Thanks !

@Thanatomanic
I think @nonophuran question is due to lack of clarity of the redaction of the steps following make install .

There are two ways to run the built application:

  • run the exe from a MNGW64 shell (like in LINUX). In this case, all dependencies can be fetched in MSYS2/MINGW64.
    To get access to the lensfun DB, the CMAKE tag DLENSFUNDBDIR should point to C:/msys64/mingw64/var/lib/lensfun-updates/version_1 or otherwise, you have to modify the DBDirectory parameter accordingly.

  • Copy ALL dependencies as described in rawpedia/windows including the Lensfun DB in the correct locations. In this case you can run as a native windows app (double-click, from a BAT…)

Can you clarify and verify that in Rawpedia? Perhaps reordering some paragraphs also.

@nonophuran

Add this at the end of the options file:
[Lensfun]
DBDirectory= C:/msys64/mingw64/var/lib/lensfun-updates/version_1