View Single Post
Old 03-16-2013, 12:45 PM   #4
NullNix
Guru
NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.NullNix ought to be getting tired of karma fortunes by now.
 
Posts: 929
Karma: 15576314
Join Date: Jan 2013
Location: Ely, Cambridgeshire, UK
Device: Kindle Oasis 3, Kindle Oasis 1
Quote:
Originally Posted by twobob View Post
And why not "Prefer Static Libraries" ??
Code:
networking/lib.a(inetd.o): In function `reread_config_file':
inetd.c:(.text.reread_config_file+0x988): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(netstat.o): In function `ip_port_str':
netstat.c:(.text.ip_port_str+0x48): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `reread_config_file':
inetd.c:(.text.reread_config_file+0x8e8): warning: Using 'getrpcbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
lol... that's why not... turning it off now then
Yeah, in general the glibc people *hate* static linking. There are no ABI guarantees between glibc releases for .o files and only limited guarantees for .a files: it produces huge binaries (not what you want on a Kindle), and, well, the problem you're seeing is because name resolution depends on dynamic linking anyway, to invoke the NSS libraries! So even a statically linked glibc program has to link in what amounts to a static version of /lib/ld-linux.so.2 anyway. (It's not quite the same as the normal dynamic loader -- it doesn't support dlmopen() for instance -- but it is built from the same source code and is mostly the same. Except that it takes up space in every binary.)

Static linking is for your /bin/busybox and /sbin/sln only (and the latter only because you need it to recover a b0rked glibc installation). Just forget about it for everything else, and you'll be happier.
NullNix is offline   Reply With Quote