[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 23.0.50; Undefined symbol: _res_9_init
From: |
Peter Dyballa |
Subject: |
Re: 23.0.50; Undefined symbol: _res_9_init |
Date: |
Sat, 20 Oct 2007 00:51:27 +0200 |
Am 19.10.2007 um 17:38 schrieb Peter Dyballa:
/sw/lib/odcctools/bin/ld: Undefined symbols:
_res_9_init
Compiling src/process.c with -E -dD I get in the output:
#define HAVE_GETADDRINFO 1
...
#define HAVE_RES_INIT 1
...
#define res_init res_9_init /* from resolv.h */
...
int res_9_init (void); /* from resolv.h */
...
res_9_init (); /* line #3094 src/process.c in
"make_network_process" */
/* could also happen on line #3144 when
HAVE_GETADDRINFO is 0 */
Nm tells about libc:
/usr/lib/libc.dylib(res_init.o):
9004561c T _res_init
so it's obviously a mistake to re-define res_init as res_9_init. This
re-definition happens in resolv.h in:
#ifndef __BIND_NOSTATIC
...
#define res_init res_9_init
...
__BEGIN_DECLS
...
int res_init __P((void));
...
__END_DECLS
#endif
In the Fink project for compilation of netcat 0.6.1 CFLAGS is set to
-D__BIND_NOSTATIC
Re-configuring with this among the CPPFLAGS used allows to create
temacs. /usr/include/resolv.h is the only file that uses
__BIND_NOSTATIC, src/process.c is the only file that includes
resolv.h (found by compiling with -H), so on (some ?) Mac OS X src/
process.c should be compiled with an extra CPPFLAG or CFLAG -
D__BIND_NOSTATIC when HAVE_RES_INIT is 1.
--
Greetings
Pete
The future will be much better tomorrow.
-- George W. Bush