Skip to content
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

Profiled Lens Correction (Lensfun) DB missing #5622

Closed
longos08 opened this issue Jan 26, 2020 · 17 comments
Closed

Profiled Lens Correction (Lensfun) DB missing #5622

longos08 opened this issue Jan 26, 2020 · 17 comments
Labels
os: macOS Specific to macOS

Comments

@longos08
Copy link

Hi,

On MAC OS Catalina 10.15.2 and RT 5.7 I don't see any values in lens correction camera/lenses dropdown boxes. I checked the lensfun folder within RT application and it's populated with different xml files for various cameras including Canon. I updated lensfun DB and restarted RT - no help.
#This is where I checked the lens profiles
/Applications/RawTherapee.app/Contents/Resources/share/lensfun
#OS
19.2.0 Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64
image

@Beep6581 Beep6581 added the os: macOS Specific to macOS label Jan 26, 2020
@rfranke
Copy link
Contributor

rfranke commented Jan 26, 2020

Same issue here. It's related to the directory of the lens database. For my own build this is:

release/MacOS/../../Resources/../../Resources/./share/lensfun

i.e. one ../../Resources too much. You might apply the following quick fix to your installation of the released 5.7 binaries:

cd /Applications/RawTherapee.app
ln -s Contents/Resources Resources

@longos08
Copy link
Author

Thanks for the quick revert! Fix helped.

@Thanatomanic
Copy link
Contributor

@longos08 I reopen this issue, because the underlying problem of a wrong directory being set is not fixed

@Thanatomanic Thanatomanic reopened this Jan 27, 2020
rfranke added a commit to rfranke/RawTherapee that referenced this issue Jan 28, 2020
DATADIR is also prepended to relative LENSFUNDBDIR in rtengine::init.
This removal in CMakeLists.txt keeps the cmake argument LENSFUNDBDIR
unmodified in the ~/.config/RawTherapee*/options file.
rfranke added a commit to rfranke/RawTherapee that referenced this issue Jan 28, 2020
DATADIR is also prepended to a relative LENSFUNDBDIR in rtengine::init.
This removal in CMakeLists.txt keeps the cmake argument LENSFUNDBDIR
unmodified in the ~/.config/RawTherapee*/options file.

This fixes a path like
   ../../Resources/../../Resources/./share/lensfun
for LENSFUNDBDIR=./share/lensfun under macOS.
@ronanM
Copy link

ronanM commented Jan 29, 2020

Same problem (no camera list, no lens list) with Linux Kubuntu 19.10 (snap installation).

Version: 5.7
Branch: releases
Commit: f335efe
Commit date: 
Compiler: cc 7.3.1
Processor: x86_64
System: Linux
Bit depth: 64 bits
Gtkmm: V3.22.2
Lensfun: V0.3.2.0
Build type: release
Build flags:  -std=c++11  -Werror=unused-label -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -fopenmp -Werror=unknown-pragmas -O2 -DNDEBUG -ftree-vectorize
Link flags:   
OpenMP support: ON
MMAP support: ON

@rfranke
Copy link
Contributor

rfranke commented Jan 30, 2020

Thank you for the info. I had not tried the snap installation under Linux, but it sounds reasonable that a Linux AppImage has the same issue as a Mac App.

Beep6581 added a commit that referenced this issue Jan 30, 2020
Prepend DATADIR only once to LENSFUNDBDIR, see #5622
@Benitoite
Copy link
Contributor

Here is a new build with lensfun installed to test:
https://kd6kxr.keybase.pub/RawTherapee_OSX_10.9_64_5.8.zip

@ronanM
Copy link

ronanM commented Feb 6, 2020

On Linux Kubuntu 19.10 with the version 5.8 (https://rawtherapee.com/shared/builds/linux/RawTherapee_5.8.AppImage) the lenses drop-down boxes (for manually selected) are still empty.

@Benitoite
Copy link
Contributor

@ronanM Thanks
@Beep6581 and @aferrero2707 are the AppImage gurus.

@rfranke
Copy link
Contributor

rfranke commented Feb 6, 2020

@Benitoite Congrats that you finally made it!
Can access memory cards now, thank's to the hint at rawtherapee.com to grant full disk access to /bin/sh. The small triangles are visible.
For some reason I still need the above link for the lensfun database:

cd /Applications/RawTherapee.app
ln -s Contents/Resources Resources

How did you configure LENSFUNDBDIR?
Where does RT store the options file now -- don't find a ~/.config/RawTherapee* ?

@Benitoite
Copy link
Contributor

Benitoite commented Feb 6, 2020

5.8 was built thusly:

https://github.com/Benitoite/RTdeps/blob/209288ea5093478864a70bb32b008b1142928e50/macbuildRT.sh#L232

cd ~ && git clone https://github.com/Beep6581/RawTherapee.git repo-rt && cd ~/repo-rt && sudo rm -f -r build && git checkout 5.8 mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE="release" -DPROC_TARGET_NUMBER="1" -DPROC_LABEL="generic processor" -DCACHE_NAME_SUFFIX="5-dev" -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++" -DWITH_LTO="ON" -DCMAKE_OSX_SYSROOT="/" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.9" -DLOCAL_PREFIX:STRING="/opt" -DLENSFUNDBDIR="./share/lensfun" -DCODESIGNID:STRING="Developer ID Application: Xxxxx Xxxxx (ABCDEFGHIJ)" -DNOTARY:STRING="--username aaaa@aaaa.aaaa --password abcd-efgh-hijk-lmno" -DCMAKE_CXX_FLAGS="-Wno-deprecated-register -Wno-unused-command-line-argument -std=c++11" -DCMAKE_C_FLAGS="-Wno-deprecated-register -Wno-unused-command-line-argument" -DOpenMP_C_FLAGS=-fopenmp=lomp -DOpenMP_CXX_FLAGS=-fopenmp=lomp -DOpenMP_C_LIB_NAMES="libomp" -DOpenMP_CXX_LIB_NAMES="libomp" -DOpenMP_libomp_LIBRARY="/opt/local/lib/libomp.dylib" -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp /opt/local/lib/libomp.dylib -I/opt/local/include" -DOpenMP_CXX_LIB_NAMES="libomp" -DOpenMP_omp_LIBRARY=/opt/local/lib/libomp.dylib -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp /opt/local/lib/libomp.dylib -I/opt/local/include" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON .. && make -j8 install && sudo make macosx_bundle

So, that lensfun directory is in the Application Bundle under RawTherapee.app/Contents/Resources/share/lensfun and use cmake -DLENSFUNDBDIR="./share/lensfun" etc.

The RawTherapee options are in its macOS designated area, ~/Library/Application\ Support/RawTherapee/config/options

@rfranke
Copy link
Contributor

rfranke commented Feb 7, 2020

OK, even though you configure -DLENSFUNDBDIR="./share/lensfun", ~/Library/Application\ Support/RawTherapee/config/options says (last lines):

[Lensfun]
DBDirectory=../../Resources/./share/lensfun

This results in twice ../../Resources/../../Resources/./share/lensfun, i.e. RawTherapee.app/Resources/share/lensfun.

Did you apply this commit (#5622) that should fix it?

@Benitoite
Copy link
Contributor

Benitoite commented Feb 7, 2020

2cc8918 did make it into the 5.8 tag.
My options file has

[Lensfun]
DBDirectory=./share/lensfun

This bit now gone:

RawTherapee/CMakeLists.txt

Lines 255 to 257 in 364fe35

if(DEFINED LENSFUNDBDIR AND NOT IS_ABSOLUTE "${LENSFUNDBDIR}")
set(LENSFUNDBDIR "${DATADIR}/${LENSFUNDBDIR}")
endif()

used to apply to all three platforms, but we probably only didn't need the lines on macOS.

See #5639

Also, the prepending ./ looks superfluous, which I might have copied from somewhere at some point before updating the wiki. Not having the ./ would have maybe not tripped the code in the first place being a relative path.

If you are on 5.8 and have a bad LENSFUNDBDIR in your options file, be sure to delete your options file...

@Beep6581 Beep6581 changed the title Lens correction missing for Canon lenses RT 5.7 Profiled Lens Correction (Lensfun) DB missing Feb 7, 2020
@rfranke
Copy link
Contributor

rfranke commented Feb 7, 2020

Yes, it works after removal of an old ~/Library/Application\ Support/RawTherapee. Meaning that this issue can be considered solved for macOS :-)

@Beep6581 Beep6581 closed this as completed Feb 8, 2020
@ronanM
Copy link

ronanM commented Feb 8, 2020

For Linux, replace the value (set by a previous version ?) in ~/.config/RawTherapee/options:

from

[Lensfun]
DBDirectory=

to

[Lensfun]
DBDirectory=share/lensfun/version_1

@aferrero2707
Copy link
Collaborator

@ronanM does it mean that there is nothing to be fixed in the AppImage, and it is only a configuration problem?

@ronanM
Copy link

ronanM commented Feb 8, 2020

I think the case DBDirectory= should be manage to be automatically replaced by the good value.

@Beep6581
Copy link
Owner

Beep6581 commented Feb 8, 2020

@aferrero2707 the appimage works fine on my system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: macOS Specific to macOS
Projects
None yet
Development

No branches or pull requests

7 participants