TOT Build Failure

  • Unable to build TOT due to error in definition of atoi

Is there a known problem with TOT build? Cause I'm getting an error saying essentially that "atoi is undefined".

gcc -g -O2 -o named aclconf.o client.o config.o control.o controlconf.o interfac
emgr.o listenlist.o log.o logconf.o main.o notify.o query.o server.o sortlist.o
tkeyconf.o tsigconf.o update.o xfrout.o zoneconf.o lwaddr.o lwresd.o lwdclient.o
lwderror.o lwdgabn.o lwdgnba.o lwdgrbn.o lwdnoop.o lwsearch.o  unix/os.o ../../
lib/lwres/liblwres.a ../../lib/dns/libdns.a   ../../lib/isccfg/libisccfg.a ../..
/lib/isccc/libisccc.a ../../lib/isc/libisc.a  -lnsl
/export/build1/LYNXOS_500/build/lynxos/120604-C/x86/lib/libnsl.a(getgrent.as.o):
In function `getgrent':
getgrent.as.o(.text+0xb4): undefined reference to `atoi'
/export/build1/LYNXOS_500/build/lynxos/120604-C/x86/lib/libnsl.a(getgrent.as.o):
In function `fgetgrent':
getgrent.as.o(.text+0x2b8): undefined reference to `atoi'
/export/build1/LYNXOS_500/build/lynxos/120604-C/x86/lib/libnsl.a(getpwent.as.o):
In function `getpwent':
getpwent.as.o(.text+0xb4): undefined reference to `atoi'
getpwent.as.o(.text+0xce): undefined reference to `atoi'
/export/build1/LYNXOS_500/build/lynxos/120604-C/x86/lib/libnsl.a(getpwent.as.o):
In function `getpw':
getpwent.as.o(.text+0x29e): undefined reference to `atoi'
/export/build1/LYNXOS_500/build/lynxos/120604-C/x86/lib/libnsl.a(getpwent.as.o)(
.text+0x34c): more undefined references to `atoi' follow
collect2: ld returned 1 exit status
make[4]: *** [named] Error 1

It seems that the problem is in strtol.c version 10.2, which says that the definition was moved to stdlib.h, and stdlib.h appears to have it, yet the build fails anyway...

Looking at the compilation line for strtol.c I see it produces strtol.as.o, which in a previous successful build yeilds:

$ nm strtol.as.o
        U __ctype
        U __divdi3
        U __moddi3
        U _errno
00000208 T atoi
000001f4 T atol
00000000 T strtol

But in this build yeilds:

$ nm strtol.as.o
        U __ctype
        U __divdi3
        U __moddi3
        U _errno
00000208 T atoi
000001f4 T atol
00000000 T strtol

So how do we fix this error?