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



On Thu, 11 Nov 2004 09:10:09 +0000, Sam Hart <email@hidden> wrote:
> BIND_8_COMPAT is a flag for GCC
> 
> so it would be added to the CFLAGS in a Makefile

as per one of my previous posts, this did not change anything. Same errors.


> adding -lresolv to the Makefile's CFLAGS should solve the problem

-lresolv is already passed as a flag to the compiler, this is what
makes the problem visible in the first place.

The Makefile contains ...

ifeq (${OSARCH},Darwin)
LIBS+=-lresolv
endif

and further down ...

$(CC) $(DEBUG) -o asterisk $(ASTLINK) $(OBJS) $(LIBEDIT)
db1-ast/libdb1.a stdtime/libtime.a $(LIBS)

which translates into ...

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

and results in the errors ...

ld: Undefined symbols:
_gethostbyname_r
___mpool_filter
___mpool_get
___mpool_new
___mpool_open
___mpool_put
___mpool_close
___mpool_sync
make: *** [asterisk] Error 1

but thanks for your suggestions anyway.

rgds
benjk
-- 
Sunrise Telephone Systems, 9F Shibuya Daikyo Bldg., 1-13-5 Shibuya,
Tokyo, Japan.

NB: Spam filters in place. Messages unrelated to the * mailing lists
may get trashed.
 _______________________________________________
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: 
 >Re: ld: Undefined symbols: _gethostbyname_r (From: Sam Hart <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.