Darktable + CR3

For the first time since I switched to Linux many years ago, I feel a bit of envy for Mac and win users that have unofficial builds of darktable with cr3 support… Every time I get to the week end I plan on getting on with the advice given here elsewhere and try to make my own build with cr3 support thinking “couple of hours and I’ll have it done” but then time passes and I read this kind of experience and all my enthusiasm implodes. I guess I will continue to convert to dng with dnglab and just not think about native support.

(But if someone would do unofficial Linux builds like for osx and win I will surely appreciate the effort!)

I just downloaded from the exiv2 repository and built with bmff enabled. Do you think I need to link to that exiv2?

So I have made some progress. I was able to install darktable with exiv2 working and was able to read the metadata from a CR3 file and see the image preview. I was still not able to open the image in darkroom.

I did update the submodules after replaceing the rawspeed file with the cytrinox/rawspeed. So after installing i notice that there was no CR3 decoder.

I uninstalled, rm’d src/external/rawspeed and git cloned cytrinox/rawspeed then ./build.sh.

The CR3 decoder is in there but I keep getting this error:

darktable/src/common/imageio_rawspeed.cc:133:24: error: no matching function for call to ‘rawspeed::RawParser::RawParser(std::unique_ptr::pointer)’
133 | RawParser t(m.get());
| ^
compilation terminated due to -Wfatal-errors.
gmake[2]: *** [bin/CMakeFiles/lib_darktable.dir/build.make:726: bin/CMakeFiles/lib_darktable.dir/common/imageio_rawspeed.cc.o] Error 1
gmake[2]: *** Waiting for unfinished jobs…
gmake[1]: *** [CMakeFiles/Makefile2:2307: bin/CMakeFiles/lib_darktable.dir/all] Error 2

Anyone got any ideas?

What if i just copied the CR3 decoder header and c++ file to darktables rawspeed?

SUCCESS! I now have CR3 support in Darktable. However photos seem off when I go to develop. Way underexposed. If anyone might have an idea on why id love to know. And if im not talking to myself here Id be glad to discuss how I did it.


Have you used DT in the past?? My apologies if you have but likely if not what you see is the fact that DT does almost nothing to your image by default and in scene-referred you will be routinely adding 1-2.5 ev to start your edits… Rapidfire Fix #3 - Demystifying Darktable Import and Preview - YouTube

The question is asked so often and as DT initially shows the jpg preview and then moves to the raw when you initiate and edit …images get instantly darker and this really throws people…

I could be wrong but this might be what you are seeing…if you are aware of all this then ignore me

1 Like

I was not aware. I am still new to DT. I will look into this more. Thank you for responding.

With DT you add exposure to correctly expose your midtones…even if the highlights appear to blow out then you use filmic to map Dynamic range to tonally map your shadows and highlights…there is some desaturation in the process so you work to add that back…There are a ton of videos out there…The last 10 or so from Boris Hajdukovic’s YT channel are some of the best and most recent and are an excellent demonstration of DT and SR editing…Google Editing moments Darktable…



Now that I’ve got DT where I want it I can start to really understand the software. Ill definitely take a look a look at these videos, thanks!

I’d be glad to try on Ubuntu/pop!os if you want to post steps. I don’t see version numbers but have both a flatpack and a deb version installable if libs can do it, or point to which code to get.

Seems like clear instructions…

Cheers Todd you’re right this was posted just after my mini-rant – brilliant timing!

As follow up…I see how this could come across that I was implying it was easy or something…I had only meant that this seemed like a clear set of instructions that might help…I only noticed this looking back now after you replied…I am no wise guy so I am glad you took it as I intended and not as I tersely wrote it…best of luck…

I never had that thought honestly! Plus I kind of “know” you from all the posts her and I’ve never heard (or read) anything less than kind/helpful/collaborative from you.

1 Like

I would never want to be otherwise…I hope you get up and running with your Canon files soon…

1 Like

Thank you ,Todd! I was able to get support for CR3 files. I wish I had your instructions earlier! I actually ended up doing just as you have. You have provided a great resource for other canon CR3 users. Maybe there will be support for cr3 with DT 3.8 soon and others wont have to build it manually.

Hi guys and girls (m/f/d),

I also try to get Darktable running with CR3 support.
I’m running Fedora 34

What have I done so far:
#Installed Exiv2 with BMFF enabled:
git clone --recurse-submodules GitHub - Exiv2/exiv2: Image metadata library and tools
cd exiv2/
mkdir build
vi CMakeLists.txt # made sure BMFF support is enabled
cd build
cmake -DCMAKE_BUILD_TYPE=Release …
cmake --build .
ctest --verbose
sudo cmake --install .

#Correct the link to the new lib
cd /lib64
ls -l exiv
sudo rm libexiv2.so.27
sudo ln -s /usr/local/lib64/libexiv2.so.27
ls -l exiv

#Installing Darktable as described on the github page along with the description of Darktable Ubuntu CR3 support
git clone --recurse-submodules --depth 1 GitHub - darktable-org/darktable: darktable is an open source photography workflow application and raw developer
cd darktable
git fetch --tags
git checkout tags/release-3.8.1
vi .gitmodules # and changed the rawspeed submodule to cytronix, branch canon_cr3

git submodule init
git submodule update --init

cd src/external
rm -rf rawspeed
git clone GitHub - cytrinox/rawspeed: fast raw decoding library
cd rawspeed
git switch canon_cr3
cd …/…/… # back to the darktable directory

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

it even states, that BMFF support is enabled:
– Found Exiv2: /usr/local/lib64/libexiv2.so (Required is at least version “0.24”)
– Looking for EXV_ENABLE_BMFF
– Looking for EXV_ENABLE_BMFF - found
– Exiv2 >= 0.27.4 found with ISOBMFF support (CR3, AVIF, HEIF)
[ 42%] Building C object bin/CMakeFiles/lib_darktable.dir/common/iop_group.c.o
In Datei, eingebunden von /usr/local/include/exiv2/exiv2.hpp:8,
von /home/matze/Downloads/darktable/src/common/exif.cc:46:
/usr/local/include/exiv2/basicio.hpp:698:25: Fehler: »string_view« in Namensbereich »std« bezeichnet keinen Typ
698 | static constexpr std::string_view TEMP_FILE_EXT = “.exiv2_temp”;
| ^~~~~~~~~~~
Kompilierung wegen »-Wfatal-errors« beendet.
gmake[2]: *** [bin/CMakeFiles/lib_darktable.dir/build.make:418: bin/CMakeFiles/lib_darktable.dir/common/exif.cc.o] Fehler 1
gmake[2]: *** Es wird auf noch nicht beendete Prozesse gewartet…
gmake[1]: *** [CMakeFiles/Makefile2:1749: bin/CMakeFiles/lib_darktable.dir/all] Fehler 2
gmake: *** [Makefile:156: all] Fehler 2

The last files are unfortunately in German. So I’ll try to translate them:
[ 42%] Building C object bin/CMakeFiles/lib_darktable.dir/common/iop_group.c.o
In File, imported of /usr/local/include/exiv2/exiv2.hpp:8,
of /home/matze/Downloads/darktable/src/common/exif.cc:46:
/usr/local/include/exiv2/basicio.hpp:698:25: Error: »string_view« in namespace »std« bezeichnet (that’s difficult, could be either naming|calling|refering|indicating) no Type
698 | static constexpr std::string_view TEMP_FILE_EXT = “.exiv2_temp”;
| ^~~~~~~~~~~
Compiling stopped due to »-Wfatal-errors«.
gmake[2]: *** [bin/CMakeFiles/lib_darktable.dir/build.make:418: bin/CMakeFiles/lib_darktable.dir/common/exif.cc.o] Error 1
gmake[2]: *** Waiting for processes, which are not finished yet
gmake[1]: *** [CMakeFiles/Makefile2:1749: bin/CMakeFiles/lib_darktable.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2

So googling with German error messages is bullshit.

So that’s why I’m asking you. What’s wrong? I’ve been using exiv2 with libexiv2.so.0.27.5

Thanks and best regards

You don’t need @cytrinox’s rawspeed branch for darktable 3.8.1, instead it uses an intree copy of libraw to handle cr3 support.

Also not sure about copying the exiv2.so,maybe that works, maybe it doesn’t.

1 Like

You definitely don’t want the development 1.x branch of exiv2, stick with 0.27-maintenance which keeps ABI compatibility.

1 Like

Thank you Milos and Mica,

@paperdigits: I tried it with “standard” rawspeed → same error
It was the exiv2, where I’ve loaded the bleeding edge …

Using the exiv2-maintenance fixed the issue I can now open CR3 files in DT :slight_smile:
Thank you very much :slight_smile: