error compiling darktable 3.6.0 with cr3 support

I’m trying to compile darktable from branch 3.6.x with cr3 support, following the instructions found in https://github.com/darktable-org/darktable/issues/2170

I had compiled it successfully about un month ago, but now when I try:

./build.sh --prefix /opt/darktable-test/ --build-type Release --install --sudo

I get this compile error:

/home/paolo/git/darktable/src/common/exif.cc: In function ‘char* dt_exif_xmp_read_string(int)’:
/home/paolo/git/darktable/src/common/exif.cc:3730:53: error: ‘Exiv2::byte* Exiv2::DataBuf::pData_’ is private within this context
 3730 |       xmpPacket.assign(reinterpret_cast<char *>(buf.pData_), buf.size_);
      |                                                     ^~~~~~
compilation terminated due to -Wfatal-errors.
make[2]: *** [bin/CMakeFiles/lib_darktable.dir/build.make:368: bin/CMakeFiles/lib_darktable.dir/common/exif.cc.o] Errore 1
make[2]: *** Attesa per i processi non terminati....
make[1]: *** [CMakeFiles/Makefile2:1851: bin/CMakeFiles/lib_darktable.dir/all] Errore 2
make: *** [Makefile:152: all] Errore 2

my exiv2 is compiled from current main branch

am I missing something?

I get the error if I’m using version 3.6.0 too (surely, with cr3 support)

Probably caused by https://github.com/Exiv2/exiv2/commit/c9d0cf36434c351a4dcf289d407ac70252a8ed72

My first guess is that
xmpPacket.assign(reinterpret_cast<char *>(buf.pData_), buf.size_)
should be updated to read xmpPacket.assign(reinterpret_cast<char *>(buf.data(0)), buf.size()) but I haven’t tested it.

1 Like

do I raise an issue?

Try using the exiv2 0.27-maintenance branch instead of main.

I’ve been trying to compile DT from master with cr3 support (rawspeed canon_cr3 branch and exiv2 bff enabled) I keep getting the same error too. I compiled exiv2 from current main branch too. Ill try the maintenance branch. If that doesnt work Ill try dhoulders suggestion.

You probably need the fork of rawspeed from which the PR for cr3 support comes.

I’m a long time Windows user with direct experience in programming/running MSDOS, FORTRAN 4, BASIC, some light use of VMS, and, for a short time, some observation of heavy-duty machine language programming at work. Even though most of my knowledge is out of date it’s still enough to know what it takes to make computers run. But unfortunately that’s not enough to easily compile a Windows version of Darktable with CR3 support – it takes some dedicated time and patience to find all the instructions and find the correct locations to collect all the scattered bits and pieces of files needed to compile successfully. Linux people know the ins-and-outs and are happy to share them but it’s still oftentimes a drawn-out and frustrating experience for us off-brand OS users.

Thank you, thank you, thank you, MartinSt, for your kind efforts at generating a Windows version with CR3 support or I wouldn’t be able to use Darktable at all.

Well I was able to build 3.6.1 and install darktable with cytinox/rawspeed and canon_cr3 branch along side a exiv2 build enabling bmff. BUT, darktable will not open at all. Not from command line or desktop launcher. And get this error when I go to uninstall.
indent preformatted text by 4 spacesmake uninstall
– Uninstalling “/opt/darktable/share/locale/af/LC_MESSAGES/darktable.mo”
CMake Error at cmake_uninstall.cmake:16 (message):
Problem when removing
“/opt/darktable/share/locale/af/LC_MESSAGES/darktable.mo”

make[3]: *** [CMakeFiles/uninstall.dir/build.make:70: CMakeFiles/uninstall] Error 1
make[2]: *** [CMakeFiles/Makefile2:1282: CMakeFiles/uninstall.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1289: CMakeFiles/uninstall.dir/rule] Error 2
make: *** [Makefile:202: uninstall] Error 2