LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 02-21-2003, 04:37 AM   #1
dahmad
LQ Newbie
 
Registered: Dec 2002
Distribution: Red Hat Linux 7.2
Posts: 15

Rep: Reputation: 0
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
 
Old 02-21-2003, 04:43 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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
 
Old 02-21-2003, 05:25 AM   #3
dahmad
LQ Newbie
 
Registered: Dec 2002
Distribution: Red Hat Linux 7.2
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
Old 02-21-2003, 05:36 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 02-21-2003, 11:56 AM   #5
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
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.
 
Old 02-22-2003, 12:08 AM   #6
dahmad
LQ Newbie
 
Registered: Dec 2002
Distribution: Red Hat Linux 7.2
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ld_library_path fng_#1 Linux - Software 4 09-20-2004 12:33 AM
???? Ld_library_path ???? g452 Linux - Software 9 08-26-2004 04:00 PM
Ld_library_path barrys Mandriva 2 06-15-2004 01:19 PM
Ld_library_path Dogface1SG Linux - Software 1 11-16-2003 02:28 AM
where is LD_LIBRARY_PATH Ninja_212 Slackware 4 10-07-2003 11:41 PM


All times are GMT -5. The time now is 12:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration