I recently made a Linux From Scratch and now I want to delete the /tools directory. But before rushing through it, I ranldd /bin/* | grep '/tools'Which gave me thisliblzma.so.5 => /tools/lib/liblzma.so.5 (0x00007fd7e82f9000)  libpthread.so.0 => /tools/lib/libpthread.so.0 (0x00007fd7e7ec3000)          libc.so.6 => /tools/lib/libc.so.6 (0x00007fd7e7b1f000)          liblzma.so.5 => /tools/lib/liblzma.so.5 (0x00007f2ff2852000)          libpthread.so.0 => /tools/lib/libpthread.so.0 (0x00007f2ff241c000)          libc.so.6 => /tools/lib/libc.so.6 (0x00007f2ff2078000)I then manually checked the output of ldd and found out/bin/kmod:          linux-vdso.so.1 (0x00007ffd71dbd000)  liblzma.so.5 => /tools/lib/liblzma.so.5 (0x00007f14721ab000)          libz.so.1 => /lib/libz.so.1 (0x00007f1471f92000)          libpthread.so.0 => /tools/lib/libpthread.so.0 (0x00007f1471d75000)          libc.so.6 => /tools/lib/libc.so.6 (0x00007f14719d1000)          /lib64/ld-linux-x86-64.so.2 (0x00007f14723d0000)and/bin/lsmod:          linux-vdso.so.1 (0x00007ffcc1db7000)          liblzma.so.5 => /tools/lib/liblzma.so.5 (0x00007f3cb7285000)          libz.so.1 => /lib/libz.so.1 (0x00007f3cb706c000)          libpthread.so.0 => /tools/lib/libpthread.so.0 (0x00007f3cb6e4f000)          libc.so.6 => /tools/lib/libc.so.6 (0x00007f3cb6aab000)          /lib64/ld-linux-x86-64.so.2 (0x00007f3cb74aa000)Looks like it's only referring to /tools in case of only kmod and lsmodI checked other entries, and they are all pointing to the right ones. For example/bin/lzcat:          linux-vdso.so.1 (0x00007ffdee0db000)          liblzma.so.5 => /lib/liblzma.so.5 (0x00007ff6cb537000)          libpthread.so.0 => /lib/libpthread.so.0 (0x00007ff6cb31a000)          libc.so.6 => /lib/libc.so.6 (0x00007ff6caf76000)          /lib64/ld-linux-x86-64.so.2 (0x00007ff6cb75c000)Note that, here all of them are pointing to /lib.So should I proceed?
Possible problems deleting /tools in LFS
binary;lfs;toolchain
Maybe.The ldd output contains the names of the libraries that the binary will use after searching the library search path. If you have some configuration that points to your /tools directory (e.g., $LD_LIBRARY_PATH or an ld.so.conf entry), then try removing that. If ldd doesn't point to your /tools directory after you've done so, you should be fine.If it does, then your binaries are probably compiled with an RPATH set. An RPATH is a hardcoded location for a shared library that is stored into the compiled binary. It can be useful in some edge cases, but in your situation it would be decidedly unhelpful. If it is set, there is a tool called chrpath with which you can change or remove it.