ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
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.
In my /etc of ARM Linux, there is no ld.so.config file and there is no ldconfig command running, there is ld.so.cache which is binary executable, but there is no command like ldcache to run this file.
Then i create the ld.so.conf file in which i wrote the names of the directories where my shared object libraries are lying (like /lib,/user/lib) and i execute ./ld.so.cache (It could be that i am doing wrong) which infact runs my ld.so.conf file and it shows that /usr/lib is a directory (ofcourse ./ is to execute binary files).
how to create the ldcache command to execute ld.so.cache, how can i know that from which file ld.so.cache file has been generated? so that i can change it and can load my shared object libraries at the initialisation time.
...how to create the ldcache command to execute ld.so.cache, how can i know that from which file ld.so.cache file has been generated? so that i can change it and can load my shared object libraries at the initialisation time...
Hmm... I'm not exactly sure what you're after here, but isn't the command you're looking for called 'ldconfig', not 'ldcache'?
There is no ldcache command, it is ldconfig, as alienDog stated. /etc/ld.so.conf is a text file, which lists directories in which shared libraries are to be located. This file is processed with /sbin/ldconfig to produce /etc/ld.so.cache. I.e. think of /etc/ld.so.conf as the 'source' file, which is 'compiled' with ldconfig to produce the output file /etc/ld.so.cache.
/etc/ld.so.cache is used by the dynamic linker (/lib/ld-linux.so.2) to locate libaries whenever a command is executed (since searching the filesystem everytime a command is run would be hideously slow). Note that ldconfig is not a daemon, it isn't running all the time, you just run it to process /etc/ls.so.conf (whenever libraries are installed/removed). If you don't have an /etc/ld.so.conf, then just create one.
There is no ldcache command, it is ldconfig, as alienDog stated. /etc/ld.so.conf is a text file, which lists directories in which shared libraries are to be located. This file is processed with /sbin/ldconfig to produce /etc/ld.so.cache. I.e. think of /etc/ld.so.conf as the 'source' file, which is 'compiled' with ldconfig to produce the output file /etc/ld.so.cache.
/etc/ld.so.cache is used by the dynamic linker (/lib/ld-linux.so.2) to locate libaries whenever a command is executed (since searching the filesystem everytime a command is run would be hideously slow). Note that ldconfig is not a daemon, it isn't running all the time, you just run it to process /etc/ls.so.conf (whenever libraries are installed/removed). If you don't have an /etc/ld.so.conf, then just create one.
Hiii,
I understand what you are saying, and i also have created the ld.so.conf, but how to make the command ldconfig under /sbin, so that whenever i run the command ldconfig it runs the /etc/ld.so.conf and produce the ld.so.cache? there is no ldconfig command in my /usr/sbin directory.
Finally what i did is take the ld.so.conf, write the necessary code inside and then generate the ld.so.cache in my desktop linux and then copy it to my ARM Linux's Ramdisk, and it works for me, first i was in doubt that the file which has been created on the normal desktop wont work on the ARM processor, but after all it works for me.
Maybe on embedded systems, one doesn't normally add libraries and ldconfig is considered to be superfluous.
FYI: I noticed that there is a new book "Embedded Linux by Example" in Barnes and Nobels.
Hiii,
I dont think that ldconfig kind of files are superflous, because as in my case there are many cases can happened in which you want to load library files on the initialisation, and ldconfig is for that only.
Anyways, can you refer me to the site, where you found the above book.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.