New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
darktable: Fix compilation on macOS #44922
Conversation
]; | ||
|
||
ldLibraryPathPrefix = "$out/lib/darktable" + stdenv.lib.optionalString stdenv.isLinux ":${ocl-icd}/lib"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move this into a let statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
# darktable changed its rpath handling in commit | ||
# 83c70b876af6484506901e6b381304ae0d073d3c and as a result the | ||
# binaries can't find libdarktable.so, so change LD_LIBRARY_PATH in | ||
# the wrappers: | ||
preFixup = '' | ||
gappsWrapperArgs+=( | ||
--prefix LD_LIBRARY_PATH ":" "$out/lib/darktable:${ocl-icd}/lib" | ||
--prefix LD_LIBRARY_PATH ":" "${ldLibraryPathPrefix}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this on darwin? If so I'd expect it to be DYLD_LIBRARY_PATH instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Only compile X11 and other components on Linux. Use DYLD_LIBRARY_PATH on macOS instead of LD_LIBRARY_PATH.
785efed
to
61cbf57
Compare
@GrahamcOfBorg build darktable |
Failure on aarch64-linux (full log) Attempted: darktable Partial log (click to expand)
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: darktable Partial log (click to expand)
|
Timed out, unknown build status on x86_64-linux (full log) Attempted: darktable Partial log (click to expand)
|
I built this locally on darwin and the executable starts successfully. |
@GrahamcOfBorg build darktable |
Failure on aarch64-linux (full log) Attempted: darktable Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: darktable Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: darktable Partial log (click to expand)
|
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)