I have a libA.so that depends on libB.so, which is located at ../libB/ (from libA.c). I’m trying to compile things in such a way that I don’t have to set any environment variables. I have: This compiles fine. When I run a program that loads libA with dlopen I get: so libA is not finding libB at runtime. I found