cr3 support with libraw in darktable

Hi,

I am trying to test the new cr3 support with libraw. I installed darktable from OBS (3.7.0~git1550.0a3aab0ccf-1 for Ubuntu 20.04, I am running Linux Mint 20.1).

I have version 0.27.4 of exiv2 installed.

But I did not manage to open cr3 file from darktable (I cannot see any cr3 file when I use “add to library”).
I tried LD_LIBRARY_PATH=/usr/local/lib/ darktable (in order to use the right exiv2 version), but that did not solve my issue.

I previously managed to use the cytrinox rawspeed PR. I will continue to use this for now, but if anyone can help me make the cr3 support from libraw work, I would be grateful!

It depends on how the Ubuntu maintainers built that binary you are installing. I always build darktable myself from source, and certainly the new libraw-based support for CR3 is working for the iages from my Canon Kiss-M (M50) camera.

If the Ubuntu people built darktable using an exiv2 library that didn’t have ISOBMFF support enabled, or if the exiv2 library on your system doesn’t have ISOBMFF support enabled, then this might explain why your darktable binary doesn’t support handling of CR3 files. On Arch linux, the exiv2 library has ISOBMFF support enabled, but I don’t know what is the policy for Ubuntu – they may not enable it due to the “patent scare”.

Are there any Ubuntu users here who can shed some light on what is the status of exiv2 ISOBMFF supprt in that distro?

I compiled exiv2 myself with isobmff enabled (it works since I am currently using it with cytrinox’s rawspeed PR to read cr3 in darktable).

I will try to build darktable from source instead of using the OBS .deb

I think that will fix your issue. But, given Ubuntu is quite a widely used distro, it would be good if the exiv2 and darktable maintainers could adjust their build processes to enable these features in the distributed binaries.

I confirm it works fine when I build from source. Thanks, I should have tried before asking here!

I don’t know the obs repositories.

But if they only contain darktable (and no libexiv2), that means they built it against the version available in the official Ubuntu packages.

In case of Ubuntu 20.04, that version can’t be fresher then one from April 2020, soni guess it doesn’t has the support you seek .

During the build to configuration will detect what is available on the build system, and enable or disable features accordingly . It doesn’t matter what version you have installed right now, it matters what was available during build on the build system.

That being said , if source packages are available in the repository , it could be so simple as a ‘dpkg-buildpackage’ in the extracted source-package.

  1. the libraw version needed has no release yet. https://github.com/LibRaw/LibRaw/issues/435
  2. the OBS packages usually use the libraries that come with the base distro to make it easy to install them. because of point 1 there is no distro yet that ships with that version.
  3. for the master build with the intree copy of libraw (YAY intree copies… wooohooo) it seems to build with libraw. (i just quickly checked the tumbleweed build log)

edit:
4. i just downloaded an R5 sample and opened it on Tumbleweed with 3.7.0~git1563.aa8d21483d and it works.

btw: for anyone who is building for older distros … your exiv2 also needs to be really new.

and if you own Canon Eos R gear … it seems a lot of metadata is still missing for lensfun and you can contribute to that PIXLS.US - Create lens calibration data for lensfun

That’s not correct. libraw is a submodule.

You are using the mechanism of a submodule to effectively creating an intree copy. different tool. same shit. for an user/packager it is yet another copy of the same library.

No magic since no distrib have a libraw version recent enough to get CR3 support for more than a very few cameras. Hopefully a temporary solution. And note also that we are using a static lib to avoid messing with whatever shared version would be supported by the distrib.