Trying to build darktable... first fail.

Hello,
Trying to build darktable from source following the guide here : darktable/BUILD.txt at master · darktable-org/darktable · GitHub

nicolass-imac:build nick$ cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 -DOpenMP_C_INCLUDE_DIR=/opt/local/include/libomp -DOpenMP_CXX_INCLUDE_DIR=/opt/local/include/libomp -DCMAKE_LIBRARY_PATH=/opt/local/lib/libomp -DBINARY_PACKAGE_BUILD=ON -DRAWSPEED_ENABLE_LTO=ON -DBUILD_CURVE_TOOLS=ON -DBUILD_NOISE_TOOLS=ON -DDONT_USE_INTERNAL_LUA=OFF
-- Found OpenMP_C: -fopenmp=libomp -Wno-unused-command-line-argument (Required is at least version "4.5") 
-- Found OpenMP_CXX: -fopenmp=libomp -Wno-unused-command-line-argument (Required is at least version "4.5") 
-- Is the target platform supported: 1
-- Found little endian system. Good.
-- Building SSE2-optimized codepaths: ON
-- Mac OS X build detected, setting default features
-- Homebrew detected, setting CMAKE_PREFIX_PATH to /usr/local
-- 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
-- Missing desktop-file-validate, problems in darktable.desktop might go unnoticed
CMake Warning at CMakeLists.txt:318 (find_package):
  Could not find a configuration file for package "LLVM" that is compatible
  with requested version "14".

  The following configuration files were considered but not accepted:

    /usr/local/opt/llvm/lib/cmake/llvm/LLVMConfig.cmake, version: 13.0.1
    /usr/local/opt/llvm/lib/cmake/llvm/llvm-config.cmake, version: unknown

Call Stack (most recent call first):
  CMakeLists.txt:326 (find_llvm)


-- Found LLVM 13.0.1
-- Found clang compiler - /usr/local/opt/llvm/bin/clang-13
-- Found clang opencl-c.h header in /usr/local/opt/llvm/lib/clang/13.0.1/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:

 * LibXml2
 * LLVM (required version >= 13)
 * Gettext

-- The following REQUIRED packages have been found:

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

-- Checking for -mtune=generic support
-- Checking for -mtune=generic support - works
-- Checking for -std=c++17 support
-- Checking for -std=c++17 support - works
-- Looking for OpenMP
-- Found OpenMP_C: -fopenmp=libomp -Wno-unused-command-line-argument (Required is at least version "4.5") 
-- Found OpenMP_CXX: -fopenmp=libomp -Wno-unused-command-line-argument (Required is at least version "4.5") 
-- Looking for OpenMP - found (system)
-- Looking for pugixml
-- Found Pugixml 1.12
-- Looking for pugixml - found (system)
-- Looking for JPEG
-- Looking for JPEG - found
-- Looking for ZLIB
-- Found ZLIB: /opt/local/lib/libz.dylib (found suitable version "1.2.12", minimum required is "1.2.11") 
-- Looking for ZLIB - found (system)
-- Trying to query CPU L1d cache line size
-- Performing binary package build, using hardcoded value.
-- Deciding that the CPU L1d cache line size is 64 bytes
-- Trying to query CPU page size
-- Performing binary package build, using hardcoded value.
-- Deciding that the CPU page size is 64 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:

 * LibXml2
 * LLVM (required version >= 13)
 * 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

-- Checking for -std=c++14 support
-- Checking for -std=c++14 support - works
-- Found Glib 2.72.2
-- Found LibXml2: /opt/local/lib/libxml2.dylib (found suitable version "2.9.14", minimum required is "2.6") 
-- Found ZLIB: /opt/local/lib/libz.dylib (found version "1.2.12") 
-- Could NOT find libheif (missing: libheif_DIR)
-- Found Sqlite3 3.28.0
-- Sqlite3 version 3.24 or newer
-- Found GIO 
-- Found LibXml2: /opt/local/lib/libxml2.dylib (found version "2.9.14") 
-- Found JsonGlib 
-- Exiv2 >= 0.27.4 found, but was not compiled with ISOBMFF support (CR3, AVIF, HEIF)
-- Found OpenJPEG 
-- Checking for module 'iso-codes'
--   No package 'iso-codes' found
-- iso-codes version  found but we need at least version 3.66
-- no suitable iso-codes, there will be no language names in the preferences
-- Found GraphicsMagick 
-- Found GMIC but version < 270. Compressed lut will not be available
-- Found ICU 
-- Does the compiler support __builtin_cpu_supports(): 
CMake Error at src/CMakeLists.txt:622 (MESSAGE):
  The compiler does not support Thread-local storage.


-- Configuring incomplete, errors occurred!

Converted the log files to txt to upload them.
CMakeErrorlog-log.txt (23.2 KB)
CMakeOutput-log.txt (42.2 KB)

Seem to have a problem with LLVM where v13 is installed but it is looking for v14 …
And I don’t know what the last Cmake error is…
I notice it detected homebrew, should it be using macports ?

Any help very much appreciated!

Nicolas

So the first step is to get LLVM v14. Homebrew is usually fairly bleeding edge, but seems to only have v13.

Macports has v14: Install llvm-14 on macOS with MacPorts

So you can check why homebrew doesn’t have v14, you can make your own bre formula for v14, or you can switch to macports.

https://github.com/Homebrew/homebrew-core/pull/97618 llvm PR