I have an embedded system running Linux Kernel 3.10 and Busybox.
If I cross compile (toolchain build by buildroot so its using uclibc) a program without the -static
Just an addition to above which clarifies if any body face same problem .. as i saw above question just now..
If you compile busybox with statically.Then no need to worry about shared library. But if you compiled busy box with dynamically then your toolchain plays important role in rootfs. here you need to copy libraries of toolchain to rootfs /lib folder .
what are the library need to be copied can be known just type following command.
strings _install/bin/busybox | grep ^lib
shows list library that should be kept in /lib of your rootfs.
This command says, “Get all the strings from the file, and only show the lines that begin with lib.” The program ldd can’t be used, because the program has been cross-compiled and won’t run on the development host. These files should be fetched from the sysroot directory of the toolchain. Most modern toolchains have been configured with a sysroot, which is a directory that contains the files from the toolchain likely to appear on a root file system of a system targeted by the toolchain. To check if your toolchain has sysroot support, try the following:
$ arm-linux-gcc -print-sysroot
/arm-unknown-linux-gnueabi/bin/arm-linux-gcc If this is a valid path, this is where the files should be copied from. If no path is displayed, use find to locate a sysroot directory in , or use find to look for libc.so:
$ find . -name libc.so
After you’ve located libc and libm, create the (your rootfs)/lib directory and copy them there. The files are likely symlinks to other files, so be sure to gather them all. The next file to get is the dynamic loader, normally called ld-linux-, which also resides in the lib directory along with libc.so.*. Copy that to the /lib directory. Your system now has all the shared libraries and the loader, so BusyBox can run.`