R&Darktable build on Linux - help

@anon41087856

Curious to see your improvements I downloaded the ZIP file with sourcecode but I’m getting stuck already in the configuration stage with Cmake which is complaining about missing make files. Any help highly appreciated.

After my starting the make process with: cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr …/

CMake Error at src/external/CMakeLists.txt:2 (add_subdirectory):
  The source directory

    /home/mike/Downloads/R-Darktable-master/src/external/libxcf

  does not contain a CMakeLists.txt file.


CMake Error at src/external/CMakeLists.txt:18 (message):
  RawSpeed submodule not found.  You probably want to run:

  $ git submodule init

  and then

  $ git submodule update


-- Configuring incomplete, errors occurred!

Morning, @Mike_Bing,

Odd. What operating system are you using?
Have you successfully been able to compile “ordinary” darktable?
I handle R&Darktable in exactly the same way.

However, I do not use the zip-fetch-method — instead I run git pull, &c.

Have fun!
Claes in Lund, Sweden

I’m on Manjaro. DT itself builds ok.

What are the git commands you have used? I always get confused building from git directly.

Building software is not my strong point because it’s not something I have to do often but I just followed the usual build instructions for DT changing to suit so:

git clone --recurse-submodules --depth 1 [paste link to R&Darktable GitHub - aurelienpierre/R-Darktable: A darktable fork with some bloat removed]
cd R-Darktable

git submodule update --init

./build.sh --prefix /opt/R-Darktable --build-type Release --install --sudo

1 Like

I see where my mistake was now when I tried cloning: forgot the “–recurse-submodules --depth 1” bit. Oh well, that’s what you get for getting all lazy and installing only from repos and AUR :rofl:

That worked like a treat, building and installing now. Thank you so much!

2 Likes

Once you clone it, you can keep it updated with the following commands (these assume that darktable sources are in ~/darktable):

cd ~/darktable
git clean -d -f -x 
git pull --rebase
git submodule update
./build.sh <whatever params you want>
rm -rf ~/.cache/darktable/cached_kernels*

git clean -d -f -x makes sure you start with a new build environment (no left-over files from the previous build).
git pull --rebase updates the code; git submodule update updates the submodules.
rm -rf ~/.cache/darktable/cached_kernels* removes the compiled versions of OpenCL kernels, to make sure you start with a clean slate there as well.

8 Likes

That’s saved me a job, I was going to ask this.

Thanks.

I’ve built a test version of Darktable in the past but it was just to take an early look at one feature so updates wern’t needed.

1 Like

About building, I have nothing to add except that I was able to build it using the standard git clone and build.sh commands exactly like with standard darktable…

I have noticed something funny though that I still need to double check before raising an issue or asking directly to Aurelien, so I’ll just ask here in an “informal way”:

→ starting with a blank config / new database, when importing a folder of files already processed in dt (so r&dt reads the info off the .xmp files) I have noticed that white balance module gets modified from the default “camera reference” like it should be when using color calibration to adjust wb; so I have to manually change white balance to camera reference to have color calibration work as intended. Has anybody else noticed this?

Yup, noticed the same thing

I’m pretty sure there are some “initialisation” quirks in mainstream dt which cause odd things to happen now and again when you start with a new build or start a new editing session. I reported one a few months back and someone else also saw it happen but neither of us were able to reproduce it. Any such quirks will presumably be in R&D also.

I just had a quick play with R&D but don’t want to mess with cache/config right now. I just cycled round discarding history, deleting then re-loading the raw with known XMP. I’m finding the white balance is being honoured (cam ref or not), and if there’s no XMP then camera reference is set as expected.

2 Likes

Given the recent interest in R&Darktable, shouldn’t this be pinned somewhere for us non technical folks? Thanks, @kofa

1 Like

I was trying to clone the R&Darktable in Fedora 36 but got this error. Can someone help me please?

╰─ git clone https://github.com/aurelienpierre/R-Darktable.git
Cloning into 'R-Darktable'...
remote: Enumerating objects: 252747, done.
remote: Counting objects: 100% (78/78), done.
remote: Compressing objects: 100% (40/40), done.
error: RPC failed; curl 56 OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
error: 6988 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

What I’m doing wrong?

That’s an SSL error. Try from a different network or make sure your systems ca-certs are up to.date.

1 Like

ok, thanks.

I made this:

git clone https://github.com/aurelienpierre/R-Darktable.git
cd R-Darktable
git submodule update --init

/build.sh --prefix /opt/R-Darktable --build-type Release --install --sudo

But at 70% got this error.

[ 70%] Built target global_toolbox
[ 70%] Generating introspection_rawprepare.c
Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.34 /usr/local/share/perl5/5.34 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /home/franklin/R-Darktable/tools/introspection/parser.pl line 27.
BEGIN failed--compilation aborted at /home/franklin/R-Darktable/tools/introspection/parser.pl line 27.
gmake[2]: *** [lib64/darktable/plugins/CMakeFiles/rawprepare.dir/build.make:76: lib64/darktable/plugins/introspection_rawprepare.c] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:4015: lib64/darktable/plugins/CMakeFiles/rawprepare.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
[ 70%] Linking C shared module libmidi.so
[ 70%] Built target midi
[ 70%] Linking C shared module liblocation.so
[ 70%] Linking C shared module libgamepad.so
[ 70%] Linking C shared module libmap_settings.so
[ 70%] Built target location
[ 70%] Built target gamepad
[ 70%] Built target map_settings
[ 70%] Linking C shared module libmap_locations.so
[ 70%] Built target map_locations
[ 70%] Linking C shared module libgeotagging.so
[ 70%] Built target geotagging
[ 70%] Linking C shared module libprint_settings.so
[ 70%] Built target print_settings
gmake: *** [Makefile:156: all] Error 2

Did you restart the compilation?

I did it once and then I did it again but both times I got the same error.

Did you verify all needed dependencies? Just after the build command, you can see which packages are missing

Thanks, I’ll doit ASAP.

I successfully (I think) build darktable for Pop OS 22.10, with one caveat that I will get to later in the post. If nothing else, this Fork I am embracing, along with

Some thoughts and questions, as I start getting used to being more “bleeding edge” and hopefully being more helpful around here:

—The build instructions for my OS worked fine with one caveat that I’ll get to a little later. The Github readme has copied and posted instructions for 3.8.1, but you have to replace the github address for the R-Darktable page. So the process (for people like me who aren’t as experienced) is:

  1. Install all of the dependencies listed for your distro, as listed on https://github.com/aurelienpierre/R-Darktable

  2. Clone and build using the following commands:

git clone --recurse-submodules --depth 1 https://github.com/aurelienpierre/R-Darktable.git
cd darktable
git fetch --tags
git checkout tags/release-3.8.1

Notice the github address is different (for those of us who aren’t experienced and want to just copy/paste commands. It seemed to “work” using the git checkout command unchanged… is this correct if I am building the “fork”?

  1. Get submodules:
    git submodule update --init

  2. Compile using the script:
    ./build.sh --prefix /opt/darktable --build-type Release --install --sudo

I know in theory to to “fix this” on the github, but could someone help me/go over it/just do it, as I don’t want to cause more harm than good while I learn to use github better… so any help would be appreciated.

Now for my issue. The build worked and I can open the program; however, it doesn’t show as installed: typing “darktable” in terminal asks me if I want to install it, but when I search for darktable in my launcher, darktable comes up with a gear logo: clicking on that opens it.

The last step listed on the readme is:
ln -s /opt/darktable/share/applications/darktable.desktop /usr/share/applications/darktable.desktop

When I type that, I get:
ln: failed to create symbolic link ‘/usr/share/applications/darktable.desktop’: File exists

There is a file called darktable.desktop in both the /opt/share/applications/ and in /user/share/applications

I thought I had removed everything to do this as a fresh install. Help?

I can at least use this (and my opinion, once it is build, I like it better than 4.0) so I’m I guess I ready to learn more to help debug etc (starting with the readme file :slight_smile: