[Asterisk-Users] compile in uclibc enviroment
hello, i try to compile * in uclibc enviroment (uclibc 0.9.19 ), but still getting following error does anyone know how to solve it ? regards Marian - gcc -g -o asterisk -rdynamic 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 -ldl -lpthread -lncurses -lm -lresolv editline/libedit.a db1-ast/libdb1.a enum.o: In function `ast_get_enum': /usr/src/asterisk-cvs/enum.c:279: undefined reference to `__res_ninit' /usr/src/asterisk-cvs/enum.c:307: undefined reference to `__res_nsearch' /usr/src/asterisk-cvs/enum.c:325: undefined reference to `__res_nclose' enum.o: In function `parse_naptr': /usr/src/asterisk-cvs/enum.c:157: undefined reference to `__dn_expand' srv.o: In function `ast_get_srv': /usr/src/asterisk-cvs/srv.c:279: undefined reference to `__res_ninit' /usr/src/asterisk-cvs/srv.c:282: undefined reference to `__res_nsearch' /usr/src/asterisk-cvs/srv.c:297: undefined reference to `__res_nclose' srv.o: In function `parse_srv': /usr/src/asterisk-cvs/srv.c:136: undefined reference to `__dn_expand' collect2: ld returned 1 exit status make: *** [asterisk] Error 1 -- SUNTEQ s. r. o. Bojnicka cesta 35 # Prievidza # 971 04 # Slovak republic Tel: +421-46-5430 754 # Fax: +421-46-5439 144 http://www.sunteq.sk/ A mind is like a parachute... it only works when it's open. ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] compile in uclibc enviroment
Marian Danisek wrote: hello, i try to compile * in uclibc enviroment (uclibc 0.9.19 ), but still getting following error does anyone know how to solve it ? regards Marian - gcc -g -o asterisk -rdynamic 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 -ldl -lpthread -lncurses -lm -lresolv editline/libedit.a db1-ast/libdb1.a enum.o: In function `ast_get_enum': /usr/src/asterisk-cvs/enum.c:279: undefined reference to `__res_ninit' /usr/src/asterisk-cvs/enum.c:307: undefined reference to `__res_nsearch' /usr/src/asterisk-cvs/enum.c:325: undefined reference to `__res_nclose' enum.o: In function `parse_naptr': /usr/src/asterisk-cvs/enum.c:157: undefined reference to `__dn_expand' srv.o: In function `ast_get_srv': /usr/src/asterisk-cvs/srv.c:279: undefined reference to `__res_ninit' /usr/src/asterisk-cvs/srv.c:282: undefined reference to `__res_nsearch' /usr/src/asterisk-cvs/srv.c:297: undefined reference to `__res_nclose' srv.o: In function `parse_srv': /usr/src/asterisk-cvs/srv.c:136: undefined reference to `__dn_expand' collect2: ld returned 1 exit status make: *** [asterisk] Error 1 Hi, Stephen Davis offered to send me a patch that leaves out enum support. That would at least solve the undefined references to res_ninit, res_nsearch and res_nclose in enum.c. Cheers, Holger ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] compile in uclibc enviroment
On Thu, 19 Jun 2003, Holger von Ameln wrote: Hi, Stephen Davis offered to send me a patch that leaves out enum support. That would at least solve the undefined references to res_ninit, res_nsearch and res_nclose in enum.c. Cheers, Holger Hi, Here it is, attached. Adds a setting in the Makefile where enum support can be turned off. There will probably be some offset when patching due to other changes in my sources. Steve Index: Makefile === RCS file: /usr/cvsroot/asterisk/Makefile,v retrieving revision 1.17 diff -u -r1.17 Makefile --- Makefile17 Jun 2003 22:30:25 - 1.17 +++ Makefile19 Jun 2003 10:50:00 - @@ -51,6 +51,9 @@ # MALLOC_DEBUG = #-include $(PWD)/include/asterisk/astmm.h +# Do you want ENUM support? +ENUM_SUPPORT = #-DENUM_SUPPORT + # Where to install asterisk after compiling # Default - leave empty INSTALL_PREFIX= @@ -85,12 +88,14 @@ INCLUDE=-Iinclude -I../include CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY CFLAGS+=$(OPTIMIZE) +CFLAGS+=$(ENUM_SUPPORT) CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null /dev/null 21; then echo -march=$(PROC); fi) CFLAGS+=$(shell if uname -m | grep -q ppc; then echo -fsigned-char; fi) ifeq (${OSARCH},OpenBSD) CFLAGS+=-pthread endif +#CFLAGS+=-DSLD #CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo -DZAPTEL_OPTIMIZATIONS; fi) LIBEDIT=editline/libedit.a @@ -125,7 +130,8 @@ 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 + astmm.o +OBJS+=enum.o srv.o CC=gcc INSTALL=install Index: asterisk.c === RCS file: /usr/cvsroot/asterisk/asterisk.c,v retrieving revision 1.11 diff -u -r1.11 asterisk.c --- asterisk.c 22 May 2003 14:24:06 - 1.11 +++ asterisk.c 19 Jun 2003 10:50:03 - @@ -1339,10 +1339,12 @@ printf(term_quit()); exit(1); } +#ifdef ENUM_SUPPORT if (ast_enum_init()) { printf(term_quit()); exit(1); } +#endif /* We might have the option of showing a console, but for now just do nothing... */ if (option_console !option_verbose) Index: enum.c === RCS file: /usr/cvsroot/asterisk/enum.c,v retrieving revision 1.5 diff -u -r1.5 enum.c --- enum.c 12 Jun 2003 12:48:57 - 1.5 +++ enum.c 19 Jun 2003 10:50:08 - @@ -11,6 +11,8 @@ * */ +#ifdef ENUM_SUPPORT + #include string.h #include fcntl.h #include unistd.h @@ -382,3 +384,5 @@ { return ast_enum_init(); } + +#endif /* -DENUM_SUPPORT */ Index: loader.c === RCS file: /usr/cvsroot/asterisk/loader.c,v retrieving revision 1.5 diff -u -r1.5 loader.c --- loader.c16 May 2003 02:50:46 - 1.5 +++ loader.c19 Jun 2003 10:50:10 - @@ -146,7 +146,9 @@ /* We'll do the logger and manager the favor of calling its reload here first */ reload_manager(); +#ifdef ENUM_SUPPORT ast_enum_reload(); +#endif ast_rtp_reload(); time(ast_lastreloadtime); Index: srv.c === RCS file: /usr/cvsroot/asterisk/srv.c,v retrieving revision 1.1 diff -u -r1.1 srv.c --- srv.c 12 Jun 2003 22:14:03 - 1.1 +++ srv.c 19 Jun 2003 10:50:23 - @@ -11,6 +11,8 @@ * */ +#ifdef ENUM_SUPPORT + #include string.h #include fcntl.h #include unistd.h @@ -297,3 +299,5 @@ res_nclose(srvstate); return ret; } + +#endif /* ifdef ENUM_SUPPORT */ Index: channels/chan_sip.c === RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.125 diff -u -r1.125 chan_sip.c --- channels/chan_sip.c 18 Jun 2003 22:34:55 - 1.125 +++ channels/chan_sip.c 19 Jun 2003 10:50:50 - @@ -664,6 +668,7 @@ portno = atoi(port); else portno = DEFAULT_SIP_PORT; +#ifdef ENUM_SUPPORT if (srvlookup) { char service[256]; int tportno; @@ -675,6 +680,7 @@ portno = tportno; } } +#endif hp = gethostbyname(hostn); if (hp) { strncpy(r-tohost, peer, sizeof(r-tohost) - 1);
Re: [Asterisk-Users] compile in uclibc enviroment
Hi, Here it is, attached. Adds a setting in the Makefile where enum support can be turned off. There will probably be some offset when patching due to other changes in my sources. Steve now * compile without errors... but to start * i made following entry in modules.conf under [modules] section : noload = app_enumlookup.so regards Marian -- SUNTEQ s. r. o. Bojnicka cesta 35 # Prievidza # 971 04 # Slovak republic Tel: +421-46-5430 754 # Fax: +421-46-5439 144 http://www.sunteq.sk/ A mind is like a parachute... it only works when it's open. ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users