Fatal error in build of 4.6.1 - I don't understand how to fix

I received a fatal error when trying to build 4.6.1, following the build instruction in the github README. A screen shot of my terminal is attached. What further information do I need to supply
to allow those with far greater understanding than me to offer to advice?

Update:
Having examined the error message more closely (but without any greater understanding) it seems to me that this is a defect rather than a user -error. Should I submit a bug-report ?

I just compiled 4.6.1 a few days ago, and got no error.

I suspect you have a version difference somewhere, possibly between the lensfun binary library and the header files.
Library binaries and header files are usually provided in separate packages (with the name of the library, and a suffix “-devel” for the headers). I try to make sure those packages have the same version, since automatic updates can fail.

Did you do a Git submodule update?

You are building darktable against lensfun 0.3.95. The darktable README clearly states that this version of liblensfun (which is actually an alpha release) is not supported.

1 Like

yes I did:

“tony@MS-7D15:~/darktable$ git submodule update --init”

Yes, I saw that too - but since I was following instructions given on github, by people who know much more than me, especially about how to satisfy dependencies, I could see no reason (or way) to change the build process.

What should I have done instead?

You don’t have to change the build process, you should install an acceptable version of lensfun (your distribution or OBS should be able to provide one)

1 Like

About Liblensfun 0.3.95: how are you able to tell that I used this version in my build attempt? I don’t see it mentioned in the screen shot.

I installed it some years ago (possible through the command line, I don’t remember) and have compiled 4.2, 4.4 and 4.6.0 at least using it (I assume) without problem. Synaptic tells my that I have only 0.3.2-6 installed and does not list 0.3.95.

What do I have to do to ensure the build uses my installed 0.3.2-6 ?

I have liblensfun-bin and liblensfun-dev, both at version 0.3.2-6, installed according to Synaptic. What should I be changing here - if anything?

@victoryforce I’ll make a change on master so the CMake configure step fails sooner if the Lensfun version is not right.

I assume that liblensfun 0.3.2-6 is an acceptable version - it being the latest available to Synaptic. It has been installed on my system for some time - well before these failing build attempts.

I have now uninstalled liblensfun version 0.3.95; build still fails with the same error, si the error is not caused by version 0.3.95.

You did remove the ./build subdirectory before retrying a build?

1 Like

Hello,

I’ve not a great understanding of the build process but I often compile darktable from git. With this kind of error sometimes it’s useful to totally delete the sources directory ,then git clone again and try to compile.

Worth a try !

Yes, I did, based on your advice when I was trying to build 4.2 (I think) - and thanks for the advice.

Indeed, worth 4 trys now - none of them making any difference to the existence of the error message or its contents.

Some more digging makes me suspect you don’t have the git version corresponding to the published version 4.6.1, but a slightly different one: the line number for the error message you gave doesn’t correspond to the linenumber from the official source package.

May I suggest you drop the git and use the published source package ?

If that solves the issue, there might of course be a problem with the source in GIT, but at least we then know what we are dealing with.

Thanks for spending more of your time on this. I’’ do as you suggest - but could I ask you to explain what ‘drop the git’ means? What do I need to do and what am I trying to accomplish?

btw I did have a closer look at the source file highlighted in the error message: the line number and character position from the error message matched the source file (lens.cc) in my /darktable/src/ folder exactly.

Update: apologies: I think I understand what you are recommending. The contents of the published source package you have pointed me to are a precise sub-set match to those downloaded by the git clone comment - they match on date and file size (but I haven’t checked file content). By subset I mean that there are more files in the cloned set than there are in the ‘published source package’ - by about 1368, excluding those in /build and /.git

But I did do a build using the published source package: with an identical fatal error.

Hi, I have failed to be accurate: I have now run the build using this package without running the ‘git fetch --tags’ command (git rejected it). The build now fails at the 95% complete point with the same fatal error, followed by about 15 other errors. I’ll list them here as a copy/past from the terminal session:

[ 95%] Linking C shared module libwebp.so
[ 95%] Linking C shared module libtiff.so
[ 95%] Built target webp
In file included from /home/tony/darktable/build/lib/darktable/plugins/introspection_lens.cc:175:
/home/tony/darktable/src/iop/lens.cc: In function ‘lfModifier* _get_modifier(int*, int, int, const dt_iop_lens_data_t*, int, gboolean)’:
/home/tony/darktable/src/iop/lens.cc:985:46: error: no matching function for call to ‘lfModifier::lfModifier(lfLens* const&, const float&, const int&, const int&)’
985 | mod = new lfModifier(d->lens, d->crop, w, h);
| ^
In file included from /home/tony/darktable/src/iop/lens.cc:54:
/usr/local/include/lensfun/lensfun.h:2331:5: note: candidate: ‘lfModifier::lfModifier()’
2331 | lfModifier () {}
| ^~~~~~~~~~
/usr/local/include/lensfun/lensfun.h:2331:5: note: candidate expects 0 arguments, 4 provided
/usr/local/include/lensfun/lensfun.h:1929:18: note: candidate: ‘constexpr lfModifier::lfModifier(const lfModifier&)’
1929 | struct LF_EXPORT lfModifier
| ^~~~~~~~~~
/usr/local/include/lensfun/lensfun.h:1929:18: note: candidate expects 1 argument, 4 provided
/home/tony/darktable/src/iop/lens.cc: In function ‘float _get_autoscale_lf(dt_iop_module_t*, dt_iop_lens_params_t*, const lfCamera*)’:
/home/tony/darktable/src/iop/lens.cc:1034:14: error: ‘lfModifier::~lfModifier()’ is protected within this context
1034 | delete modifier;
| ^~~~~~~~
/usr/local/include/lensfun/lensfun.h:2332:5: note: declared protected here
2332 | ~lfModifier () {}
| ^
/home/tony/darktable/src/iop/lens.cc: In function ‘void _process_lf(dt_iop_module_t*, dt_dev_pixelpipe_iop_t*, const void*, void*, const dt_iop_roi_t*, const dt_iop_roi_t*)’:
/home/tony/darktable/src/iop/lens.cc:1286:10: error: ‘lfModifier::~lfModifier()’ is protected within this context
1286 | delete modifier;
| ^~~~~~~~
/usr/local/include/lensfun/lensfun.h:2332:5: note: declared protected here
2332 | ~lfModifier () {}
| ^
/home/tony/darktable/src/iop/lens.cc: In function ‘int _process_cl_lf(dt_iop_module_t*, dt_dev_pixelpipe_iop_t*, cl_mem, cl_mem, const dt_iop_roi_t*, const dt_iop_roi_t*)’:
/home/tony/darktable/src/iop/lens.cc:1532:31: error: ‘lfModifier::~lfModifier()’ is protected within this context
1532 | if(modifier != NULL) delete modifier;
| ^~~~~~~~
/usr/local/include/lensfun/lensfun.h:2332:5: note: declared protected here
2332 | ~lfModifier () {}
| ^
/home/tony/darktable/src/iop/lens.cc: In function ‘gboolean _distort_transform_lf(dt_iop_module_t*, dt_dev_pixelpipe_iop_t*, float*, size_t)’:
/home/tony/darktable/src/iop/lens.cc:1592:10: error: ‘lfModifier::~lfModifier()’ is protected within this context
1592 | delete modifier;
| ^~~~~~~~
/usr/local/include/lensfun/lensfun.h:2332:5: note: declared protected here
2332 | ~lfModifier () {}
| ^
/home/tony/darktable/src/iop/lens.cc: In function ‘gboolean _distort_backtransform_lf(dt_iop_module_t*, dt_dev_pixelpipe_iop_t*, float*, size_t)’:
/home/tony/darktable/src/iop/lens.cc:1635:10: error: ‘lfModifier::~lfModifier()’ is protected within this context
1635 | delete modifier;
| ^~~~~~~~
/usr/local/include/lensfun/lensfun.h:2332:5: note: declared protected here
2332 | ~lfModifier () {}
| ^
/home/tony/darktable/src/iop/lens.cc: In function ‘void _distort_mask_lf(dt_iop_module_t*, dt_dev_pixelpipe_iop_t*, const float*, float*, const dt_iop_roi_t*, const dt_iop_roi_t*)’:
/home/tony/darktable/src/iop/lens.cc:1672:12: error: ‘lfModifier::~lfModifier()’ is protected within this context
1672 | delete modifier;
| ^~~~~~~~
/usr/local/include/lensfun/lensfun.h:2332:5: note: declared protected here
2332 | ~lfModifier () {}
| ^
/home/tony/darktable/src/iop/lens.cc:1716:10: error: ‘lfModifier::~lfModifier()’ is protected within this context
1716 | delete modifier;
| ^~~~~~~~
/usr/local/include/lensfun/lensfun.h:2332:5: note: declared protected here
2332 | ~lfModifier () {}
| ^
[ 95%] Building C object lib/darktable/plugins/imageio/storage/CMakeFiles/gallery.dir/gallery.c.o
/home/tony/darktable/src/iop/lens.cc: In function ‘void _modify_roi_in_lf(dt_iop_module_t*, dt_dev_pixelpipe_iop_t*, const dt_iop_roi_t*, dt_iop_roi_t*)’:
/home/tony/darktable/src/iop/lens.cc:1835:10: error: ‘lfModifier::~lfModifier()’ is protected within this context
1835 | delete modifier;
| ^~~~~~~~
/usr/local/include/lensfun/lensfun.h:2332:5: note: declared protected here
2332 | ~lfModifier () {}
| ^
/home/tony/darktable/src/iop/lens.cc: In function ‘void init_global(dt_iop_module_so_t*)’:
/home/tony/darktable/src/iop/lens.cc:3372:39: error: ‘lfDatabase::lfDatabase()’ is protected within this context
3372 | lfDatabase dt_iop_lensfun_db = new lfDatabase;
| ^~~~~~~~~~
/usr/local/include/lensfun/lensfun.h:1600:5: note: declared protected here
1600 | lfDatabase () {}
| ^~~~~~~~~~
/home/tony/darktable/src/iop/lens.cc: In function ‘void cleanup_global(dt_iop_module_so_t
)’:
/home/tony/darktable/src/iop/lens.cc:3600:10: error: ‘lfDatabase::~lfDatabase()’ is protected within this context
3600 | delete dt_iop_lensfun_db;
| ^~~~~~~~~~~~~~~~~
/usr/local/include/lensfun/lensfun.h:1601:5: note: declared protected here
1601 | ~lfDatabase () {}
| ^
[ 95%] Built target tiff
gmake[2]: *** [lib/darktable/plugins/CMakeFiles/lens.dir/build.make:82: lib/darktable/plugins/CMakeFiles/lens.dir/introspection_lens.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:6141: lib/darktable/plugins/CMakeFiles/lens.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs…
[ 96%] Linking C shared module libj2k.so
[ 96%] Building C object lib/darktable/plugins/imageio/storage/CMakeFiles/latex.dir/latex.c.o
[ 96%] Linking C shared module libchannelmixerrgb.so
[ 96%] Built target j2k
[ 96%] Linking C shared module libxcf.so
[ 96%] Linking C shared module libavif.so
[ 96%] Built target channelmixerrgb
[ 96%] Built target gimp_xcf
[ 97%] Linking C shared module libemail.so
[ 97%] Built target avif_format
[ 97%] Linking C shared module libdisk.so
[ 97%] Built target email
[ 97%] Linking C shared module libgallery.so
[ 97%] Built target disk
[ 97%] Built target gallery
[ 97%] Linking C shared module liblatex.so
[ 97%] Built target latex
[ 97%] Linking CXX shared module libexr.so
[ 97%] Built target exr
[ 97%] Linking CXX shared module libdemosaic.so
[ 97%] Built target demosaic
gmake: *** [Makefile:156: all] Error 2
to

This is your problem all along, as established at the start. Still using manually installed Lensfun 0.3.95 files.

1 Like

That “/usr/local/include” worries me, have you build the lensfun library yourself?
Normally, header files downloaded from distribution repositories are stored under /user/include…
And your package manager will not see anything installed in /usr/local

And please, stick to one communication channel when discussing a problem. Also posting the question on the mailing list means that effort gets duplicated (personally, if I see someone posing a question both here and in the mailing list, I tend to ignore it/them…).

2 Likes