-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Building darktable
NOTE: This information was migrated from https://redmine.darktable.org/projects/darktable/wiki/Building_darktable_22 It contains a lot of outdated information and needs to be updated.
- General build instructions
- Ubuntu 15.10
- Ubuntu 16.04
- Ubuntu 16.10
- Ubuntu 17.04 and 17.10
- Fedora 24 and 25
- openSUSE
- Debian 8 Jessie
- Arch Linux
- Linux Mint 18
- Gentoo Linux
- Manjaro Linux 20.0
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:
./build-doc.sh
cd build
make darktable-usermanual
To additionally build the lua-api manual
make darktable-lua-api
To build all the docs:
./build-doc.sh
(must be run after ./build.sh
script)
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
Note: binary packages are available from pmjdebruijn's release ppa.
- Build status: 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.
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
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
sudo apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl
sudo apt-get install po4a
Note: binary packages are available from pmjdebruijn's release ppa.
- Build status: PASS
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
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
sudo apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl
sudo apt-get install po4a
Note: binary packages are available from pmjdebruijn's release ppa.
- Build status: PASS
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
sudo apt-get install libgphoto2-dev libsoup2.4-dev libopenexr-dev libwebp-dev libflickcurl-dev libopenjp2-7-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
sudo apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl
sudo apt-get install po4a
- Build status 24: PASS
- Build status 25: PASS
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
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
sudo dnf install saxon ImageMagick gnome-doc-utils fop docbook-dtds docbook-style-xsl java-1.8.0-openjdk-devel
sudo dnf install po4a
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
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
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
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
sudo zypper install po4a xml2po
- Build status: PASS
Note: no sudo by default on debian; use su to go to root before installing.
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
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
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.
apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl
apt-get install po4a
- Build status: UNKNOWN
There is a package in the arch user repository (AUR) called darktable-git. At the time of writing this was rather out of date.
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
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
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
sudo pacman -S po4a
- Build status: UNKNOWN
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
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
sudo apt-get install default-jdk gnome-doc-utils libsaxon-java fop imagemagick docbook-xml docbook-xsl
sudo apt-get install po4a
- Build status: UNKNOWN
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
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
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
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.
-
- Accept the License Agreement
-
- Download jms-1_1-fr-apidocs.zip
-
- 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:
download the saxon 6.5 zip file from http://saxon.sourceforge.net/#F6.5.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
emerge --ask app-text/po4a
- Build status: Testing
In addition to the standard installation, the following packages have to be installed.
sudo pacman -Syyu
sudo pacman -S base-devel cmake intltool lensfun curl exiv2 lcms2 librsvg libxslt sqlite pugixml llvm llvm-libs
sudo pacman -S openexr libwebp graphicsmagick libcups libsoup libgphoto2 sdl mesa-libgl dbus-glib osm-gps-map
sudo pacman -S libavif colord-gtk gmic lua53 gmic
If you wasnt to build the docs, some additional packages are requied. Note that some of them are not longer available under Manjaro, and so you need to install them from the AUR repsository. For this, you will need to install yay package manager (or equivalent)
sudo pacman -S jdk11-openjdk fop imagemagick extra/docbook-xml extra/docbook-xsl perl-pod-parser yay
yay -S gnome-doc-utils saxon6 saxon-he docbook-xsl-saxon
sudo pacman -S po4a #if you want to build translated man pages
Additional saxon6 is required but the installation from AUR does not work and some manuala steps are required.
cd /usr/share/java
sudo ln -s /usr/share/java/saxon6/saxon.jar
sudo ln -s /usr/share/java/saxon6/saxon-xml-apis.jar
echo '#!/bin/sh' | sudo tee /usr/local/bin/saxon-xslt
echo '' | sudo tee -a /usr/local/bin/saxon-xslt
echo 'exec java -classpath /usr/share/java/saxon.jar com.icl.saxon.StyleSheet "@0"' | sudo tee -a /usr/local/bin/saxon-xslt
sudo chmod a+x /usr/local/bin/saxon-xslt
Once the dependencies are installed, the source can be checked out:
mkdir ~/git
git clone --resuce-submodules https://github.com/darktable-org/darktable.git ~/git/darktable
cd ~/git/darktable
./build.sh
./build-doc.sh #if you want to build the docs
cd build
sudo make install
darktable wiki is licensed under the Creative Commons BY-SA 4.0 terms.