I think you want to things: 1. That the libraries that Julia requires are automatically resolved to those that were available at build time. The static map you propose is the right thing for that, as Andreas notes.
2. That any other libraries users may want to load is search for using the normal dynamic linker mechanism–essentially LD_LIBRARY_PATH in our case. In Guile, ‘dynamic-link’ is essentially a wrapper around lt_dlopen, itself a wrapper around dlopen, so LTDL_LIBRARY_PATH and LD_LIBRARY_PATH are honored (and if libc is configured with ldconfig support, then /etc/ld*.conf are honored as well.) This addresses #2. In Guile applications, such as Guix, we hard-code the absolute path to libraries that are dlopened, as is the case with libgcrypt in (guix config) (specifically, see the recipe for Guix in (gnu packages package-management).) Yet, Guile knows where to find its own extensions, such as guile-readline. For that it has ‘load-extension’, which is sort-of like ‘dynamic-link’ except that it first searches $libdir (roughly.) That addresses #1. HTH! Ludo’.