Project

General

Profile

Building darktable 2.0

General build instructions

First, install git, clone the repo and check out the latest stable release:

git clone https://github.com/darktable-org/darktable.git
cd darktable
git tag # find the latest 2.0 release, e.g. release-2.0.4
git checkout release-2.0.4

Then install the dependencies (listed below) and build:

./build.sh

To build the usermanual:

cd build
make darktable-usermanual

To additionally build the lua-api manual

make darktable-lua-api

Ubuntu 14.04

Note: binary packages are now available from pmjdebruijn's unstable ppa.

Build status: PASS

Minimal dependencies:

sudo apt-get install gcc g++ cmake intltool xsltproc libgtk-3-dev libxml2-utils libxml2-dev liblensfun-dev librsvg2-dev libsqlite3-dev libcurl4-gnutls-dev libjpeg-dev libtiff4-dev liblcms2-dev libjson-glib-dev libexiv2-dev libpugixml-dev

Optional dependencies:

sudo apt-get install libgphoto2-dev libsoup2.4-dev libopenexr-dev libwebp-dev libflickcurl-dev libopenjpeg-dev libsecret-1-dev libgraphicsmagick1-dev libcolord-dev libcolord-gtk-dev libcups2-dev libsdl1.2-dev libsdl-image1.2-dev libgl1-mesa-dev libosmgpsmap-1.0-dev

There is a problem with the libosmgpsmap-1.0-dev package from trusty backports (installed above). It is missing the pkg-config file that darktable uses to find the library. You have two options to fix this.

1. Install the osm-gps-map package from pmjdebruijn's unsatble ppa.

or

2. Create the pkg-config file:

echo 'prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include

Name: osm-gps-map
Description: Moving map widget using openstreet map data
Version: 1.0.2
Requires: gtk+-3.0 libsoup-2.4
Libs: -L${libdir} -losmgpsmap-1.0
Cflags: -I${includedir}/osmgpsmap-1.0' | sudo tee /usr/lib/x86_64-linux-gnu/pkgconfig/osmgpsmap-1.0.pc

Usermanual:

sudo apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl

Translated man pages:

sudo apt-get install po4a

Ubuntu 15.10

Note: binary packages are now available from pmjdebruijn's unstable ppa.

  • Build status: PASS

Minimal dependencies:

sudo apt-get install gcc g++ cmake intltool xsltproc libgtk-3-dev libxml2-utils libxml2-dev liblensfun-dev librsvg2-dev libsqlite3-dev libcurl4-gnutls-dev libjpeg-dev libtiff5-dev liblcms2-dev libjson-glib-dev libexiv2-dev libpugixml-dev

Optional dependencies:

sudo apt-get install libgphoto2-dev libsoup2.4-dev libopenexr-dev libwebp-dev libflickcurl-dev libopenjpeg-dev libsecret-1-dev libgraphicsmagick1-dev libcolord-dev libcolord-gtk-dev libcups2-dev libsdl1.2-dev libsdl-image1.2-dev libgl1-mesa-dev libosmgpsmap-1.0-0-dev

Usermanual:

sudo apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl

Translated man pages:

sudo apt-get install po4a

Ubuntu 16.04 and Ubuntu 16.10

Note: binary packages are now available from pmjdebruijn's unstable ppa.

  • Build status: PASS

Minimal dependencies:

sudo apt-get install gcc g++ cmake intltool xsltproc libgtk-3-dev libxml2-utils libxml2-dev liblensfun-dev librsvg2-dev libsqlite3-dev libcurl4-gnutls-dev libjpeg-dev libtiff5-dev liblcms2-dev libjson-glib-dev libexiv2-dev libpugixml-dev

Optional dependencies:

sudo apt-get install libgphoto2-dev libsoup2.4-dev libopenexr-dev libwebp-dev libflickcurl-dev libopenjpeg-dev libsecret-1-dev libgraphicsmagick1-dev libcolord-dev libcolord-gtk-dev libcups2-dev libsdl1.2-dev libsdl-image1.2-dev libgl1-mesa-dev libosmgpsmap-1.0-dev

Usermanual:

sudo apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl

Translated man pages:

sudo apt-get install po4a

Fedora 22

Binary packages are available. Also available from COPR.

Build status: PASS

  • need to build with RelWithDebInfo build type (see Fedora 23):
./build.sh --buildtype RelWithDebInfo

Minimal dependencies:

sudo dnf install cmake gcc-c++ intltool gtk3-devel libxml2-devel lensfun-devel librsvg2-devel sqlite-devel libcurl-devel libjpeg-turbo-devel libtiff-devel lcms2-devel json-glib-devel exiv2-devel pugixml-devel

Optional dependenies:

sudo dnf install libsoup-devel libgphoto2-devel OpenEXR-devel libwebp-devel flickcurl-devel openjpeg-devel libsecret-devel GraphicsMagick-devel osm-gps-map-devel colord-devel colord-gtk-devel cups-devel SDL-devel

Usermanual:

sudo dnf install java-1.8.0-openjdk-devel ImageMagick gnome-doc-utils fop docbook-dtds docbook-style-xsl

Note: Saxon 6.5 is not present in the Fedora 22 package archive (the saxon package will give you saxon-he 9.3 rather than saxon 6.5 as required by darktable). To install saxon 6.5:

sudo mkdir -p /usr/local/share/java/
sudo unzip saxon6-5-5.zip -d /usr/local/share/java/saxon6-5-5
cd /usr/share/java
sudo ln -s /usr/local/share/java/saxon6-5-5/saxon.jar
sudo ln -s /usr/local/share/java/saxon6-5-5/saxon-xml-apis.jar
echo '#!/bin/sh

exec java -classpath /usr/share/java/saxon.jar com.icl.saxon.StyleSheet "@0"' | sudo tee /usr/local/bin/saxon-xslt
sudo chmod a+x /usr/local/bin/saxon-xslt
PATH="/usr/local/bin:$PATH"

Translated man pages:

sudo dnf install po4a

Fedora 23

Binary packages are available. Also available from COPR.

Build status: PASS

Problem: GCC 5.1.1 has a bug that prevents building as Release (the default build type).

Solution: Don't build as Release but RelWithDebInfo, or use a newer version of GCC.

./build.sh --buildtype RelWithDebInfo

Minimal dependencies:

sudo dnf install cmake gcc-c++ intltool gtk3-devel libxml2-devel lensfun-devel librsvg2-devel sqlite-devel libcurl-devel libjpeg-turbo-devel libtiff-devel lcms2-devel json-glib-devel exiv2-devel pugixml-devel

Optional dependenies:

sudo dnf install libsoup-devel libgphoto2-devel OpenEXR-devel libwebp-devel flickcurl-devel openjpeg-devel libsecret-devel GraphicsMagick-devel osm-gps-map-devel colord-devel colord-gtk-devel cups-devel SDL-devel

Usermanual:

sudo dnf install ImageMagick gnome-doc-utils fop docbook-dtds docbook-style-xsl

Note: Saxon 6.5 is not present in the Fedora 23 package archive (the saxon package will give you saxon-he 9.3 rather than saxon 6.5 as required by darktable). See instructions in the Fedora 22 section for how to install it.

Translated man pages:

sudo dnf install po4a

nVidia OpenCL support

From this mailing list thread, to enable OpenCL support for accelerated processing on nVidia cards:

Enable the RPMFusion repos:

sudo dnf install akmod-nvidia "kernel-devel-uname-r == $(uname -r)" 
sudo dnf update -y
sudo dnf install xorg-x11-drv-nvidia-cuda
sudo dnf install mesa-libOpenCL clinfo
sudo shutdown -r now  # reboot the system

Check that the nvidia-uvm module is loaded:

lsmod |grep nvidia-uvm

If not, load it:

sudo modprobe nvidia-uvm

Fedora 24

Build status: PASS

Minimal dependencies:

sudo dnf install cmake gcc-c++ intltool gtk3-devel libxml2-devel lensfun-devel librsvg2-devel sqlite-devel libcurl-devel libjpeg-turbo-devel libtiff-devel lcms2-devel json-glib-devel exiv2-devel pugixml-devel

Optional dependenies:

sudo dnf install libsoup-devel libgphoto2-devel OpenEXR-devel libwebp-devel flickcurl-devel openjpeg-devel libsecret-devel GraphicsMagick-devel osm-gps-map-devel colord-devel colord-gtk-devel cups-devel SDL-devel

Usermanual:

sudo dnf install ImageMagick gnome-doc-utils fop docbook-dtds docbook-style-xsl

Note: Saxon 6.5 is not present in the Fedora 24 package archive (the saxon package will give you saxon-he 9.3 rather than saxon 6.5 as required by darktable). See instructions in the Fedora 22 section for how to install it.

Translated man pages:

sudo dnf install po4a

openSUSE

Binary packages are available for openSUSE and SLE 12.

Build status (Leap 42.1): PASS
Build status (Tumbleweed 2015-11-19): PASS

Minimal dependencies

sudo zypper install cmake make gcc gcc-c++ intltool libxslt-tools gtk3-devel libxml2-devel libxml2-tools lensfun-devel librsvg-devel sqlite3-devel libcurl-devel libjpeg8-devel libtiff-devel liblcms2-devel json-glib-devel libexiv2-devel pugixml-devel

Optional dependencies

sudo zypper install libgphoto2-devel openexr-devel libwebp-devel libflickcurl-devel openjpeg-devel libsecret-devel GraphicsMagick-devel libcolord-devel libcolord-gtk-devel cups-devel libSDL-devel libSDL_image-devel libosmgpsmap-devel

Usermanual

sudo zypper install java-1_8_0-openjdk-devel gnome-doc-utils saxon6-scripts saxon6-fop imagemagick docbook_4 docbook-xsl-stylesheets

Make cmake find saxon:

cd /usr/share/java
sudo ln -s saxon6.jar saxon.jar

Translated man pages

sudo zypper install po4a xml2po

Debian 8 Jessie

Build status: PASS

Note: no sudo by default on debian; use su to go to root before installing.

Minimal dependencies

apt-get install gcc g++ cmake intltool xsltproc libgtk-3-dev libxml2-utils libxml2-dev liblensfun-dev librsvg2-dev libsqlite3-dev libcurl4-gnutls-dev libjpeg-dev libtiff5-dev liblcms2-dev libjson-glib-dev libexiv2-dev libpugixml-dev

Optional dependencies

apt-get install libgphoto2-dev libsoup2.4-dev libopenexr-dev libwebp-dev libflickcurl-dev desktop-file-utils libopenjpeg-dev libsecret-1-dev libgraphicsmagick1-dev libcolord-dev libcolord-gtk-dev libcups2-dev libsdl1.2-dev libsdl-image1.2-dev libgl1-mesa-dev libosmgpsmap-1.0-dev

Usermanual

apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl

Translated man pages:

apt-get install po4a

Arch Linux

Build status: PASS

There is a package in the arch user repository (AUR) called darktable-git. At the time of writing this was rather out of date.

Minimal dependencies

sudo pacman -S base-devel cmake intltool lensfun curl exiv2 lcms2 librsvg libxslt sqlite
mkdir aur
cd aur/
git clone https://aur.archlinux.org/pugixml.git
cd pugixml/
makepkg -sri
cd

Optional dependencies

sudo pacman -S openexr libwebp flickcurl graphicsmagick libcups libsoup libgphoto2 sdl mesa-libgl dbus-glib
cd aur
git clone https://aur.archlinux.org/osm-gps-map.git
cd osm-gps-map
makepkg -sri
cd

Usermanual

sudo pacman -S jdk8-openjdk gnome-doc-utils fop imagemagick extra/docbook-xml extra/docbook-xsl
cd aur
git clone https://aur.archlinux.org/saxon6.git
cd saxon6/
makepkg -sri
cd /usr/share/java
ln -s saxon6/saxon.jar
echo '#!/bin/sh

exec java -classpath /usr/share/java/saxon.jar com.icl.saxon.StyleSheet "@0"' | sudo tee /usr/local/bin/saxon-xslt
cd

Translated man pages

sudo pacman -S po4a

Linux Mint 17.2

Build status: PASS

Minimal dependencies:

sudo apt-get install gcc g++ cmake intltool xsltproc libgtk-3-dev libxml2-utils libxml2-dev liblensfun-dev librsvg2-dev libsqlite3-dev libcurl4-gnutls-dev libjpeg-dev libtiff4-dev liblcms2-dev libjson-glib-dev libexiv2-dev libpugixml-dev

Optional dependencies:

sudo apt-get install libgphoto2-dev libsoup2.4-dev libopenexr-dev libwebp-dev libflickcurl-dev libopenjpeg-dev libsecret-1-dev libgraphicsmagick1-dev libcolord-dev libcolord-gtk-dev libcups2-dev libsdl1.2-dev libsdl-image1.2-dev libgl1-mesa-dev

Note that osmgpsmap 1.0.2 does not exist in the mint package archive. We can use the same resolution to the problem in Ubuntu 14.04 above by adding the ubuntu trusty-backports source and installing from there. Update the country code in the deb source below (or your favourite mirror):

echo 'deb http://au.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list.d/additional-repositories.list
echo 'Package: *
Pin: release a=trusty-backports
Pin-Priority: 100' | sudo tee -a /etc/apt/preferences
sudo apt-get update
sudo apt-get install libosmgpsmap-1.0-dev

Create the missing pkg-config file:

echo 'prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include

Name: osm-gps-map
Description: Moving map widget using openstreet map data
Version: 1.0.2
Requires: gtk+-3.0 libsoup-2.4
Libs: -L${libdir} -losmgpsmap-1.0
Cflags: -I${includedir}/osmgpsmap-1.0' | sudo tee /usr/lib/x86_64-linux-gnu/pkgconfig/osmgpsmap-1.0.pc

Usermanual:

sudo apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl

Translated man pages:

sudo apt-get install po4a

Gentoo Linux

Build status: PASS

  • building usermanual appeared to hang at:
Scanning dependencies of target darktable_single_xml
[ 96%] Generating the profiled docbook xml file

But completed 34 minutes later!

Note: need sse3 USE flag to be set by adding sse3 to /etc/portage/make.conf, e.g.

USE="bindist mmx sse sse2 sse3" 
CPU_FLAGS_X86="sse3"

Rebuild:

emerge --update --deep --newuse @world
emerge --depclean

Minimal dependencies:

emerge --ask dev-util/cmake dev-util/intltool dev-libs/libxslt x11-libs/gtk+ dev-libs/libxml2 media-libs/lensfun gnome-base/librsvg dev-db/sqlite net-misc/curl media-libs/libjpeg-turbo media-libs/tiff media-libs/lcms dev-libs/json-glib media-gfx/exiv2 dev-libs/pugixml

Optional dependencies:

emerge --ask media-libs/libgphoto2 net-libs/libsoup media-libs/openexr media-libs/libwebp media-libs/flickcurl media-libs/openjpeg app-crypt/libsecret media-gfx/graphicsmagick x11-misc/colord x11-libs/colord-gtk net-print/cups media-libs/libsdl media-libs/sdl-image media-libs/mesa

Optional dependencies that are missing from the package archive:

  • sci-geosciences/osm-gps-map which is present in the gentoo archives is too old. Build from source:
emerge --ask dev-libs/gobject-introspection x11-libs/cairo gnome-base/gnome-common dev-util/gtk-doc
git clone git://github.com/nzjrs/osm-gps-map
cd osm-gps-map
./autogen.sh
make
su
make install
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH
echo 'export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH' >> ~/.bash_profile
  • media-libs/openjpeg is version 2.1.0, need 1.x, so we build from source:
git clone https://github.com/uclouvain/openjpeg.git
cd openjpeg
git tag # find latest 1.x tag
git checkout version.1.5.2 # latest tag from previous line
cmake .
make
su
mkdir /usr/local/share/pkgconfig/
make install

Usermanual:

For one of the dependencies of fop (dev-java/sun-jms-1.1-r2), we need to do this:

Fetch instructions for dev-java/sun-jms-1.1-r2:
 * 
 *  Due to license restrictions, we cannot fetch the
 *  distributables automagically.
 * 
 *  1. Visit http://download.oracle.com/otndocs/jcp/7542-jms-1.1-fr-doc-oth-JSpec/
 *  2. Accept the License Agreement
 *  3. Download jms-1_1-fr-apidocs.zip
 *  4. Move the file to /usr/portage/distfiles
 * 

Note that after copying the zipfile into /usr/portage/distfiles/, I needed to do the following, or the emerge would fail:

su
chmod a+r /usr/portage/distfiles/jms-1_1-fr-apidocs.zip

Then:

emerge --ask virtual/jdk app-text/gnome-doc-utils dev-java/fop media-gfx/imagemagick app-text/docbook-xml-dtd app-text/docbook-xsl-stylesheets

Note: Saxon 6.5 is not present in the Gentoo package archive (the dev-java/saxon package will give you saxon-he 9.3 rather than saxon 6.5 as required by darktable). To install saxon 6.5:

su
mkdir -p /usr/local/share/java/
unzip saxon6-5-5.zip -d /usr/local/share/java/saxon6-5-5
mkdir -p /usr/share/java
cd /usr/share/java
ln -s /usr/local/share/java/saxon6-5-5/saxon.jar
ln -s /usr/local/share/java/saxon6-5-5/saxon-xml-apis.jar
echo '#!/bin/sh

exec java -classpath /usr/share/java/saxon.jar com.icl.saxon.StyleSheet "@0"' > /usr/local/bin/saxon-xslt
chmod a+x /usr/local/bin/saxon-xslt

Translated man pages:

emerge --ask app-text/po4a

Also available in: PDF HTML TXT