Hi all --

I'm trying to build ksh 93s+ (the 2007-11-05 package) on Solaris 7,
and it's failing with this error:

  Undefined                       first referenced
   symbol                             in file
  freeaddrinfo                        libshell.a(io.o)
  ld: fatal: Symbol referencing errors. No output written to ksh
  mamake [cmd/ksh93]: *** exit code 1 making ksh

The addrinfo stuff is not available on Solaris 7, and it seems to
figure that out earlier in the process:

  iffe: test: is getaddrinfo a library function ... no

I also checked in the generated FEATURE/lib, and there's no #define
for _lib_getaddrinfo. However, "nm io.o" does show that it needs
freeaddrinfo.

Interestingly, I checked on our Solaris 8 build, and it also decided
there that getaddrinfo wasn't available, and _lib_getaddrinfo wasn't
defined. But even still, "nm io.o" showed an external dependency on
freeaddrinfo, which it shouldn't have. It happens to work fine though,
because on Solaris 8, freeaddrinfo is provided by libsocket.so.

Going back to io.c, I found an #if block starting at line 71 that
seems to end in the wrong place. The block beginning:

  #if defined(_lib_socket) && defined(_sys_socket) && #defined(_hdr_netinet_in)

doesn't end until the #else on line 300, and it contains the logic
that handles systems without addrinfo (the "#if !_lib_getaddrinfo" on
line 89). But there's a call to freeaddrinfo in the onintr function at
line 594 -- well outside of that block. This seems to be what's
causing the dependency.

Incidentally, the onintr function also has a parameter of type struct
addrinfo, which won't be defined if the entire block is skipped. This
is undoubtedly responsible for the following warning when building on
Solaris 8:

  ".../src/cmd/ksh93/sh/io.c", line 588: warning: dubious tag declaration: 
struct addrinfo

It seems that the #else/#endif at line 300 needs to move up to line
88, and/or the onintr function needs to move above line 300.

Thanks!

--
Ron Isaacson
Morgan Stanley
[EMAIL PROTECTED] / (212) 276-1144
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to