[Asterisk-Users] Trouble building appradius

Race Vanderdecken asterisk at vanderdecken.com
Thu Jan 13 20:07:45 MST 2005


Yes, this is normal, so don't feel alone. For whatever reason AppRadius
is a pain. But Kudos to the developers for making it available.


Here is a note I made when I ran into your problem, 
==============
When app_radius is compiled with cdr_radius compiled first then do this

copy /usr/src/sip/appradius-1.0/app_radius.so to
/usr/lib/asterisk/modules ( or where ever /etc/asterisk/asterisk.conf
says the configuration files go.)

copy /usr/src/sip/appradius-1.0/cdr_radius.so to
/usr/lib/asterisk/modules

copy /usr/src/sip/cpprad-1.0/lib/librad.so.1.0 to /usr/lib/librad.so --
note the name change!
=========================
Also here is the include list, know that I have made major changes to
appradius and not all these files are needed but they might help

#define _GNU_SOURCE 

#include <asterisk/lock.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/options.h>
#include <asterisk/module.h>
#include <asterisk/translate.h>
#include <asterisk/say.h>
#include <asterisk/config.h>
#include <asterisk/parking.h>
#include <asterisk/musiconhold.h>
#include <asterisk/callerid.h>
#include <asterisk/utils.h>
#include <asterisk/app.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <netinet/in.h>

#include <pthread.h>
//#include <mysql.h>

#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <signal.h>
#include <sys/signal.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>

#include <sys/types.h>
#include <asterisk/chanvars.h>
#include <ctype.h>
#include <uuid/uuid.h>

Still with me?  I have been looking for 1/2 an hour but I can't remember
what I did to fix the particular problem you are having.

In the end I did a google and found I gave you the answer in the first
line of my email. The solution is the next line.

#define _GNU_SOURCE

This will force the compiler to define PTHREAD_MUTEX_RECURSIVE
correctly, most of the time as 0 or blank...

Race "The Tyrant" Vanderdecken


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Brian
Wilkins
Sent: Wednesday, January 12, 2005 9:20 PM
To: asterisk at blacksun.net.au; Asterisk Users Mailing List -
Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Trouble building appradius

I suspect that app_radius has not been updated in a while. That's why
you 
are getting those errors since Asterisk has been updated a lot since
2004-04-
19.

> I am having trouble building appradius from 
http://appradius.minitelecom.org/
> 
> I configure, make, make install cpprad-1.0, but when I configure,
>  then make appradius I get :-
> 
> obelix:/usr/src/appradius/appradius1.0 # make
> make[1]: Entering directory `/usr/src/appradius/appradius1.0/lib'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory `/usr/src/appradius/appradius1.0/lib'
> make[1]: Entering directory `/usr/src/appradius/appradius1.0/etc'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory `/usr/src/appradius/appradius1.0/etc'
> make[1]: Entering directory `/usr/src/appradius/appradius1.0/inc'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory `/usr/src/appradius/appradius1.0/inc'
> make[1]: Entering directory `/usr/src/appradius/appradius1.0/src'
> gcc -c -I../inc -O -Wall -I/usr/local/include -g -O2 app_radius.c
> In file included from app_radius.c:17:
> /usr/include/asterisk/lock.h: In function `ast_mutex_init':
> /usr/include/asterisk/lock.h:311: error: `PTHREAD_MUTEX_RECURSIVE' 
> undeclared (first use in this function)
>  /usr/include/asterisk/lock.h:311: error: (Each undeclared 
> identifier is reported only once /usr/include/asterisk/lock.h:311: 
> error: for each function it appears in.) make[1]: *** [app_radius.o] 
> Error 1
> 
> ..anyone know what that is about ?
> 
> Cheers.
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users


--
Brian Wilkins
brian at hcc.net
Software Engineer
Heritage Communications Corporation
  Melbourne, FL     USA     32935

_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users





More information about the asterisk-users mailing list