Question: Finding libraries that are required for busybox?? Found something.

Michael D. Setzer II mikes at guam.net
Tue Jun 26 19:10:02 UTC 2018


Found something that seems to give some information.
Have just run it on the libc library, and it shows what I believe is the other 
libraries that are used. Actually found more? 
So, just to share what I found with those that helped or are interested?

Regular ldd just shows this.
ldd libc-2.27.so 
	/lib/ld-linux.so.2 (0xb7fd6000)
	linux-gate.so.1 (0xb7fd4000)

script chklddlibs - LD_DEBUG=libs ldd $1 2>&1 |grep "find library"

This option shows additional libraries??

# /home/msetzerii/chklddlibs libc-2.27.so 
      3475:	find library=libtinfo.so.6 [0]; searching
      3475:	find library=libdl.so.2 [0]; searching
      3475:	find library=libc.so.6 [0]; searching
      3480:	find library=libtcl8.6.so [0]; searching
      3480:	find library=libdl.so.2 [0]; searching
      3480:	find library=libz.so.1 [0]; searching
      3480:	find library=libpthread.so.0 [0]; searching
      3480:	find library=libm.so.6 [0]; searching
      3480:	find library=libc.so.6 [0]; searching
      3480:	find library=libnss_sss.so.2 [0]; searching
      3480:	find library=libnss_files.so.2 [0]; searching

script chklddlibs2 
LD_DEBUG=libs ldd $1 2>&1 |grep "find library" | cut -b 26-50 | cut -f 1 -d \  

This just goes a little more to clean it up. 

# /home/msetzerii/chklddlibs2 libc-2.27.so 
libtinfo.so.6
libdl.so.2
libc.so.6
libtcl8.6.so
libdl.so.2
libz.so.1
libpthread.so.0
libm.so.6
libc.so.6
libnss_sss.so.2
libnss_files.so.2

Didn't have the libtcl8.6.so or libnss_sss.so.2 libraries??
Thanks again for the quick replies.


On 26 Jun 2018 at 13:37, Walter Harms wrote:

Date sent:      	Tue, 26 Jun 2018 13:37:43 +0200 (CEST)
From:           	Walter Harms <wharms at bfs.de>
To:             	busybox at busybox.net
Subject:        	Re: Question: Finding libraries that are required for 
busybox??

> Am 25.06.2018 22:40, schrieb Eli Schwartz:
> > On 06/25/2018 04:30 PM, Michael D. Setzer II wrote:
> >> Thanks for all the quick reponses. Tried the options, but am just seeing a
> >> link 
> >> to libc.so.6 and no other libraries??
> > 
> > So your busybox binary is not statically linked. That doesn't really
> > change anything.
> > 
> > If your project depends on GNU libc, you are not permitted to "clean up
> > unused libraries" from glibc, at least not the libnss_* ones, because
> > GNU libc requires them even though it does not link to them, and it will
> > use them behind your back *anyway* via dlopen(3)
> > http://man7.org/linux/man-pages/man3/dlopen.3.html
> 
> 
> there is no static version of gnu-libc.
> 
> But i agree there is other to really know what is needed.
> Dynamic libraries by there very name are dynamic and may link
> other libraies in without notice, i doubt ldd will be clever enought
> to see this.
> 
> In the give case ldd may be ok, but it is clearly not fool-proof and
> a runtime test is always required.
> 
> just my 2 cents,
> re,
>  wh
> 
> > 
> > You may solve this by not using GNU libc, or by specifically excluding
> > these shared libraries from being cleaned, or by writing a build system
> > which more accurately tracks what libraries to install in the first
> > place rather than cleaning up after the fact.
> > 
> > 
> > 
> > 
> > _______________________________________________
> > busybox mailing list
> > busybox at busybox.net
> > http://lists.busybox.net/mailman/listinfo/busybox
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor (Retired)     
 mailto:mikes at guam.net                            
 mailto:msetzerii at gmail.com
 Guam - Where America's Day Begins                        
 G4L Disk Imaging Project maintainer 
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC at HOME CREDITS

ROSETTA      65588412.173705 | ABC          16613838.513356
SETI        109400547.062739 | EINSTEIN    141176610.499240



More information about the busybox mailing list