[Bug 4562] New: CONFIG_STATIC=y doesn't seem to work with latest glibc

bugzilla at busybox.net bugzilla at busybox.net
Tue Nov 29 11:47:09 UTC 2011


https://bugs.busybox.net/show_bug.cgi?id=4562

           Summary: CONFIG_STATIC=y doesn't seem to work with latest glibc
           Product: Busybox
           Version: 1.19.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: Standard Compliance
        AssignedTo: unassigned at busybox.net
        ReportedBy: bart.kus at gmail.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


Compiling from latest git.  The regular (dynamically linked) version compiled
OK, then I tried this static version:


eo at jo ~/busybox $ CONFIG_STATIC=y make
  LINK    busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused
-Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes
-Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition
-fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections
-fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc
-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os
-static -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment
-Wl,--start-group applets/built-in.o archival/lib.a archival/libarchive/lib.a
console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a
debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a
libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a
modutils/lib.a networking/lib.a networking/libiproute/lib.a
networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a
shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a
archival/built-in.o archival/libarchive/built-in.o console-tools/built-in.o
coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o
e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o
libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o
mailutils/built-in.o miscutils/built-in.o modutils/built-in.o
networking/built-in.o networking/libiproute/built-in.o
networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o
runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o
util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group
-Wl,--start-group -lcrypt -lm -Wl,--end-group
==========
networking/lib.a(nslookup.o): In function `print_host':
nslookup.c:(.text.print_host+0x3d): warning: Using 'getaddrinfo' in statically
linked applications requires at runtime the shared libraries from the glibc
version used for linking
networking/lib.a(ipcalc.o): In function `ipcalc_main':
ipcalc.c:(.text.ipcalc_main+0x211): warning: Using 'gethostbyaddr' in
statically linked applications requires at runtime the shared libraries from
the glibc version used for linking
libbb/lib.a(inet_common.o): In function `INET_resolve':
inet_common.c:(.text.INET_resolve+0x47): warning: Using 'gethostbyname' 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+0x79e): 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+0x3e): 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+0x724): warning: Using 'getrpcbyname' in
statically linked applications requires at runtime the shared libraries from
the glibc version used for linking
networking/lib.a(inetd.o): In function `unregister_rpc':
inetd.c:(.text.unregister_rpc+0x17): undefined reference to `pmap_unset'
networking/lib.a(inetd.o): In function `register_rpc':
inetd.c:(.text.register_rpc+0x46): undefined reference to `pmap_unset'
inetd.c:(.text.register_rpc+0x62): undefined reference to `pmap_set'
networking/lib.a(inetd.o): In function `prepare_socket_fd':
inetd.c:(.text.prepare_socket_fd+0x82): undefined reference to `bindresvport'
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
eo at jo ~/busybox $


Please see my more in-depth comments at:

https://bugs.gentoo.org/show_bug.cgi?id=391817#c5

My glibc version is:


eo at jo ~/busybox $ equery l glibc
 * Searching for glibc ...
[IP-] [  ] sys-libs/glibc-2.14.1:2.2


In short, it looks like the latest glibc (master branch commit
7b57bfe5988e476ea40934457dfd1c8a231e2391) removed RPC support from the static
version of the lib.

Or I'm totally screwing up something trivial.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list