Project

General

Profile

Building darktable 2.2

NOTE: This is a work in progress, currently contains a lot of outdated entries from 2.0 build instructions.

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.2 release, e.g. release-2.2.0
git checkout release-2.2.0

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 15.10

Note: including this in order to support those with AMD graphics cards that require the fglrx driver - no longer supported on Ubuntu 16.04 or above.

Note: There is no llvm-3.9/clang-3.9 in Ubuntu 16.04, so test-compilation of OpenCL programs can not be done.

  • Build status: PASS

Perform the instructions for Ubuntu 16.04, plus:

Create CLI script for jsonschema:

echo "#! /usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'jsonschema==2.4.0','console_scripts','jsonschema'
__requires__ = 'jsonschema==2.4.0'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.exit(
        load_entry_point('jsonschema==2.4.0', 'console_scripts', 'jsonschema')()
    )" | sudo tee /usr/local/bin/jsonschema
sudo chmod +x /usr/local/bin/jsonschema

Ubuntu 16.04

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

  • Build status 16.04: PASS

Note: There is no llvm-3.9/clang-3.9 in Ubuntu 16.04, so test-compilation of OpenCL programs can not be done.

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 python3-pkg-resources

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 libopenjp2-7-dev python3-jsonschema libopenjp2-7-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.10

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

  • Build status 16.10: 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 libopenjp2-7-dev llvm-3.9 clang-3.9 python3-jsonschema

Also, in order for llvm to be found, you need to do:

export LLVM_DIR=/usr/lib/llvm-3.9/lib/cmake/llvm

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 24 and 25

Build status 24: PASS
Build status 25: 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 libxslt

Optional dependenies:

Note: LLVM 3.9+ is not available on Fedora, so test-compilation of OpenCL programs can not be done.

sudo dnf install libgphoto2-devel OpenEXR-devel libwebp-devel flickcurl-devel openjpeg-devel openjpeg2-devel libsecret-devel GraphicsMagick-devel osm-gps-map-devel colord-devel colord-gtk-devel cups-devel python3-jsonschema

Create CLI script for jsonschema:

echo "#! /usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'jsonschema==2.5.1','console_scripts','jsonschema'
__requires__ = 'jsonschema==2.5.1'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.exit(
        load_entry_point('jsonschema==2.5.1', 'console_scripts', 'jsonschema')()
    )" | sudo tee /usr/local/bin/jsonschema
sudo chmod +x /usr/local/bin/jsonschema

Usermanual:

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

Translated man pages:

sudo dnf install po4a

openSUSE

Binary packages are available for openSUSE and SLE 12.

Build status (Leap 42.1): UNKNOWN
Build status (Leap 42.2): UNKNOWN
Build status (Tumbleweed 2016-12-??): UNKNOWN

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-0-dev libopenjp2-7-dev
echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list
apt-get update
apt-get -t jessie-backports install python3-jsonschema

OpenCL test compilation

Unable to do OpenCL test compilation as clang-3.9 libclang-common-3.9-dev llvm-3.9-dev packages aren't available in Jessie.

Usermanual:

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

Translated man pages:

apt-get install po4a

h2. Arch Linux

Build status: *UNKNOWN*

There is a package in the arch user repository (AUR) called "darktable-git":https://aur.archlinux.org/packages/darktable-git/. At the time of writing this was rather out of date.

*Minimal dependencies*

<pre>
sudo pacman -S base-devel cmake intltool lensfun curl exiv2 lcms2 librsvg libxslt sqlite
</pre>

<pre>
mkdir aur
cd aur/
git clone https://aur.archlinux.org/pugixml.git
cd pugixml/
makepkg -sri
cd
</pre>

*Optional dependencies*

<pre>
sudo pacman -S openexr libwebp flickcurl graphicsmagick libcups libsoup libgphoto2 sdl mesa-libgl dbus-glib
</pre>

<pre>
cd aur
git clone https://aur.archlinux.org/osm-gps-map.git
cd osm-gps-map
makepkg -sri
cd
</pre>

*Usermanual*

<pre>
sudo pacman -S jdk8-openjdk gnome-doc-utils fop imagemagick extra/docbook-xml extra/docbook-xsl
</pre>

<pre>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</pre>

*Translated man pages*

<pre>
sudo pacman -S po4a
</pre>

h2. Linux Mint 18

Build status: *UNKNOWN*

*Minimal dependencies:*

<pre>
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
</pre>

*Optional dependencies:*

<pre>
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
</pre>

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):

<pre>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</pre>

Create the missing pkg-config file:

<pre>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</pre>

*Usermanual:*

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

*Translated man pages:*

<pre>
sudo apt-get install po4a
</pre>

h2. Gentoo Linux

Build status: *UNKNOWN*

* building usermanual appeared to hang at:

<pre>Scanning dependencies of target darktable_single_xml
[ 96%] Generating the profiled docbook xml file</pre>

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:*

<pre>
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
</pre>

*Optional dependencies:*

<pre>
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
</pre>

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:

<pre>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</pre>

* media-libs/openjpeg is version 2.1.0, need 1.x, so we build from source:

<pre>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</pre>

*Usermanual:*

For one of the dependencies of fop (dev-java/sun-jms-1.1-r2), we need to do this:
<pre>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
 * </pre>

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

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

Then:

<pre>
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
</pre>

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:

* download the saxon 6.5 zip file from http://saxon.sourceforge.net/#F6.5.5.

<pre>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</pre>

*Translated man pages:*

<pre>
emerge --ask app-text/po4a
</pre>

Also available in: PDF HTML TXT