How do you compile Darktable current dev please?

hi, I’d like to compile dev from time to time, but I’m a bit stuck getting going. I’ve seen this wiki
which has some info but only goes up to Ubuntu 17.10, and is darktable 2.2 of course.

So if you could provide any details for Ubuntu 18.04, especially the dependencies ready for doing “sudo apt-get install”, that would be great.

I am no linux expert, but am used to compiling rawtherapee.

thanks and Happy New Year

On RPM systems you can do:

dnf builddep darktable


zypper si -d darktable

Maybe there is something similar for Debian based systems.

Thanks Andreas and for a quick response, but I need something really simple to follow like
"Here are the dependencies for ubuntu 18.04 -
libgtk-3-dev libxml2-utils libxml2-dev liblensfun-dev dada dada dada… " !

I’m assuming various people do this (but could be wrong…)

Just this one is better :
And yes, it’s still works on actual master 3.1.0 as I use them. The only thing is to make sure to do the git submodule init one time on actual master to be sure to have OpenCL headers that have been moved in this master.

I ran the linked instructions but for 3.0.0 and everything went perfectly. At the end of the build I got:

To actually install darktable you need to type:
$ cmake --build "/home/dave/darktable/build" --target install -- -j4

I typed exactly that and got a complaint about privileges so I added “sudo.” Everything went perfectly so I assumed darktable was installed. How do I start darktable? In terminal I type “darktable” and it tells me I can install it with sudo apt install darktable but I suspect that will install from the Ubuntu repo? It doesn’t show up when I search using the Super key either. Running Linux Mint 19. This is the first time I’ve ever built darktable.

Where is tgr darktable executable? Add that folder to your path and/or create a .desktop file so it’ll show in your GUI menu.

Based on what I found the executable is:

Installing: /opt/darktable/bin/darktable
-- Set runtime path of "/opt/darktable/bin/darktable" to "$ORIGIN/../lib/darktable"

So to start it I started with:


And I did a lot of reading and learned how to make a .desktop file!

1 Like


1 Like

When 3.0.1 is released do I just do a git pull and checkout the new version and build again?

Is there a way, on Linux, to have the current stable version running alongside a self-built dev version? I want to continue using stable for my day-to-day editing but play with the latest version, and help testing people’s pull requests. I’ve had trouble getting OpenCL working in a VM and it would be great if I could get them both running simultaneously on my main machine.

Build the source and put the darktable executable somewhere not on your path.

Thanks @paperdigits. I’d naively assumed that would just put the darktable executable file itself at the new location. Does that also ensure the associated files (styles, libraries etc) are separated as well?

Is there a way to tell the dev version to look elsewhere for its database and other user files (i.e. somewhere other than ~/.config/darktable) or do I have to do that via a command-line option?

Ok so here’s what I did, after installing the prerequisites, in case anyone else wants to do this.

I think these steps are enough to keep the dev and stable builds separate.

I followed the ‘General Build’ instructions on, but before I ran ./ I amended it to set the variable INSTALL_PREFIX_DEFAULT to “$HOME/darktable-dev” (edit: there was a better way to do this: “./ --prefix $HOME/darktable-dev”).

When I ran the install step I ran it as a normal user, to be absolutely certain I wasn’t interfering with anything from my existing installation.

I then ran darktable from the command-line, as follows:

$HOME/darktable-dev/bin/darktable --cachedir “$HOME/.cache/darktable-dev” --configdir “$HOME/.config/darktable-dev”

You should also specify a different library and data database.

All, thanks for the info and tips, it has enabled me to build it, whoopee!

I’d like to check a few things please -

  1. Open CL headers

I wasn’t sure what you meant. The main commands I ran were
git checkout release-3.1.0
git submodule init
git submodule update
./ …
Is that everything I need to do pls?

  1. “Compiler understands” errors
    I had several, e.g.
    – Performing Test C_COMPILER_UNDERSTANDS_-Wold-style-declaration
    – Performing Test C_COMPILER_UNDERSTANDS_-Wold-style-declaration - Success
    – Performing Test CXX_COMPILER_UNDERSTANDS_-Wold-style-declaration
    – Performing Test CXX_COMPILER_UNDERSTANDS_-Wold-style-declaration - Failed

Also failed : Wthread-safety, Wno-error=address-of-packed-member
Is there anything to worry about here?

  1. LLVM version
    It looked for 9, 8, 7 and settled on 6 ("-- Found LLVM 6.0.0") but at the same time did not seem happy with 6 -
    " The following configuration files were considered but not accepted:
    /usr/lib/llvm-6.0/cmake/LLVMConfig.cmake, version: 6.0.0"
    Anything to worry about?

  2. Json Schema
    “-- Missing jsonschema, problems in noiseprofiles.json might go unnoticed”
    Is this to be expected?

  3. Rawspeed failures, CXX flags
    e.g. “-- Performing Test RAWSPEED_HAVE_CXX_FLAG_WEXTRA_SEMI - Failed”
    Anything to worry about?

  4. Rawspeed source files missing?
    “You have called ADD_LIBRARY for library rawspeed without any source files. This typically indicates a problem with your CMakeLists.txt file”
    “You have called ADD_LIBRARY for library rawspeed_get_number_of_processor_cores without any source files. This typically indicates a problem with your CMakeLists.txt file”

  5. Headers for OpenJpeg
    “CMake Warning at cmake/modules/LibFindMacros.cmake:263 (message):
    We could not find development headers for OpenJPEG. Do you have the
    necessary dev package installed? This package is NOT REQUIRED and you may
    ignore this warning but by doing so you may miss some functionality of
    Relevant CMake configuration variables:
    You may use CMake GUI, cmake -D or ccmake to modify the values. Delete
    CMakeCache.txt to discard all values and force full re-detection if

  6. Various untranslated messages
    e.g. “[ 0%] Building th locale
    1621 translated messages, 557 fuzzy translations, 877 untranslated messages.”
    Does this matter?

  7. Built version is “3.1.0+dirty” What does the dirty signify?!

  8. .cache .config folders
    I followed @elstoc 's lead and used my own folders. Presumably I could have used the existing ones from my previous .deb install (folders simply called “darktable”) providing I had checked there would be no clash over ?database and ?xmp formats ?

Thanks again. On a quick test, it’s working.

I thought that as well but it automatically created a library and data db in the config directory I specified and didn’t touch my pre-existing databases when I launched it.

1 Like

502 Bad Gateway on that link, @Nilvus!

Redmine is KO, again. Some things have been explained on Github Wiki : (see pages links on the right too).

1 Like

Thanks. I think I have managed to get darktable 3.2.1 compiled and installed.

1 Like