Quote:
Originally Posted by
cstsang
What I want to know is how the system behave when the LD_LIBRARY_PATH set to empty or null?So, that wget does not work.
OK, let us start from the beginning: there has to be some way the system knows where to load shared libraries, analogous to the way it has to know where to load executables. For executables, there is the "PATH" variable and for (shared) libraries there is the variable "LD_LIBRARY_PATH". This is so in every Unix derivate.
AIX now usually ignores the value of "LD_LIBRARY_PATH" (unlike, for instance, Solaris) and uses the value of "LIBPATH" instead for the same purpose. So if a program written for "generic Unix" tells you to set LD_LIBRARY_PATH to some value you can safely change this for "LIBPATH" if you are using AIX.
BUT - and now it comes: every program has to be compiled and linked before it can be run. In AIX, if LIBPATH is set when the linker ("ld") is invoked, then the resulting executable will ignore the setting of "LIBPATH" and use the value set at link time instead. One can override this behavior by using the "-L" flag for "ld".
If you want to know with which flags/settings a program is linked with use the "dump -n" command against the binary.
I hope this helps.
bakunin