Hi all,
I'm struggling a little bit with this scenario:
The user application has a conventional autotools build system
with pkg-config to find libraries and cflags. Everything
compiles, links, and installs without any problems (great!).
When I try to run the resulting executable, however, the dynamic
linker cannot find any of the libraries that were provided by the
spack packages. I've checked the usual suspects in terms of how
it might find these libraries:
What's the best practice for my use case? I suspect that I'm
doing something wrong :-)
I *could* hack up a script to construct an LD_LIBRARY_PATH for the application at run time by iterating through "spack location -i" calls, but that doesn't seem like the right thing to ask a potential user of our libraries to do. We have quite a few libraries possibly in play, not just one.
Cmake may handle this differently than autotools, but I can't
make our users all adopt cmake.
If the application itself were built with spack, then I suspect
spack would take care of the paths automatically, but that's not a
viable option either.
Oddly enough, my laptop (Ubuntu 20.04) *does* set LD_LIBRARY_PATH
on spack load, so I don't see this problem during local
development. I'm not sure if that's intentional or not that for
this behavior to be different across platforms, though, so I don't
know whether to report it as a bug or not.
thanks!
-Phil