void-linux / void-linux/void-packages

Package request: Darktable 5.6.0 - build with support for ONNX AI runtime

Open
#61,938 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

request
Dominant language
Shell
Stars
3.4k
Forks
2.8k
Avg merge
2d 5h
Merged PRs (30d)
299

Description

Package name

darktable

Package homepage

https://www.darktable.org/

Description

Darktable 5.6 was released with a new "AI" features, notably the AI Object Mask tool and Neural Restore.

The build does not enable the features by default, justifiably, and require the --enable-ai flag in the build script. Would it be possible to enable the feature and leave it up to the user if they want to install the ONNX Runtime manually?

I had tried creating a patch locally to enable it but kept receiving cmake errors. Building from source works it doesn't seem stable; it has trouble opening (freezing on module opening according to the splash screen) and I face a lot of crash issues. I had decent luck at running the AppImage (although it only ever worked after opening the system Darktable first back when it was still 5.4) but I just recently switched to Wayland and it now refuses to open.

Below is the patch I attempted which does pass but then I also get this cmake error:

diff --git a/cmake/modules/FindONNXRuntime.cmake b/cmake/modules/FindONNXRuntime.cmake
index 6827133..b5ca38f 100644
--- a/cmake/modules/FindONNXRuntime.cmake
+++ b/cmake/modules/FindONNXRuntime.cmake
@@ -32,7 +32,7 @@ endif()
 # ---------------------------------------------------------------------------
 set(ONNXRUNTIME_VERSION "1.24.4" CACHE STRING "ONNX Runtime version to download")
 set(ONNXRUNTIME_DIRECTML_VERSION "1.24.4" CACHE STRING "DirectML NuGet package version for Windows")
-option(ONNXRUNTIME_OFFLINE "Disable automatic download of ONNX Runtime" OFF)
+option(ONNXRUNTIME_OFFLINE "Disable automatic download of ONNX Runtime" ON)
 
 set(_ORT_SRC_ROOT "${CMAKE_SOURCE_DIR}/src/external/onnxruntime")
 set(_ORT_BUILD_ROOT "${CMAKE_BINARY_DIR}/_deps/onnxruntime")
-- Configuring incomplete, errors occurred!
=> ERROR: darktable-5.6.0_1: do_configure: 'CFLAGS="-DNDEBUG ${CFLAGS/ -pipe / }" CXXFLAGS="-DNDEBUG ${CXXFLAGS/ -pipe / }" cmake ${XBPS_VERBOSE--Wno-dev} ${cmake_args} ${configure_args} -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ${LIBS:+-DCMAKE_C_STANDARD_LIBRARIES="$LIBS"} ${LIBS:+-DCMAKE_CXX_STANDARD_LIBRARIES="$LIBS"} ${wrksrc}/${build_wrksrc}' exited with 1
=> ERROR:   in do_configure() at common/build-style/cmake.sh:78
Does the requested package meet the package requirements?

System

Is the requested package released?

Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the package's do_configure failure and inspect cmake/modules/FindONNXRuntime.cmake alongside the darktable build options. Determine how the package can enable the AI features while leaving ONNX Runtime installation to the user. Done means the package configures and builds successfully with the requested support.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, shell
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.