Steps causing the bug to occur:
- Download and unzip dylibtest_20210623.zip, a simple node class that depends on a dylib.
- In Terminal,
dylibtestfolder and run
make. This compiles the dylib and places it and the node class in the User Modules folder.
- Run test.vuo.
The composition stops immediately, with log message:
# pid=58058 t= 0.1573s VuoCompositionLoader.cc:452 loadResourceDylib() The composition couldn't be replaced because the library '/Users/jaymie/Library/Caches/org.vuo/Jaymie.vuo-git/User/libVuoModuleCache-installed-POU6.dylib' couldn't be loaded : dlopen(/Users/jaymie/Library/Caches/org.vuo/Jaymie.vuo-git/User/libVuoModuleCache-installed-POU6.dylib, 2): Library not loaded: @rpath/libfoo.dylib
Have you found a workaround?:
Put in an absolute path instead of using
@rpath. In this example, in Makefile, I would change…
clang -dynamiclib -install_name @rpath/libfoo.dylib libfoo.c -o libfoo.dylib
… to …
clang -dynamiclib -install_name "/Users/jaymie/Library/Application Support/Vuo/Modules/libfoo.dylib" libfoo.c -o libfoo.dylib
Since my username is in the path, this only works when using the node on my own system. I couldn't distribute the node to other people unless they recompiled or ran
install_name_tool on the dylib.