Ld_library_path ?
Hi,
When I compile some program and it has a dependency provided by some library somewhwere, now when it compiles(when I type make) do I have to make sure that library is also in the LD_LIBRARY_PATH environment variab;e in the .csh/.tcsh.bash? , I would really like to understand this concept, any sites to this would also be very helpful. Kind Regards, Sim |
that variable is an additional way to add a potential library location to the sytem search path, it is only a temporary soution really, and if possible the path should be listed in /etc/ld.so.conf and then ldconfig should be run
|
Thanks Chris,
but what are the consequences of putting many libraries into the ld.so.conf file?, does the environment variable LD_LIBRARY_PATH erase after rebooting?, basically what are the differences between using one over the other? Thanks, Sim |
well as with any variable, LD_LIBRARY_PATH will only exist within the scope which you create it. so when you reboot it's gone. ld.so.conf is not for libraries itself, but directories contating libraries, there shouldn't ever be that many entries in there.
|
You can't really put too many paths in ld.so.conf - that file is used to build a highly optimized lookup cache, so making things faster.
|
Thanks Chris, So to be completely clear I set the LD_LIBRARY_PATH environment variable in whatever shell I'm using(i.e /root/.csh) and when the program compiles it will find the above environemnt variable and hence find the libraries it is looking for and so when I reboot the entry in /root/.csh will be gone but I wouldn't need it because that was only used for the one time compilation. Just confirm with me, and thanks again.
Kind Regards, Sim |
All times are GMT -5. The time now is 06:51 AM. |