Question: Finding libraries that are required for busybox??

Eli Schwartz eschwartz at archlinux.org
Mon Jun 25 19:09:18 UTC 2018


On 06/25/2018 03:01 PM, Michael D. Setzer II wrote:
> Ran into a problem when trying to clean up libraries that were not needed 
> within my project.
> 
> Had done an ldd command on all programs and libraries, and created a list.
> A number of libraries I had in project were not linked to any programs or 
> other libraries. Rebuilt project, and most things seemed to work just fine, but 
> then found one that did not.
> 
> Using busybox nslookup failed due to one of the libraries I had removed not 
> being there? libnss_dns and libnss_files. ldd busybox doesn't report these 
> libraries are used? Once I put those libraries back, the nslookup resolves.
> 
> Is there a way to find if there are any other such required libraries rather than 
> having to find an issue at run time? 

Those are used by glibc functions, even if you use statically built
libc.a from the glibc project. In order to avoid this, you'll need to
build busybox against some other libc, e.g. musl.

-- 
Eli Schwartz
Bug Wrangler and Trusted User


More information about the busybox mailing list