Problem Compilling Asterisk Addons 1.6.0.1: cdr_addon_mysql

Hi all,

Got a challenge. I hope it hasn’t been covered before, becuase I have looked and looked…so here it goes.

I am trying to compile asterisk addons 1.6.0.1.

Everything compiles except the cdr_addon_mysql module.

I don’t get much in the way of meaningfull messages, except the following from my compile screen

My version of asterisk is 1.6.0.5. I am running this on an older box, running Fedora Core 3 (So 2005 I know), and MySQL 3.23 with the latest MySQL 5,4 and 3 compatability libraries.

I have successfully compiled Asterisk 1.4.7 including all addons.

I have removed the older version of Asterisk using the commands:

I know I am missing something, Any pointers would be appreciated,

Cheers
Chris

You might be missing some include files…

You need the following in your /usr/include dir:

[code]#include <asterisk.h>

#include <sys/types.h>
#include <asterisk/config.h>
#include <asterisk/options.h>
#include <asterisk/channel.h>
#include <asterisk/cdr.h>
#include <asterisk/module.h>
#include <asterisk/logger.h>
#include <asterisk/cli.h>
#include <asterisk/strings.h>
#include <asterisk/linkedlists.h>

#include <stdio.h>
#include <string.h>

#include <stdlib.h>
#include <unistd.h>
#include <time.h>

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

#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>[/code]

I would imagine the most important would be:

/usr/include/mysql/mysql.h

because this is where mysql_ssl_set() lives. Hope this helps.

Cheers for the heads up.

I checked the headers file. It was all in order, however I did add [quote]rm -rf /usr/include/asterisk[/quote] into the asterisk removal script.

I checked through some other things. Looks like the release of MySQL 3.23 that I was using would not work with the MySQL CDR support in Asterisk 1.6.

Strange that it would compile with Asterisk 1.4

After updating to the current release of MySQL 5.1.30, the addons package now compiles with no errors :smiley:

Problem solved :smile:

Thanks again for the help