Summary:ASTERISK-02531: Asterisk doesn't build with uclibc
Reporter:redog (redog)Labels:
Date Opened:2004-10-05 09:31:45Date Closed:2011-06-07 14:10:31
Versions:Frequency of
Description:gcc -g  -o asterisk -Wl,-E  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  editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a -ldl -lpthread -lncurses -lm -lresolv   -lssl
dns.o(.text+0x2a): In function `ast_search_dns':
/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/dns.c:174: undefined reference to `__res_ninit'
dns.o(.text+0x51):/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/dns.c:175: undefined reference to `__res_nsearch'
dns.o(.text+0x91):/var/tmp/portage/asterisk-1.0.0/work/asterisk-1.0.0/dns.c:194: undefined reference to `__res_nclose'
collect2: ld returned 1 exit status
make: *** [asterisk] Error 1


Im not sure of anyway arround this...is it possible to patch the dns code to work arround this?
Comments:By: hwstar (hwstar) 2004-10-05 16:30:24

This problem has been there all along. This is because uClibc lacks support for res_ninit and friends. I beleive res_ninit is stubbed out in uClibc, but you'll have to reverify to be sure.

If you look at the code in dns.c you will see that it is easy to substitute
somethiing else for #if defined(res_ninit). The only tradeoff is that you will get a warning about reentrancy if you do so. If you don't use DNS lookups in asterisk (specify IP addresses instead) you should be safe.


edited on: 10-05-04 16:44

By: Mark Spencer (markster) 2004-10-05 16:46:47

This is neither block nor crash nor major.  Please read the bug guidelines before placing additional bugs.

By: Mark Spencer (markster) 2004-10-05 17:13:49

Apparently your ulibc has the unusual (dare I say buggy) characteristic of defining res_ninit and yet somehow not having it.  You can see the checks in dns.c.  Asterisk is known to work with uclibc.  If you're not using CVS head or 1.0.1 please update to it and be sure you have the latest version of ulibc.