fix onnx lib handling on macOS#20514
Merged
TurboGit merged 1 commit intodarktable-org:masterfrom Mar 14, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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>/libwhich makes all darktable CLI programs to fail.This PR is a quick hack to solve these problems:
libonnxruntime.dylibis installed in<install_dir>/lib/darktableso it is found by all CLI programs./liband 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.