cdr_addon_mysql does not compile

Hi All,

Asterisk 1.4.0 with asterisk-addons-1.4.0 on FC6.

When I make the asterisk addons it simply fails to create cdr_addon_mysql.so. In particular, the series of commands I use are:

cd /usr/src/asterisk-addons-1.4.0
make clean
./configure
make
make install

It doesn’t come up with an errror or anything. I’ve checked in /usr/lib/asterisk/modules and it’s not there either.

If someone possibly point me in the right direction, that would be very much appreciated!

Thanks in advance.
J

In the first step of the installation, did you try:

./configure --with-mysqlclient

[quote=“justinharrington”]Hi All,

Asterisk 1.4.0 with asterisk-addons-1.4.0 on FC6.

When I make the asterisk addons it simply fails to create cdr_addon_mysql.so. In particular, the series of commands I use are:

cd /usr/src/asterisk-addons-1.4.0
make clean
./configure
make
make install

It doesn’t come up with an errror or anything. I’ve checked in /usr/lib/asterisk/modules and it’s not there either.

If someone possibly point me in the right direction, that would be very much appreciated!

Thanks in advance.
J[/quote]

Hi Bonsy,
Thanks for the reply. No I hadn’t, but I then did try (in both the initial configure of asterisk, as well as the configure for the add-ons) with no success.

The output of the configure/make process for add-ons can be found at md.stat.ubc.ca/AAdebug.txt

The configure sees the mysql_client, but make appears to do nothing with this information.

Any further suggestions would be very much appreciated!
J

I have the same problem compiling the mysql modules (both res and cdr)

After trying the ./configure, I also tried make cdr_addon_mysql and got the error below, though this created a .o object. Any help will be appreciated.

spaceworld:/usr/src/asterisk/asterisk-addons-1.4.0 # make cdr_addon_mysql
cc -g -c -fPIC -o cdr_addon_mysql.o cdr_addon_mysql.c
cc cdr_addon_mysql.o -o cdr_addon_mysql
/usr/lib/gcc/i586-suse-linux/4.1.0/…/…/…/crt1.o: In function _start': init.c:(.text+0x18): undefined reference tomain’
cdr_addon_mysql.o: In function handle_cdr_mysql_status': /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:89: undefined referenc e toast_cli’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:91: undefined referenc
e to ast_cli' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:93: undefined referenc e toast_cli’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:95: undefined referenc
e to ast_cli' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:97: undefined referenc e toast_cli’
cdr_addon_mysql.o:/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:100m
ore undefined references to ast_cli' follow cdr_addon_mysql.o: In functionmysql_log’:
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:138: undefined referen
ce to mysql_init' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:140: undefined referen ce tomysql_options’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:141: undefined referen
ce to mysql_error' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:141: undefined referen ce tomysql_errno’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:141: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:143: undefined referen ce tomysql_real_connect’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:148: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:154: undefined referen ce tomysql_ping’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:160: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:163: undefined referen ce tomysql_error’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:163: undefined referen
ce to mysql_errno' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:163: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:169: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:181: undefined referen ce tomysql_escape_string’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:183: undefined referen
ce to mysql_escape_string' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:185: undefined referen ce tomysql_escape_string’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:187: undefined referen
ce to mysql_escape_string' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:189: undefined referen ce tomysql_escape_string’
cdr_addon_mysql.o:/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:191m
ore undefined references to mysql_escape_string' follow cdr_addon_mysql.o: In functionmysql_log’:
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:205: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:216: undefined referen ce toast_cdr_disp2str’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:222: undefined referen
ce to ast_cdr_disp2str' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:226: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:229: undefined referen
ce to mysql_real_query' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:230: undefined referen ce tomysql_error’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:230: undefined referen
ce to mysql_errno' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:230: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:231: undefined referen
ce to mysql_close' cdr_addon_mysql.o: In functionmy_unload_module’:
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:244: undefined referen
ce to ast_cli_unregister' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:246: undefined referen ce tomysql_close’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:281: undefined referen
ce to ast_cdr_unregister' cdr_addon_mysql.o: In functionmy_load_module’:
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:292: undefined referen
ce to ast_config_load' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:294: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:298: undefined referen
ce to ast_variable_browse' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:304: undefined referen ce toast_variable_retrieve’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:311: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:315: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:319: undefined referen
ce to ast_variable_retrieve' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:326: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:330: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:334: undefined referen ce toast_variable_retrieve’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:341: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:345: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:349: undefined referen
ce to ast_variable_retrieve' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:356: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:360: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:364: undefined referen ce toast_variable_retrieve’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:371: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:375: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:379: undefined referen
ce to ast_variable_retrieve' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:386: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:390: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:394: undefined referen ce toast_variable_retrieve’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:397: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:402: undefined referen ce toast_variable_retrieve’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:405: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:410: undefined referen ce toast_variable_retrieve’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:413: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:418: undefined referen ce toast_config_destroy’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:420: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:421: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:422: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:424: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:425: undefined referen
ce to ast_log' cdr_addon_mysql.o:/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:426m ore undefined references toast_log’ follow
cdr_addon_mysql.o: In function my_load_module': /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:429: undefined referen ce tomysql_init’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:431: undefined referen
ce to mysql_options' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:432: undefined referen ce tomysql_error’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:432: undefined referen
ce to mysql_errno' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:432: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:435: undefined referen
ce to mysql_real_connect' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:436: undefined referen ce toast_log’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:440: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:446: undefined referen ce toast_cdr_register’
/usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:448: undefined referen
ce to ast_log' /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:450: undefined referen ce toast_cli_register’
cdr_addon_mysql.o: In function __reg_module': /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:478: undefined referen ce toast_module_register’
cdr_addon_mysql.o: In function __unreg_module': /usr/src/asterisk/asterisk-addons-1.4.0/cdr_addon_mysql.c:478: undefined referen ce toast_module_unregister’
collect2: ld returned 1 exit status
make: *** [cdr_addon_mysql] Error 1
spaceworld:/usr/src/asterisk/asterisk-addons-1.4.0 #

first things first … do you have the appropriate deps installed and available ? before you do a “make”, is/are xx_mysql available in “make menuselect”

Thanks baconbuttie. This works perfectly. The steps followed are:

//Steps to Install asterisk 1.4.0 addons
install ncurses lib
download libmxml from easysw.com/~mike/mxml/
Install libmxml
cd ./menuselect (@ Asterisk addon source directory)
make (compiles menuselect app)
cd …
./configure
./menuselect/menuselect (Use to select addons to build)
make (make selected addons)
make install

Tnx all. :smiley:

No way! Works a treat - thanks guys for taking the time!
J

Hello together,
this is exactly the solution if you try to compile the add-ons 1.4.x on Debian Sarge.

Best regards,
Daniel