Need help compiling on manjaro

Hi all.
When I was running on Mint, I had everything set up to allow me to compile dt from source.
Since moving to manjaro, I have not had much luck in getting that functionality back, and was wondering if anyone would be kind enough to help me sort out what is not working, please?
Here is the output from the terminal:

~/Downloads/darktable/darktable    master !3  ./build.sh --prefix /opt/darktable/darktable-4.6  :heavy_check_mark:  6s 
darktable build script

Building directory: /home/audio2u/Downloads/darktable/darktable/build
Installation prefix: /opt/darktable/darktable-4.6
Build type: RelWithDebInfo
Build generator: Unix Makefiles
Build tasks: 16

– Found OpenMP_C: -fopenmp (found suitable version “4.5”, minimum required is “4.5”)
– Found OpenMP_CXX: -fopenmp (found suitable version “4.5”, minimum required is “4.5”)
– Found OpenMP: TRUE (found suitable version “4.5”, minimum required is “4.5”)
– Building SSE2-optimized codepaths: ON
– Performing Test C_COMPILER_UNDERSTANDS_-Wno-error=varargs
– Performing Test C_COMPILER_UNDERSTANDS_-Wno-error=varargs - Success
– Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-error=varargs
– Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-error=varargs - Success
– Performing Test C_COMPILER_UNDERSTANDS_-Wno-error=address-of-packed-member
– Performing Test C_COMPILER_UNDERSTANDS_-Wno-error=address-of-packed-member - Success
– Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-error=address-of-packed-member
– Performing Test CXX_COMPILER_UNDERSTANDS_-Wno-error=address-of-packed-member - Success
– Looking for external programs
– Found perl
– Found intltool-merge
– Found desktop-file-validate
– Found LLVM 16.0.6
– Found clang compiler - /usr/bin/clang-16
– Found clang opencl-c.h header in /usr/lib/clang/16/include
– Will be able to test-compile OpenCL programs. Nice.
– Missing jsonschema, problems in noiseprofiles.json might go unnoticed
– Found xsltproc
– Found xmllint
– Found exiftool
– All external programs found
– Found msgfmt to convert .po file. Translation enabled
– The following OPTIONAL packages have been found:

  • FFI
  • Terminfo
  • zstd
  • LibXml2
  • LLVM
  • Gettext

– The following REQUIRED packages have been found:

  • OpenMP (required version >= 4.5)
  • Threads
  • ZLIB

– Checking for -march=native support
– Checking for -march=native support - works
– Looking for OpenMP
– Found OpenMP_C: -fopenmp (found suitable version “4.5”, minimum required is “4.5”)
– Found OpenMP_CXX: -fopenmp (found suitable version “4.5”, minimum required is “4.5”)
– Looking for OpenMP - found (system)
– Looking for pugixml
– Found Pugixml 1.14
– Looking for pugixml - found (system)
– Looking for JPEG
– Looking for JPEG - found
– Looking for ZLIB
– Found ZLIB: /usr/lib/libz.so (found suitable version “1.3”, minimum required is “1.2.11”)
– Looking for ZLIB - found (system)
– Trying to query CPU L1d cache line size
– Deciding that the CPU L1d cache line size is 64 bytes
– Trying to query CPU page size
– Deciding that the CPU page size is 4096 bytes
– Trying to query CPU large page size
– Deciding that the CPU large page size is 2097152 bytes
– The following features have been enabled:

  • OpenMP-based threading, used for parallelization of the library
  • XML reading, used for loading of data/cameras.xml
  • Lossy JPEG decoding, used for DNG Lossy JPEG compression decoding
  • ZLIB decoding, used for DNG Deflate compression decoding

– The following OPTIONAL packages have been found:

  • FFI
  • Terminfo
  • zstd
  • LibXml2
  • LLVM
  • Gettext
  • XMLLINT, command line XML tool, http://xmlsoft.org/
    Used for validation of data/cameras.xml

– The following RECOMMENDED packages have been found:

  • JPEG, free library for handling the JPEG image data format, implements a JPEG codec
    Used for decoding DNG Lossy JPEG compression

– The following REQUIRED packages have been found:

  • Threads
  • OpenMP (required version >= 4.5), Open Multi-Processing, https://www.openmp.org/
    Used for parallelization of the library
  • Pugixml (required version >= 1.8), Light-weight, simple and fast XML parser, http://pugixml.org/
    Used for loading of data/cameras.xml
  • ZLIB (required version >= 1.2.11), software library used for data compression
    Used for decoding DNG Deflate compression

– Found Glib 2.78.3
– Found LibXml2: /usr/lib/libxml2.so (found suitable version “2.12.2”, minimum required is “2.6”)
– Building LibRaw from intree copy
– Found Sqlite3 3.44.2
– Sqlite3 version 3.24 or newer
– Found GIO
– Found LibXml2: /usr/lib/libxml2.so (found version “2.12.2”)
– Found CURL: /usr/lib/libcurl.so (found version “8.5.0”)
– Found ZLIB: /usr/lib/libz.so (found version “1.3”)
– Found JsonGlib
– Exiv2 >= 0.27.4 found with ISOBMFF support (CR3, AVIF, HEIF)
– Could NOT find PortMidi (missing: PortMidi_LIBRARY PortMidi_INCLUDE_DIR)
– Found OpenJPEG
– Found GraphicsMagick 1.3.42
– Found GMIC
– Found the following ICU libraries:
– i18n (required): /usr/lib/libicui18n.so
– data (required): /usr/lib/libicudata.so
– uc (required): /usr/lib/libicuuc.so
– Does the compiler support __builtin_cpu_supports(): 1
– Checking for -march=native support
– Lua support: Enabled
– Found Pugixml 1.14
– Map mode: enabled
– Print mode: enabled
– Game: the good knight
– Signal debug: print-trace possible
– Found CURL: /usr/lib/libcurl.so (found suitable version “8.5.0”, minimum required is “7.56”)
– Found recent CURL version to build piwigo.
– building darktable-cmstest with colord support. nice.
– LibRaw string version: 0.21.1
– LibRaw ID version: 0x0211
– LibRaw SO version: 23.0.0
– Found OpenMP_C: -fopenmp (found version “4.5”)
– Found OpenMP_CXX: -fopenmp (found version “4.5”)
– Found OpenMP: TRUE (found version “4.5”)


– Libraw 0.21.1 configuration http://www.libraw.org

– Libraw will be compiled with OpenMP support … YES
– Libraw will be compiled with LCMS support … NO
– Libraw will be compiled with example command-line programs … NO
– Libraw will be compiled with RedCine codec support … NO
– Libraw will be compiled with DNG deflate codec support … YES
– Libraw will be compiled with DNG lossy codec support … YES
– Libraw will be compiled with RawSpeed support … NO
– Libraw will be compiled with debug message from dcraw … NO
– Libraw will be compiled with Foveon X3F support … NO
– Libraw will be compiled with Raspberry Pi RAW support … NO
– Libraw will be compiled as a static library



Missing po4a-translate. Can NOT create translated manpages
Missing po4a-updatepo. Can NOT update manpage translations
– The following features have been enabled:

  • OpenMP-based threading, used for parallelization of the library
  • XML reading, used for loading of data/cameras.xml
  • Lossy JPEG decoding, used for DNG Lossy JPEG compression decoding
  • ZLIB decoding, used for DNG Deflate compression decoding

– The following OPTIONAL packages have been found:

  • FFI
  • Terminfo
  • zstd
  • LLVM
  • Gettext
  • XMLLINT, command line XML tool, http://xmlsoft.org/
    Used for validation of data/cameras.xml
  • Gphoto2 (required version >= 2.5)
  • OpenEXR (required version >= 3.0)
  • JXL (required version >= 0.7.0)
  • WebP (required version >= 0.3.0)
  • libavif
  • libheif
  • OpenJPEG
  • IsoCodes (required version >= 3.66)
  • Libsecret
  • GraphicsMagick
  • GMIC
  • ICU
  • Lua54 (required version >= 5.4)
  • OSMGpsMap
  • Colord
  • ColordGTK
  • Cups
  • SDL2, low level access to audio, keyboard, mouse, joystick, and graphics hardware, https://www.libsdl.org/
  • X11

– The following REQUIRED packages have been found:

  • GTK3 (required version >= 3.24.15)
  • Threads
  • Imath
  • LensFun
  • Sqlite3 (required version >= 3.15)
  • GIO
  • GThread
  • GModule
  • PangoCairo
  • Rsvg2
  • LibXml2
  • PNG
  • TIFF
  • LCMS2
  • JsonGlib
  • Exiv2 (required version >= 0.25)
  • Pugixml (required version >= 1.2), Light-weight, simple and fast XML parser, http://pugixml.org/
    Used for loading of data/cameras.xml
  • CURL (required version >= 7.56)
  • Glib
  • ZLIB, software library used for data compression
    Used for decoding DNG Deflate compression
  • JPEG, free library for handling the JPEG image data format, implements a JPEG codec
    Used for decoding DNG Lossy JPEG compression
  • OpenMP, Open Multi-Processing, https://www.openmp.org/
    Used for parallelization of the library

– The following OPTIONAL packages have not been found:

– Configuring done (2.5s)
– Generating done (2.0s)
– Build files have been written to: /home/audio2u/Downloads/darktable/darktable/build
[ 1%] Building zh_TW locale
[ 1%] Building cs locale
[ 1%] Building af locale
[ 1%] Building fr locale
[ 1%] Building ca locale
[ 1%] Building gl locale
[ 1%] Building en@truecase locale
[ 1%] Building es locale
[ 1%] Building el locale
[ 1%] Building he locale
[ 1%] Building fi locale
[ 1%] Updating version string (git checkout)
[ 1%] Building eo locale
[ 1%] Building hu locale
[ 1%] Building da locale
[ 2%] Building de locale
311 translated messages, 1166 fuzzy translations, 1578 untranslated messages.
1923 translated messages, 524 fuzzy translations, 608 untranslated messages.
3058 translated messages.
[ 2%] Built target locale_gl
[ 2%] Built target locale_el
[ 2%] Built target locale_ca
3056 translated messages.
[ 2%] Built target locale_da
[ 3%] Building it locale
[ 3%] Building ja locale
[ 3%] Building nb locale
4067 translated messages.
[ 3%] Building nl locale
[ 3%] Built target locale_af
4900 translated messages.
4609 translated messages.
4900 translated messages.
[ 3%] Built target locale_en-truecase
[ 3%] Built target locale_eo
4899 translated messages.
4901 translated messages.
Version string: 4.7.0+22~g37368e4773-dirty
4900 translated messages.
[ 3%] Built target locale_cs
4778 translated messages.
[ 3%] Building pl locale
[ 3%] Built target locale_zh_TW
[ 3%] Built target create_version_gen
[ 3%] Built target locale_es
[ 3%] Built target locale_de
4900 translated messages.
[ 3%] Built target locale_he
4900 translated messages.
[ 3%] Building pt_BR locale
[ 3%] Building pt_PT locale
[ 3%] Built target locale_fi
[ 3%] Built target locale_fr
[ 3%] Building ro locale
[ 3%] Building sk locale
[ 3%] Building sq locale
[ 4%] Building sl locale
[ 4%] Building ru locale
4900 translated messages.
[ 4%] Building sr locale
[ 4%] Building sr@latin locale
3055 translated messages.
[ 4%] Built target locale_hu
[ 4%] Building sv locale
[ 4%] Built target locale_nb
[ 4%] Building th locale
[ 4%] Building tr locale
4898 translated messages, 1 fuzzy translation.
571 translated messages, 1141 fuzzy translations, 1343 untranslated messages.
[ 4%] Built target locale_it
[ 4%] Built target locale_ro
1557 translated messages, 703 fuzzy translations, 795 untranslated messages.
4900 translated messages.
[ 4%] Built target locale_pt_PT
4900 translated messages.
[ 4%] Built target locale_nl
[ 4%] Building uk locale
[ 4%] Building zh_CN locale
[ 4%] Built target locale_ja
420 translated messages, 485 fuzzy translations, 2150 untranslated messages.
3718 translated messages.
[ 4%] Built target locale_th
[ 4%] Checking validity of /home/audio2u/Downloads/darktable/darktable/build/share/darktable/darktableconfig.xml
[ 4%] Built target generate_conf
[ 4%] Built target locale_sk
3871 translated messages.
3871 translated messages.
[ 4%] Built target locale_sr-latin
[ 4%] Built target locale_sr
[ 4%] Built target validate_darktableconfig_xml
4900 translated messages.
4884 translated messages, 12 fuzzy translations, 4 untranslated messages.
2885 translated messages, 812 fuzzy translations, 370 untranslated messages.
[ 4%] Generating authors.h for about dialog.
[ 4%] Built target whereami
[ 4%] Built target locale_pt_BR
[ 4%] Built target locale_sv
[ 4%] Built target locale_pl
[ 4%] Checking validity of cameras.xml
4900 translated messages.
[ 4%] Built target locale_sq
[ 4%] Built target lautoc
4900 translated messages.
/home/audio2u/Downloads/darktable/darktable/src/external/rawspeed/data/cameras.xsd:194: element complexType: Schemas parser error : complex type ‘CFA2Type’: The content model is not determinist.
WXS schema /home/audio2u/Downloads/darktable/darktable/src/external/rawspeed/data/cameras.xsd failed to compile
[ 4%] Built target xcf
[ 4%] Built target dependencies
[ 4%] Generating org.darktable.darktable.desktop
[ 4%] Built target locale_sl
[ 4%] Built target deploy
[ 4%] Built target tests
4900 translated messages.
4778 translated messages.
[ 4%] Built target darktablerc_file
[ 4%] Generating …/metainfo/org.darktable.darktable.appdata.xml
[ 4%] Built target locale_ru
[ 4%] Test-compiling OpenCL program soften.cl
[ 5%] Test-compiling OpenCL program atrous.cl
[ 5%] Built target locale_tr
[ 5%] Test-compiling OpenCL program basecurve.cl
[ 5%] Test-compiling OpenCL program basic.cl
[ 5%] Test-compiling OpenCL program basicadj.cl
[ 5%] Test-compiling OpenCL program bilateral.cl
[ 5%] Test-compiling OpenCL program blendop.cl
make[2]: *** [lib/darktable/rawspeed/data/CMakeFiles/validate-cameras.xml.dir/build.make:76: lib/darktable/rawspeed/data/cameras.xml.touch] Error 5
make[1]: *** [CMakeFiles/Makefile2:2865: lib/darktable/rawspeed/data/CMakeFiles/validate-cameras.xml.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[ 5%] Test-compiling OpenCL program bloom.cl
4900 translated messages.
4900 translated messages.
[ 5%] Built target locale_zh_CN
[ 5%] Built target locale_uk
[ 5%] Built target generate_authors_h
[ 13%] Built target raw
[ 21%] Built target raw_r
[ 21%] Built target opencl-program-atrous.cl
[ 21%] Built target opencl-program-bloom.cl
[ 21%] Built target opencl-program-soften.cl
[ 21%] Built target opencl-program-bilateral.cl
[ 21%] Built target opencl-program-basecurve.cl
[ 21%] Built target opencl-program-blendop.cl
[ 21%] Built target opencl-program-basicadj.cl
[ 21%] Built target opencl-program-basic.cl
Merging translations into /home/audio2u/Downloads/darktable/darktable/build/bin/…/share/metainfo/org.darktable.darktable.appdata.xml.
Merging translations into /home/audio2u/Downloads/darktable/darktable/build/share/darktable/org.darktable.darktable.desktop.
[ 22%] Checking validity of org.darktable.darktable.desktop
[ 22%] Built target validate_darktable_desktop
CREATED /home/audio2u/Downloads/darktable/darktable/build/bin/…/share/metainfo/org.darktable.darktable.appdata.xml
[ 22%] Built target darktable.appdata_file
make: *** [Makefile:156: all] Error 2

This is WXS schema failed to compile · Issue #562 · darktable-org/rawspeed · GitHub
You want to add -DUSE_XMLLINT=OFF to the cmake invocation.

Roman,
Thanks for the reply, but how do I do this exactly?
Sorry, I’m still learning when it comes to the command line.

$ ./build.sh --help
build.sh [OPTIONS] [-- [additional cmake configuration options...]]

so i guess
./build.sh --prefix /opt/darktable/darktable-4.6 -- -DUSE_XMLLINT=OFF
should do the trick.

1 Like

Oh, gotcha!
Thank you.

OK, that fixed the compiling issue. Thanks!
I then installed darktable.
But now I’m struggling to understand how to create a launcher for this version of dt, including custom paths for data.db and library.db I’d like to keep this separate from my existing 4.4.2 library for now.
Regardless of which directory I’m in (at the terminal), invoking ‘darktable’ simply runs v4.4.2.
I thought if I had navigated to the directory where I installed 4.6, and invoked ‘darktable’, it would have run the version that was there. Apparently not.
So then I thought I’d try running it from the Dolphin browser, but it told me that I “couldn’t run an executable in this context”. Not sure if that means “from this location”, or something else?

It runs the first one encountered in the directories specified in PATH env variable,
and the current directory is not on that list by default,
you want to do ./darktable or /path/to/darktable.

That means the directory you’ve installed into is based on a filesystem
which is mounted with noexec flag.

1 Like

OK, I just tried googling how to add an environment variable, and my eyes glazed over.
One user had suggested adding the variable to .bashrc, but when I opened that file, I was lost as to how to proceed.

As for the noexec flag, what is the best way forward? Install elsewhere, or can that location be coerced into allowing executables? If installing elsewhere, what location should I install to? I think it was Coding Dave who initially had me installing into /opt and I’ve just kept doing that ever since.

/opt/darktable does seem like the right place, it seems weird that stuff there can not be executed,
but that is more of a question to the distribution, or your particular distro installation.

Operating System: Manjaro Linux
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Kernel Version: 6.1.68-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 2700X Eight-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3070/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7B79
System Version: 2.0

Any thoughts on how I can run my newly-installed v4.6?

If you want to run a specific executable, if you’re in its directory you should type ./darktable otherwise it will look for the first executabe found in $PATH.
By default in Manjaro programs are installed in the /usr prefix, so you might have a darktable excutable in /usr/bin which is found if you type darktable without ./ before.

1 Like

I would maybe recommend asking in manjaro-specific IRC channel.

Thanks, Sebastien, that (preceding with ./) worked!
Thanks Roman, also!

2 Likes

I also use Manjaro (and Arch for a long time). Any reason you’re not using the darktable-git package build from the AUR? That’ll build the latest master and maintain it under the package manager’s control.

https://aur.archlinux.org/packages/darktable-git

That’ll ensure all the dependencies are installed. Paman the GUI for pacman should be able to find it there directly if you search “darktable-git.” You may need to enable AUR in Paman’s preferences.

You can also download the PKGBUILD file, modify it to install into /opt, and remove that conflicts/provide line so you can have stable and master concurrently. Then run “makepg -i” to build/install. I don’t have that setup myself. But you could install it in /opt. Add small script to home/bin. Be sure to add that to your PATH.

1 Like

I have been using Manjaro/Arch along with the darktable-git for a very long time but recently found that the git failed to correctly install … it was suggested that it was something to do with my network, which is totally fine. The folks at Manjaro were unfortunately not helpful.
I am running the conventional dt version at this time hoping that the git failure will get resolved by somebody else.

Not sure if it’ll help, but have you tried clearing the darktable-git build directory? If you’re using Paman GUI to build packages from the AUR it’ll be under /var/tmp/pamac-build-{yourusername}/darktable-git? If you’re using another AUR helper you’ll have to Google where its package cache directory is at. It just built fine for me.

==> Finished making: darktable-git 4.7.0.r22.g37368e4773-1 (Wed 20 Dec 2023 08:42:44 PM MST)

Upgrading darktable-git (4.5.0.r1253.g59019a7345-1 → 4.7.0.r22.g37368e4773-1)…

Thanks for the suggestion: As proposed I fully flushed the ‘darktable.git’ folder and tried again. Here is my same result.

Building darktable-git…
==> Making package: darktable-git 4.5.0.r556.gefa29ebcd4-1 (Wed 20 Dec 2023 08:04:12 PM)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> Retrieving sources…
→ Cloning darktable git repo…
Cloning into bare repository ‘/var/tmp/pamac-build-david/darktable-git/darktable’…
error: 842 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
==> ERROR: Failure while downloading darktable git repo
Aborting…
Failed to build darktable-git

I am more than a little frustrated since I have been using and rebuilding the git for a very long time and have no idea what has changed.

i have been using the git version on my arch. i have moved from it when i heard the introduction of the new ‘rgb primary’ module , if i remember correctly as it does nt have this particular module in the build. recently i build the 4.6.0. version from the git based on standard instruction in the ‘readme’ file provided along with the build ; there are many ways ,but below one has worked straight away on my arch system…so it should work on manjaro as well ,if you wanted to try.

Latest stable release

git clone --recurse-submodules --depth 1 “GitHub - darktable-org/darktable: darktable is an open source photography workflow application and raw developer
(remove symbol " " from above)

cd darktable
git fetch --tags
git checkout tags/release-4.6.0

Get submodules

git submodule update --init

Compile

./build.sh --prefix /opt/darktable --build-type Release --install --sudo

###If you want to have dartkable displayed along your other applications, you only need to add a symbolic link:

ln -s /opt/darktable/share/applications/org.darktable.darktable.desktop /usr/share/applications/org.darktable.darktable.desktop

1 Like

Version string: 4.7.0+22~g37368e4773-dirty

@Bruce_Williams You should not be seeing the -dirty flag unless you’re intentionally changing/developing the source code. Something is not quite right with your source tree and could also be the cause of you problems.

2 Likes

Yep. @Bruce_Williams : you can keep a checked out ‘working copy’ (which you created using git clone) of master up-to-date with the following commands (to be issued in the directory into which you checked out the source):

git clean -d -f -x
git pull --rebase
git submodule update

The first one will make sure to discard all local content that does not match origin (github) (this includes the files created by the build).

My next steps are:

  • deleting the currently installed version (I don’t install to /opt or to /usr/local, but rather to a directory in my home; adjust the paths below to your liking);
  • building with optimisations for my machine (instead of generic ones).
rm -rf /home/kofa/darktable-master
./build.sh --prefix /home/kofa/darktable-master --build-type Release --install -- '-DCUSTOM_CFLAGS=ON' '-DCMAKE_CXX_FLAGS="-O3 -march=native"' '-DCMAKE_C_FLAGS="-O3 -march=native"'