Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-21-2003, 03:37 AM
|
#1
|
LQ Newbie
Registered: Dec 2002
Distribution: Red Hat Linux 7.2
Posts: 15
Rep:
|
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
|
|
|
02-21-2003, 03:43 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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
|
|
|
02-21-2003, 04:25 AM
|
#3
|
LQ Newbie
Registered: Dec 2002
Distribution: Red Hat Linux 7.2
Posts: 15
Original Poster
Rep:
|
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
|
|
|
02-21-2003, 04:36 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
02-21-2003, 10:56 AM
|
#5
|
LQ Guru
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565
Rep:
|
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.
|
|
|
02-21-2003, 11:08 PM
|
#6
|
LQ Newbie
Registered: Dec 2002
Distribution: Red Hat Linux 7.2
Posts: 15
Original Poster
Rep:
|
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 10:06 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|