I was able to get asterisk to make using the following....

'ASTLDFLAGS="-lpthread -ldl -lresolv" make'




From: Rick Woomer [mailto:raw161@psu.edu]
Sent: Wednesday, February 22, 2012 11:52 AM
To: openbts-discuss@lists.sourceforge.net
Subject: [Openbts-discuss] Issue with Asterisk


I am running a recently downloaded copy OpenBTS version 2.8 on an E100.


Originally, I loaded sqlite3 and asterisk from the Angstrom repo.  While phones will register, I get the following error on the Asterisk CLI:


ERROR[8230]: pbx.c:1573 ast_func_read: Function ODBC_SQL not registered


After reading the Wiki, I realized that this is because the ODBC connection was likely not installed with Asterisk.


In the Wiki, found the instructions for enabling realtime Asterisk (http://wush.net/trac/rangepublic/wiki/sqlie3ODBC).  I am trying to follow this, but I keep running into errors...


I downloaded the latest version of asterisk from  http://svn.digium.com/svn/asterisk/trunk.


When I try to make asterisk, I fail with the following


usr/src/asterisk/main/dns.c:268: undefined reference to `__res_nsearch'
enum.o: In function `ebl_callback':
/usr/src/asterisk/main/enum.c:298: undefined reference to `__dn_expand'
enum.o: In function `parse_naptr':
/usr/src/asterisk/main/enum.c:441: undefined reference to `__dn_expand'
srv.o: In function `parse_srv':
/usr/src/asterisk/main/srv.c:90: undefined reference to `__dn_expand'
collect2: ld returned 1 exit status
make[2]: *** [asterisk] Error 1
make[1]: *** [main] Error 2
make[1]: Leaving directory `/usr/src/asterisk'
make: *** [_cleantest_all] Error 2