Hello Michel, * BRIAND, Michel M wrote on Tue, Oct 30, 2007 at 05:22:02PM CET: > > I would like to know why LD_LIBRARY_PATH is evil. > > Because, here, we have several thousand of applications (!) installed on > NFS shares that have each : > - a bin directory > - a lib directory > ... > - an environment file that set up PATH and LD_LIBRARY_PATH and an alias > for users to access/use the application.
You just answered your own question, at least partly: if you have thousands of lib directories listed in LD_LIBRARY_PATH, then each and every exec of a non-statically-linked program will on average cause thousands of needless file lookups; just try for example LD_LIBRARY_PATH=/foo1:/foo2:/foo3 strace /bin/ls 2>&1 | grep foo (on GNU/Linux). That just trashes performance, more so if all lookups happen on NFS shares. There were lots more arguments listed in this thread, and the documents that were cited. It's not that LD_LIBRARY_PATH isn't helpful at times, but it has definite drawbacks. Cheers, Ralf _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool