Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld: Undefined symbols: _gethostbyname_r



Benjamin on Asterisk Mailing Lists wrote:

[]
gcc -g -o asterisk -Wl,-dynamic io.o sched.o logger.o frame.o
loader.o config.o channel.o translate.o file.o say.o pbx.o cli.o md5.o
term.o ulaw.o alaw.o callerid.o fskmodem.o image.o app.o cdr.o tdd.o
acl.o rtp.o manager.o asterisk.o ast_expr.o dsp.o chanvars.o
indications.o autoservice.o db.o privacy.o astmm.o enum.o srv.o dns.o
aescrypt.o aestab.o aeskey.o utils.o poll.o dlfcn.o
editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a -lncurses -lm
-lresolv
ld: Undefined symbols:
_gethostbyname_r
___mpool_filter
___mpool_get
___mpool_new
___mpool_open
___mpool_put
___mpool_close
___mpool_sync
make: *** [asterisk] Error 1

For what it's worth (not much probably, since I don't know anything about Asterisk), I just downloaded and unpacked asterisk-1.0.2.tar.gz and ran make.


It finished without any error. The symbols you mention are all defined in the asterisk executable:

% nm asterisk | grep mpool
0006eedc T ___mpool_close
0006eb40 T ___mpool_filter
0006ec54 T ___mpool_get
0006eb50 T ___mpool_new
0006ea60 T ___mpool_open
0006eeb4 T ___mpool_put
0006ef78 T ___mpool_sync
0006eff8 t _mpool_bkt
0006f1e8 t _mpool_look
0006f128 t _mpool_write

These come from db1-ast/libdb1.a(mpool.o)

gethostbyname_r is defined as a local symbol:
% nm asterisk | grep gethost
00055f90 T _ast_gethostbyname
         U _gethostbyname
00056500 t _gethostbyname_r
         U _gethostname

So my guess is that there is something else that went wrong earlier in your compilation.

--
Martin


_______________________________________________ Do not post admin requests to the list. They will be ignored. Unix-porting mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden
References: 
 >ld: Undefined symbols: _gethostbyname_r (From: Benjamin on Asterisk Mailing Lists <email@hidden>)
 >Re: ld: Undefined symbols: _gethostbyname_r (From: Benjamin on Asterisk Mailing Lists <email@hidden>)
 >Re: ld: Undefined symbols: _gethostbyname_r (From: Benjamin on Asterisk Mailing Lists <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.