[busybox] Build error: procps.c:(.text.procps_read_smaps+0x2bc): undefined reference to `fast_strtoul_16' procps.c:(.text.procps_read_smaps+0x2cc): undefined reference to `fast_strtoul_16'

Douglas Mencken dougmencken at gmail.com
Sat Sep 18 09:23:58 UTC 2010


==== busybox, current master (v1.18.0-250-g395b97a)
libbb/lib.a(procps.o): In function `procps_read_smaps':
procps.c:(.text.procps_read_smaps+0x2bc): undefined reference to
`fast_strtoul_16'
procps.c:(.text.procps_read_smaps+0x2cc): undefined reference to
`fast_strtoul_16'
collect2: ld returned 1 exit status

This looks like related warning (output from 'make'):
  CC      libbb/procps.o
libbb/procps.c: In function 'procps_read_smaps':
libbb/procps.c:238:4: warning: implicit declaration of function
'fast_strtoul_16'

---- lines 124 and 125:
#if ENABLE_FEATURE_TOPMEM
static unsigned long fast_strtoul_16(char **endptr)

---- line 238:
                        currec.smap_start = fast_strtoul_16(&tp);

But in my config:
# CONFIG_FEATURE_TOPMEM is not set

Googling this warning message lead me to:
"It seems that your header files have no prototype declared for some
of the functions, so the function itself is implicitly treated as the
function prototype."

procps.c includes only "libbb.h", looking into:
$ cat ./include/libbb.h | grep fast_strtoul | od
0000000

I supposed that all we need is just to add

#if ENABLE_FEATURE_TOPMEM
static unsigned long fast_strtoul_16(char **endptr);
#endif

to libbb.h or at the top of procps.c file, but is was wrong, and failed again.


More information about the busybox mailing list