Suppose I distribute a program dynamically linked to a third-party LGPL-licensed library A, which dynamically links to another third-party library B (not necessarily LGPL), all of them distributed together.
Now, I want to want to make this program just work as distributed. For example, the user may have
LD_LIBRARY_PATH set (intentionally or not), which contains another version of library B which is incompatible with the version of library A distributed. Therefore, I am tempted to set
RPATH for the program (even though
RPATH is deprecated and its use discouraged) so that it will override any
But it seems that this would violate LGPL, because from my understanding, LGPL requires that the user of the program be allowed to relink it to any version of library A. Am I correct? Should I prepare a wrapper script that prepends