-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 20.04.1 and 20.10
- Ubuntu 22.04
- Fedora
- openSUSE
- Debian 8 Jessie
- Arch Linux
- Linux Mint 18
- Gentoo Linux
- Manjaro Linux 18.0
First, install git, clone the repository and check out the latest stable release:
git clone https://github.com/darktable-org/darktable.git
cd darktable
git submodule init
git submodule update
# Stay on the master branch to compile latest development version, or
# find the latest release, e.g. release-3.4.0:
git checkout release-3.4.0
Then install the dependencies (listed below) and build:
./build.sh
To build all the docs (must be run after ./build.sh
script):
./build-doc.sh
- Build status: PASS
- Tested with darktable 3.2.1 and darktable 3.4
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 libopenjp2-7-dev libsecret-1-dev libgraphicsmagick1-dev libcolord-dev libcolord-gtk-dev libcups2-dev libosmgpsmap-1.0-dev libopenjp2-7-dev python3-jsonschema llvm-10-dev clang libimage-exiftool-perl liblua5.3-dev libsaxon-java openjdk-14-jre imagemagick fop po4a
The following two optional dependencies can't be installed using official repository (but can be done manually or using other repositories):
- Ubuntu 20.04 and 20.10 ship with libgmic-dev 2.4.5 and darktable requires >= 2.7, so it can't be installed using official's repository.
- libavif is available with the package libavif-dev, but only available on Ubuntu hirsute (future version of Ubuntu)
- Build status: PASS
- Tested with darktable 4.4.0, 4.4.2, 4.6, 4.8
sudo apt-get -y install build-essential appstream-util desktop-file-utils gettext git intltool libatk1.0-dev libcairo2-dev libcolord-dev libcolord-gtk-dev libcups2-dev libcurl4-gnutls-dev libimage-exiftool-perl libfuse2 libgdk-pixbuf2.0-dev libglib2.0-dev libgraphicsmagick1-dev libgtk-3-dev libinih-dev libjpeg-dev libjson-glib-dev liblcms2-dev liblensfun-dev liblensfun-bin liblensfun-data-v1 liblensfun1 libopenjp2-7-dev libosmgpsmap-1.0-dev libpango1.0-dev libpng-dev libportmidi-dev libpugixml-dev librsvg2-dev libsaxon-java libsdl2-dev libsecret-1-dev libsqlite3-dev libtiff5-dev libwebp-dev libx11-dev libxml2-dev libxml2-utils ninja-build perl po4a python3-jsonschema xsltproc zlib1g-dev appstream
sudo apt-get install libavif-dev libgmic-dev libgphoto2-dev libheif-dev libimath-dev libopenexr-dev libjxl-dev x11proto-dev libxfixes-dev
NOTE: Tested with 3.2.1 on Fedora 32 and Fedora 33.
NOTE: This very likely works for older Fedora versions too.
sudo dnf install gcc-c++ cmake make perl intltool libxslt zlib-devel gtk3-devel libxml2-devel sqlite-devel librsvg2-devel libcurl-devel libjpeg-turbo-devel libtiff-devel lcms2-devel json-glib-devel exiv2-devel pugixml-devel
sudo dnf install lensfun-devel libgphoto2-devel OpenEXR-devel libwebp-devel openjpeg2-devel libsecret-devel GraphicsMagick-devel iso-codes-devel colord-devel colord-gtk-devel cups-devel osm-gps-map-devel libsoup-devel clang llvm-devel lua-devel desktop-file-utils
For the 3D Lut module (comes with a lot of dependencies):
sudo dnf install gmic-devel
On Fedora 33+ (on Fedora 32 you need to compile libavif manually):
sudo dnf install libavif-devel
sudo dnf install 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 pugixml
sudo pacman -S openexr libwebp flickcurl graphicsmagick libcups libsoup libgphoto2 sdl mesa-libgl dbus-glib osm-gps-map
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 -S cmake intltool libcurl-gnutls intltool llvm6 llvm6-libs clang
In the standard installation of Manjaro all optional packages are already installed for darktable.
sudo pacman -S gnome-doc-utils fop docbook-xml docbook-xsl
Additional saxon6 is required but the installation from AUR does not work and saxon6 has to be installed manually.
First download the saxon 6.5 zip file from http://saxon.sourceforge.net/#F6.5.5 and switch to the folder with the downloaded zip file.
Now run the following commands:
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' | 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
Finally Oracle Java must be installed from AUR and set as default.
sudo yaourt jdk
Check which jdk has been installed in your system.
archlinux-java status
Now set Oracle Java as the default jdk.
sudo archlinux-java set java-11-jdk
sudo pacman -S po4a
darktable wiki is licensed under the Creative Commons BY-SA 4.0 terms.