Project

General

Profile

Bug #12200

deprecated lensfun functions

Added by Heiko Bauke about 1 year ago. Updated 6 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Darkroom
Target version:
Start date:
05/16/2018
Due date:
% Done:

0%

Affected Version:
git master branch
System:
all
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Darktable cannot be compiled when the current development version of liblensfun is installed. Several lensfun functions (which are utilized in darktable) have been marked as deprecated. The compiler option -Werror turns the resulting warnings into errors and therefore the compilation fails.

In file included from /darktable/build/src/iop/introspection_lens.c:54:0:
/darktable/src/iop/lens.c: In function ‘init_global’:
/darktable/src/iop/lens.c:1091:5: error: ‘HomeDataDir’ is deprecated [-Werror=deprecated-declarations]
     g_free(dt_iop_lensfun_db->HomeDataDir);
     ^~~~~~
In file included from /darktable/src/iop/lens.c:39:0,
                 from /darktable/build/src/iop/introspection_lens.c:54:
/usr/include/lensfun/lensfun.h:1370:22: note: declared here
     DEPRECATED char *HomeDataDir;
                      ^~~~~~~~~~~
In file included from /darktable/build/src/iop/introspection_lens.c:54:0:
/darktable/src/iop/lens.c:1092:5: error: ‘HomeDataDir’ is deprecated [-Werror=deprecated-declarations]
     dt_iop_lensfun_db->HomeDataDir = g_build_filename(path, "lensfun", "version_" STR(LF_MAX_DATABASE_VERSION), NULL);
     ^~~~~~~~~~~~~~~~~
In file included from /darktable/src/iop/lens.c:39:0,
                 from /darktable/build/src/iop/introspection_lens.c:54:
/usr/include/lensfun/lensfun.h:1370:22: note: declared here
     DEPRECATED char *HomeDataDir;
                      ^~~~~~~~~~~
In file included from /darktable/build/src/iop/introspection_lens.c:54:0:
/darktable/src/iop/lens.c:1097:7: error: ‘HomeDataDir’ is deprecated [-Werror=deprecated-declarations]
       g_free(dt_iop_lensfun_db->HomeDataDir);
       ^~~~~~
In file included from /darktable/src/iop/lens.c:39:0,
                 from /darktable/build/src/iop/introspection_lens.c:54:
/usr/include/lensfun/lensfun.h:1370:22: note: declared here
     DEPRECATED char *HomeDataDir;
                      ^~~~~~~~~~~
In file included from /darktable/build/src/iop/introspection_lens.c:54:0:
/darktable/src/iop/lens.c:1098:7: error: ‘HomeDataDir’ is deprecated [-Werror=deprecated-declarations]
       dt_iop_lensfun_db->HomeDataDir = g_build_filename(path, "lensfun", NULL);
       ^~~~~~~~~~~~~~~~~
In file included from /darktable/src/iop/lens.c:39:0,
                 from /darktable/build/src/iop/introspection_lens.c:54:
/usr/include/lensfun/lensfun.h:1370:22: note: declared here
     DEPRECATED char *HomeDataDir;
                      ^~~~~~~~~~~

History

#1 Updated by Heiko Bauke about 1 year ago

Addendum: the deprecated struct element HomeDataDir has been replaced by the C++ class member UserLocation. This means the replacement for the deprecated element can not be used by darktable, which is written in C.

#2 Updated by Ryan Henderson 6 months ago

LensFun 0.3.95 adds more deprecated declarations.

darktable/src/iop/lens.c:354:3: error: ‘lf_modifier_new’ is deprecated [-Werror=deprecated-declarations]
lfModifier *modifier = lf_modifier_new(d->lens, d->crop, orig_w, orig_h);
^

FYI, you can remove -Werror from src/CMakeLists.txt and hope for the best. It seems to work as the lensfun deprecated functions are just marked deprecated, not removed.

- add_definitions(-Werror)
+ #add_definitions(-Werror)

#3 Updated by Paolo Astengo 6 months ago

Ryan,

yes, it works, but every time you load the code from github and try to recompile it, it fails because a modified version of CMakeLists.txt

Also available in: Atom PDF