Skip to content

fix onnx lib handling on macOS#20514

Merged
TurboGit merged 1 commit intodarktable-org:masterfrom
zisoft:fix-onnx-lib-macos
Mar 14, 2026
Merged

fix onnx lib handling on macOS#20514
TurboGit merged 1 commit intodarktable-org:masterfrom
zisoft:fix-onnx-lib-macos

Conversation

@zisoft
Copy link
Copy Markdown
Collaborator

@zisoft zisoft commented Mar 14, 2026

This fixes the onnxruntime library handling on macOS.

Explanation:
On macOS the onnxruntime lib is downloaded from Github during CMAKE build because the version provided by Homebrew is not built with CoreML support (this download without user permission is another topic).

darktable expects dynamic libraries to be either in the system library paths or in <install_dir>/lib/darktable (only libdarktable should reside here).
The downloaded onnxruntime is installed in <install_dir>/lib which makes all darktable CLI programs to fail.

This PR is a quick hack to solve these problems:

  • libonnxruntime.dylib is installed in <install_dir>/lib/darktable so it is found by all CLI programs
  • during bundling the macOS App package the lib is moved to ./lib and handled as all other dylibs

@andriiryzhkov :
I would really prefer to open a PR at the Homebrew package to avoid this kind of mess!
The existing issue Homebrew/homebrew-core#177367 was closed as not planned because it was raised as a bug instead of a feature request.

@zisoft zisoft added the scope: macos support macos related issues and PR label Mar 14, 2026
Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, CI fixed!

@TurboGit TurboGit merged commit d61bb2f into darktable-org:master Mar 14, 2026
5 checks passed
@TurboGit TurboGit added this to the 5.6 milestone Mar 14, 2026
@zisoft zisoft deleted the fix-onnx-lib-macos branch March 14, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: macos support macos related issues and PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants