Asterisk-addons-1.2.1 Compile Problems

I have successfully installed asterisk in a non-standard location (/opt/asterisk) and I am now trying to install the addons package, but it will not work no matter how hard I try.

If I just try make, I get:

[code]make -C format_mp3 all
make[1]: Entering directory /home/axon/asterisk/asterisk-addons.bak/format_mp3' gcc -pipe -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -O6 -c -o common.o common.c common.c:1:29: asterisk/logger.h: No such file or directory common.c: In functiondecode_header’:
common.c:93: warning: implicit declaration of function ast_log' common.c:93: error:LOG_WARNING’ undeclared (first use in this function)

make: *** [format_mp3/format_mp3.so] Error 2[/code]

Fine and dandy, I’m not really worried about the alternate mp3 addon, im more interested in the MySQL based plugins. When i run “make cdr_addon_mysql.so”, I get:

[code]cc -fPIC -I…/asterisk -D_GNU_SOURCE -I/usr/include/mysql -c -o cdr_addon_mysql.o cdr_addon_mysql.c
cdr_addon_mysql.c:23:29: asterisk/config.h: No such file or directory
cdr_addon_mysql.c:24:30: asterisk/options.h: No such file or directory
cdr_addon_mysql.c:25:30: asterisk/channel.h: No such file or directory
cdr_addon_mysql.c:26:26: asterisk/cdr.h: No such file or directory
cdr_addon_mysql.c:27:29: asterisk/module.h: No such file or directory
cdr_addon_mysql.c:28:29: asterisk/logger.h: No such file or directory
cdr_addon_mysql.c:29:26: asterisk/cli.h: No such file or directory
cdr_addon_mysql.c:60: warning: parameter names (without types) in function declaration
cdr_addon_mysql.c:60: warning: data definition has no type or storage class
cdr_addon_mysql.c: In function handle_cdr_mysql_status': cdr_addon_mysql.c:99: error:RESULT_SUCCESS’ undeclared (first use in this function)
cdr_addon_mysql.c:99: error: (Each undeclared identifier is reported only once
cdr_addon_mysql.c:99: error: for each function it appears in.)

make: *** [cdr_addon_mysql.o] Error 1
[/code]

I chopped a lot so you wouldnt have to read it all (there’s a lot). If you want to see the full output, tell me and ill post it. Anyway, no matter what i do i cant get it to work, any help would be greatly appreciated. Here’s my OS specs:

Linux 2.6.15-gentoo-r1
MySQL version: 4.1.14
Asterisk: 1.2.4

Have same problem on Debian, installed asterisk in /opt/asterisk/ , and addons don’t compile with same errors. Googled a lot, but didn’t find a helpful solution. Please help. Thanks in advance.

Have you tried adding the asterisk source directory into your makefile,
or on the make command line?

I’d try with a current, supported, version before trying to debug this.

I decided not to waste time, and installed asterisk and addons to standart folders, configuring them with no prefix. It compiled and installed without any problems. (At first I wanted to intstall asterisk and addons with --prefix=/opt/asterisk, and it didn’t work out with compiling asterisk-addons)