An idea: isolate libs [was: Pure LFS]

Tushar Teredesai tushar at
Thu Feb 6 07:36:20 PST 2003

Ryan.Oliver at wrote:

>Miguel Bazdresch wrote:
>>I don't yet fully understand everything that is involved in
>>what you're trying to do here, but while digesting it in my mind
>>I had an idea.
>>It seems like we're trying to prevent, at all costs, from linking to the
>>host's libraries. So, why don't we make those libraries unreachable
>>before compilation? The easiest way is just to rename them. For example,
>>if there is a risk of something linking to a library in directory
>>/path/to/lib, first do a
>>mv /path/to/lib /path/to/lib_
>The one problem you will find there is the host system's binaries need
>libraries and expect to find them there. I suppose you could move them out
>the way but you'd have to set LD_LIBRARY_PATH which would defeat the
A variation might work, though I am not in favor of that.

Just move all the *.so links to a temporary location. Leave the 
lib*.so.* links and files around coz those are the files that are needed 
in runtime. During compilation and linking, linker looks for 
but links to the soname of the lib found i.e. So if is not found, the package won't link to libfoo but the 
previously compiled host packages will continue to run since 

But I think it would be easier to use the -notsdtinc and -nostdlib flags.

Tushar Teredesai

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list