Would anyone be kind enough to share a walkthrough on setting up vkdt on a mac system, if at all possible? I understand that there is a hiccup in regards to Vulkan and Metal API and the programing-esque nature of all this is, as I’m finding out through research and failures, not my strong suit.
I’m running M1 or Intel, if either makes the approach more feasible.
My use case is to run Agx-Emulsion inside. I currently have Agx setup as the python launched Napari as well as in ART but I’m trying to figure out a system that nails best practices/best quality. The Darktable-Napari route certainly chews up a lot of disk space as well as time. ART is easier to manage file wise but the quality doesn’t quite land in the same place.
I’ve tried installing VKDT, but I’m not tech-savvy at all, especially not in macos environment. Can anyone give me a sort of explain-it-like-I’m-5 here?
yes. but the dmg still has some dso dependency problems. and setting this up requires some time investment ideally by someone who knows macintosh computers or at least has access to one.
i think that intel and arm macintoshs require different treatment too.
Unsure if this is helpful, but I was able to get the macOS nightly DMG launching on Apple Silicon after fixing dylib aliases (libvulkan.1.dylib and libglfw.3.dylib). But the GUI shows no thumbnails for any photos.
Terminal is saying:
[ERR] module thumb main connector input has uninited size!
[ERR] [thm] failed to run first half of graph!
[ERR] could not load required thumbnail symbols!
and this is where the the CI recipe for the dmg package can be found.
the nightly builds include the dmg, but there’s something incomplete about tracing recursive dependencies (see pr discussion). i suppose i can bash together the recursive loop as discussed, but i will likely not be able to test/iterate on it.
I managed to put together a script these days, that creates an app bundle for my Intel-based iMac 2020 from my local build of vkdt. The script essentially replicates the app layout that nightly.yml creates, and I also took some support from ChatGPT I must admit
However, I think it is not fully self-contained but still relies on homebrew libraries outside the bundle, as I just copied the first level dependencies like libjpeg and libavformat, but did not bother to recursively search through the dependency tree. So it is probably just for my local use - anyway, for me it works.
vkdt failed to launch due to missing dylib filenames. Fixed by adding aliases/duplicates with the right file names.
“libvulkan.1.dylib” alias for the bundled version “libvulkan.1.4.y341.dylib”
“libglfw.3.dylib” alias for “libglfw.3.4.dylib”
Step 2
The APP had module folders like “…/modules/i-raw/” containing connectors, but the matching “libi-raw.so” had been moved into Contents/Frameworks. Putting each “lib.so” back into /modules// fixed module loading and brought thumbnails back but they were empty.
Step 4
Missing dylib: “libavformat.62.dylib” from /Frameworks
Source/library: FFmpeg (libavformat, plus its usual FFmpeg deps like libavcodec/libavutil/etc.)
I then re-signed the app and am getting no errors/everything appears to be working!
i pushed some new recursive dylib detection shell script from the pr on github into the .github/workflows/nightly.yml. unfortunately it doesn’t work and pushing until failure takes 10min turnaround. then the error message is “1”
the dylib copy loop breaks because ditto resolves symlinks, renaming e.g. libglfw.3.dylib to libglfw.3.4.dylib. the binary still expects libglfw.3.dylib
so it fails to load. cut -w can also be flaky depending on the runner.
fix: use cp -L (dereference but keep the filename) with basename, and awk
instead of cut -w. this also makes the “something more on libs” symlink step
unnecessary.
- name: copy library dependencies
run: |
BREW_PREFIX=$(brew --prefix)
for i in $(seq 1 20); do
found=0
for lib in $(find ${APPDIR} -type f \( -name "*.dylib" -o -name "*.so" -o -perm +111 \) -print0 \
| xargs -0 otool -L 2>/dev/null \
| awk "/${BREW_PREFIX//\//\\/}/{ gsub(/[[:space:]].*/, \"\", \$1); print \$1 }" \
| sort -u); do
name=$(basename "$lib")
if [ ! -f "${APPDIR}/Contents/Frameworks/${name}" ]; then
cp -L "$lib" "${APPDIR}/Contents/Frameworks/${name}"
found=1
fi
done
[ "$found" = "0" ] && break
done
tested locally on m1 arm64, picks up transitive deps (e.g. ffmpeg pulling in
dav1d, x264, x265, openssl) and stabilises after 2-3 iterations.
That new macOS build does load on my computer! Though not on a fresh VM, crashing saying it failed to load libvulkan.1.dylib from /opt/homebrew (which is not installed on this fresh VM). I’ll try to look into it tomorrow.